Commit Graph

28 Commits

Author SHA1 Message Date
JC Brand
05c5cd1046 Remove call to api.confirm in @converse/headless 2023-02-22 15:21:56 +01:00
JC Brand
85181053e6 Make the role form a custom element
So that it can be used in the occupant modal as well.
2023-02-21 23:14:16 +01:00
JC Brand
57f489f61b Turn the MUC affiliation form into a component
So that it can be used elsewhere, for example in the occupant modal.
2023-02-21 20:18:16 +01:00
JC Brand
4531dd4363 Move Add-Hoc commands UI code into its own plugin 2022-10-18 09:33:28 +02:00
JC Brand
bd60861c1e Don't import plugins' index.js file from other plugins
Importing a plugin's `index.js` file from other plugins means that it's no
longer possible to remove that plugin by removing it from `src/converse.js`.

Instead, all plugins need to be imported in proper order from
`src/headless/headless.js` and `src/converse.js`.

Updates #3026
2022-09-20 14:48:20 +02:00
JC Brand
8e1c3e47df Improve how the muc_domain setting is populated via disco
Remove brittle code that uses `querySelector` to get the rooms list model.
This code was causing a TypeError due to a race condition.
2022-04-09 10:57:55 +02:00
JC Brand
7c7b667745 MUC: Register handler to parse for commands in the plugin index.js 2022-02-14 15:17:05 +01:00
JC Brand
505416a59e Let bookmarks be created/removed via a modal 2022-02-09 20:05:30 +01:00
JC Brand
ed490fc202 Create directory for modal plugin 2021-09-20 11:13:26 +02:00
JC Brand
0242fdb020 Extract moderator tools functionality and put it in a component
This makes it easier for 3rd parties to embed it in other modals (besides the bootstrap modal).
2021-07-27 12:53:39 +02:00
JC Brand
68f0be996f Let chats be closed by calling close on the models
Instead of on the views/components.

We still have `close` methods on the components, but they are just
event handlers and not external API methods to be called by other code.
Instead `close` should be called on the model.
2021-06-15 09:59:40 +02:00
JC Brand
9fb92080f2 Get rid of the APIs to fetch chat views
This is largely a leftover from the Backbone.View days and makes less
sense now that the UI is componentized.

Ideally we don't want to call commands on the "views themselves, instead
we should be working on the the models and let the "views" update
themselves automatically.

Also, given that the `jid` attribute on the chat views might change,
especially when rendered declaratively in other frameworks like React,
a view might not be available at times where we previously might have
expected it to be (since it's been repurposed for a different JID).
2021-06-15 09:59:40 +02:00
JC Brand
4bdafb8ea3 Break Sass up into more files
And import where appropriate to allow for custom builds that are still styled properly
2021-04-30 17:36:40 +02:00
JC Brand
ccd60f76c3 Cleanup
- Move top-level functinos to utils files
- Get rid of unused/obsolete overrides
- Only import components there where they're used
- Bump version in package.json
2021-03-26 10:58:51 +01:00
JC Brand
73c4c21533 Move MUC styles to plugin folder 2021-03-19 11:47:13 +01:00
JC Brand
d8daedea0d Render the MUC view component declaratively 2021-03-15 12:34:56 +01:00
JC Brand
69a9adb459 Rename and move some files around 2021-03-12 09:58:17 +01:00
JC Brand
9bac86fe1a Don't add the same OGP metadata multiple times 2021-03-01 21:31:57 +01:00
JC Brand
8d74e063af Don't import the entire chatview plugin for the muc-views one 2021-02-24 06:35:49 +01:00
JC Brand
f4bcfa5c44 Move various template files into plugin folders 2021-02-22 20:37:13 +01:00
JC Brand
de4fd466dc Move more MUC related views and components to muc-views plugin 2021-02-16 13:46:25 +01:00
JC Brand
c43969fece Move MUC sidebar component to plugin folder
and fix update issue where occupants weren't being shown in the sidebar
when reloading the page
2021-02-12 15:01:00 +01:00
JC Brand
9f5dbad589 Turn roster into a custom element 2021-02-09 15:48:21 +01:00
JC Brand
bb317d1abb Combine RoomsPanel with RoomsList element 2021-02-09 15:48:21 +01:00
JC Brand
1949356ede Work on turning chat views into custom elements
The eventual goal is to avoid UI-related stanza processing if the relevant chats
aren't in the DOM.

With the current architecture, chatboxes are created (and the stanzas
related to them processed) even if `#conversejs` isn't in the DOM.

* Initial work on making controlbox an element
* Create a shared base class
* Ceate ChatBoxViews proxy
* Update sass now that certain classes are moved to converse-chats element
2021-02-09 15:48:21 +01:00
JC Brand
986f7550f3 Clear messages upon reconnection as late as possible
To avoid a long empty flash while new messages are being fetched again.
2020-12-17 16:23:47 +01:00
JC Brand
e80afbfe39 Move MUC and stanza utils into shared and plugin-specific files 2020-12-14 16:30:13 +01:00
JC Brand
e8536ebc88 Move converse-muc-views plugin into own folder 2020-12-08 09:50:17 +01:00