Commit Graph

84 Commits

Author SHA1 Message Date
JC Brand
d6c0129c86 Various CSS fixes 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
85bd192f3c Move converse-minimize into a folder
Also, use utility methods instead of adding a mixin to ChatBoxViews
(since we're planning on removing it).
2021-01-18 12:56:17 +01:00
JC Brand
b5b35a97c6 Bugfix. Ad-hoc form fields didn't render.
Also... clear info message before executing ad-hoc command so that user
gets visiual indication.
2021-01-11 15:06:51 +01:00
JC Brand
9a2ded5a9a Remove global lodash 2020-12-29 15:12:45 +01:00
JC Brand
3f40098144 Render logo for registration form
Also fix showing of version number in login form
2020-12-29 12:16:23 +01:00
JC Brand
da131715ba Use lit-html to render form fields 2020-12-28 18:25:51 +01:00
JC Brand
5a82478381 Declare sizzle as a dependency for @converse/headless 2020-12-10 17:13:40 +01:00
JC Brand
23a4a20dc2 Bugfixes
Mesage versions modal didn't open on subsequent clicks
Autocomplete: avoid undefined error
2020-12-10 14:12:20 +01:00
JC Brand
bb3f52d2f2 Move the autocomplete code into ./shared
And remove it as a plugin.
2020-12-10 11:17:57 +01:00
JC Brand
d47c72711b Document the button hooks 2020-12-03 16:56:54 +01:00
JC Brand
824bf2ed30 Move all plugin files to ./plugin folders
Rename converse-core.js to core.js
2020-12-03 16:41:15 +01:00
JC Brand
5dc7a442f6 New hook getMesageActionButtons
Allows 3rd party plugins to add more buttons to the message actions dropdown
2020-12-03 16:08:54 +01:00
JC Brand
1a161ad2c7 Add api for managing modals
Set passed-in properties on modal
2020-12-03 11:36:02 +01:00
JC Brand
34cba68432 Allow user modals to be opened from message headings 2020-12-03 11:02:35 +01:00
JC Brand
a65da05094 Revert "fix emoji-picker for use_system_emojis==false"
This reverts commit e0088a45da.
2020-11-26 14:19:30 +01:00
Christoph Scholz
e0088a45da fix emoji-picker for use_system_emojis==false 2020-11-18 17:22:14 +01:00
JC Brand
00466cd550 Let the converse-loaded event conform to the CustomEvent spec
https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
2020-10-26 13:09:15 +01:00
JC Brand
4252a17f62 Fixes #1642 Add option to hide participant list by default
In the process, turn it into a component
2020-10-23 21:18:05 +02:00
Xavi
15f5b185c3
Fix message reorder issue after edit (#2300)
* keep message in place after edition by assigning previous message original timestamp
* update time displayed to keep current behaviour
* add test to check a message remains in the same position of the history after being edited
* briefly describe pr changes in changelog
2020-10-23 15:07:56 +02:00
Xavi
5a4fbe12a9
Allow getHats method to be overriden (#2308) 2020-10-23 14:09:30 +02:00
Xavi
042aa3a73e
Create hats from vcard conditionally (#2285)
* allow the use of MUC affiliation, MUC role, and VCard roles as hats
* update setting documentation
* remove filter from VCard roles
* update naming and documentation to make explicit the use of XEP-317 Hats
* include muc_hats config option update to changelog
2020-10-15 09:51:19 +02:00
JC Brand
383b6a27c3 Render the brand heading as a component 2020-10-02 11:44:28 +02:00
JC Brand
6d9752645f Replace lodash methods with native ones
filter
find
has
isEmpty
isString
isUndefined
noop
reject
uniq
2020-10-01 12:56:00 +02:00
JC Brand
65ad33ec81 Let message component listen for changes...
and render directly from those

Instead of doing it higher up in the chat view (which requires more
function calls and iterating through all messages).
2020-09-27 10:31:53 +02:00
JC Brand
4ebd3caf48 element: Call super.disconnectedCallback 2020-09-27 10:31:53 +02:00
JC Brand
3fc6f7fa23 Fixes #1924 2020-09-25 18:46:45 +02:00
JC Brand
bbf4c08ffd Prevent emoji from being inserted twice 2020-09-17 13:50:52 +02:00
JC Brand
0a82a177c4 OMEMO: ensure reflected encrypted MUC messages are identified 2020-09-17 10:37:09 +02:00
JC Brand
2c042cc3fa Fixes #2184: Headless build relies on locale directory
Removed Jed from the headless build and instead let `__` call sprintf.

It's now up to downstream users for `@converse/headless` to decide
whether they want i18n support for the few translatable strings in that package
and to implement it themselves.
2020-09-10 08:55:38 +02:00
Xavi Ferrer
cc458e8d3b use composedPath() instead as it is standarized and cross-browser suported 2020-09-07 15:51:34 +02:00
Xavi Ferrer
37662e8dc1 prevent dropdown from being closed after event retargeting when bubbling out of a shadowRoot 2020-09-07 15:51:34 +02:00
JC Brand
4e7b29e417 Make sure initialize can be awaited...
before `converse.initialize` has been called

In the process, remove other "core" promises. There is no core or
community plugins code awaiting on them and since it's possible to
call `converse.initialize` twice, I'm not sure it makes sense to even have them.

Also removed unused error class IllegalMessage.
2020-09-03 17:07:44 +02:00
JC Brand
c41bdac6c8 Some work on componentizing the minimized chats UI 2020-09-03 13:06:17 +02:00
JC Brand
d5c93eb024 Create converse-root custom element
This element can be used to declaratively insert Converse into the DOM.

You can put `<converse-root>` into the DOM (e.g. by rendering it inside
a React component) before or afer Converse has loaded and/or has been
initialized.
2020-09-03 13:06:17 +02:00
JC Brand
7cbb1b23b2 When opening a dropdown, don't prevent other dropdowns from closing 2020-08-18 15:09:37 +02:00
JC Brand
306b9fdd71 Updates #2193
Also remove top-level i18n declarations in components
2020-08-17 09:00:53 +02:00
JC Brand
fbcd7cf737 Emoji picker: Make sure events persist across add/remove from DOM 2020-08-14 15:07:15 +02:00
JC Brand
78bf07ecff Make sure the registry is loaded before registering custom elements 2020-08-12 18:01:23 +02:00
JC Brand
6a6d080679 Open images in a modal 2020-07-14 15:45:16 +02:00
JC Brand
8f6b1f9049 Fix help menu icon colour and let it scroll 2020-07-13 11:17:29 +02:00
JC Brand
e6d8634194 Emoji picker: properly insert emoji upon click 2020-07-13 10:59:57 +02:00
JC Brand
756a85fb53 Emoji picker: make sure search results get properly updated 2020-07-13 09:55:01 +02:00
JC Brand
43ccc09cf2 Don't assume that converse is a global 2020-07-10 14:20:02 +02:00
JC Brand
cca5c17ccb Fix failing test due to timing issue 2020-07-10 12:38:52 +02:00
JC Brand
54ffd90087 Make sure the emoji picker is focused...
the first time it's opened
2020-07-09 21:21:17 +02:00
JC Brand
45ebc70bfe Let escape close the emoji picker 2020-07-09 21:14:13 +02:00
JC Brand
8943609d10 Refactor the body directive
Changes how rich message markup is generated and kept track of.
We now have a MessageText class which subclasses String and which keeps
track of the rich markup associated with the message.
2020-07-09 20:50:25 +02:00
JC Brand
51ad0e3708 Fix toggling of the spoiler form 2020-07-08 11:33:06 +02:00
JC Brand
4bf823f6cd Fix show/hide of spoilers 2020-07-08 10:22:20 +02:00