Commit Graph

486 Commits

Author SHA1 Message Date
SilverYoCha e18fdd56b1 Fix #3209.
Fixing some technical errors when avoiding importing the `converse` global with bootstrap modal API.
2023-06-27 11:07:35 +02:00
JC Brand cb1f929045 Fixes #3123: Contacts do not show up online until chat is opened with them.
The issue was that nothing was listening to the new `presenceChanged` event.
2023-06-09 20:37:27 +02:00
JC Brand 2b732cdb94 Bump `filesize` to latest version and fix issues. 2023-06-09 14:55:09 +02:00
JC Brand 27a47c6ee8 fixes #3165
Use configured nickname in profile view in the control box.
Remove doc for the unimplemented `fullname` setting.
2023-06-02 07:24:37 +02:00
JC Brand 48e7987f38 Start work on removing constants from _converse object 2023-03-03 17:28:26 +01:00
JC Brand 4d2a8e9f8d Create new config setting `stanza_timeout`
And move STANZA_TIMEOUT off `_converse` and into constants.js
2023-03-03 17:28:26 +01:00
JC Brand 3d0e9a7374 Move CONNECTION_STATUS to constant.js 2023-03-03 17:28:26 +01:00
JC Brand fb054c40be Experimenting with avoiding importing the `converse` global 2023-03-03 17:28:26 +01:00
drlight17 c3c666e568
dragresize over iframe fix function concept (#3157)
Fixes stuttering of conversejs overlayed dragresize UI elements over the iframes on the parent page.
2023-03-03 11:52:24 +01:00
JC Brand 6b365458f5 Get rid of lodash's invoke method 2023-02-26 19:32:55 +01:00
JC Brand 885a3d92b5 Move private API to own file 2023-02-26 18:10:01 +01:00
JC Brand fde55bea2c Include XEP-0172 nick in all outgoing presence subscribe stanzas 2023-02-26 09:53:25 +01:00
JC Brand 3530ccc35d Add initial TypeScript support and declaration files 2023-02-23 09:38:11 +01:00
JC Brand 05c5cd1046 Remove call to `api.confirm` in `@converse/headless` 2023-02-22 15:21:56 +01:00
JC Brand e1e93c2ec9 Properly set checkbox state in bookmark form 2023-02-22 12:25:21 +01:00
JC Brand 16b442ac19 Occupant modal: Only show role/affiliation forms for moderators 2023-02-22 09:32:20 +01:00
JC Brand 56259fd22e Add the role form to the occupant modal 2023-02-21 23:14:16 +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 26062df4e5 Fix logo path 2023-02-21 23:14:16 +01:00
JC Brand 2fb9fec8f8 Use `addEventListener` in the constructor
In Lit elements, the `initialize` function can get called multiple
times, thereby causing a memory leak if `addEventListener` is called
there and not removed.

The `ElementView` only calls it once, but I'm making the change so that
it's not forgotten when we eventually move to using Lit elements for
modals.
2023-02-21 23:14:16 +01:00
JC Brand d4cb67dc5f Add affiliation form to the occupant modal 2023-02-21 23:14:16 +01:00
JC Brand ad7b4ae343 Add affiliation form to the occupant modal 2023-02-21 20:18:59 +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 6ce8879e9c CSS: fix MUC textarea color when correcting a message 2023-02-21 17:41:39 +01:00
JC Brand 1ee4cce2fd Modtools: fix wrench icon not visible in dracula theme
Also fix spacing of buttons
2023-02-21 09:30:29 +01:00
JC Brand b69e5b5482 Create occupants based on messages
That way the occupant modal can still be shown in MUCs even if the user
is no longer online.
2023-02-20 22:02:13 +01:00
JC Brand 5e3139f563 Fixes #1490: Busy-loop when fetching registration form fails 2023-02-17 11:44:22 +01:00
JC Brand 7b8b32638c Fixes #3137
- Modernize the `RegisterPanel` component and turn it into a Lit element.
- Improve CSS and move into plugin.
- Fix button click handler not being registered.
- Fix switching between login/register form after logging out (Fixes #1556)
2023-02-16 23:45:59 +01:00
JC Brand dae84028c2 Fixes #1851: Sort open groupchats alphabetically 2023-02-15 14:43:56 +01:00
JC Brand 15c10376b0 Rename all templates to camelCase
To conform with naming conventions regarding functions, which the
templates are.
2023-02-15 14:29:07 +01:00
JC Brand ccc165facc Update roomslist and templates to bring in line with conventions 2023-02-15 14:29:07 +01:00
JC Brand 0fcdb2a594 Add-hoc form fixes
- Provide actions as received in the Ad-Hoc form
- Add support for multi-stage ad-hoc forms
- Add new tests for multi-stage forms

Fixes #2240
2023-02-14 11:51:35 +01:00
JC Brand 5029d93523 XML stanza parsing fixes
- Add a `Stanza` class which can be used by Strophe because it has a
  `tree()` function. This is what gets returned by the `stx` tagged
  template.

- Throw an error when no valid namespace is on the stanza.
    Strophe.Builder used to automatically add the `jabber:client` namespace,
    but that doesn't happen with `toStanza`, so we need to fail if it's not
    specified by the user.

- Use the Strophe XML Parser
    This opens the door to NodeJS support
2023-02-14 11:50:38 +01:00
JC Brand bab11b682b Fix failing test 2023-02-13 20:37:11 +01:00
JC Brand 9343488864 Update translations 2023-02-08 12:06:46 +01:00
JC Brand 8c3ce2892b Updates #3128: Fix test and add changelog entry 2023-01-28 22:50:48 +01:00
JC Brand 6c44fb2a2f Fixes #3128 2023-01-28 22:37:52 +01:00
JC Brand 465aa38222 Refactor bookmark modal
- Use `getDisplayName` to have proper fallback for the MUC name
- Don't use the term "Unbookmark". There might be other reasons for
opening the bookmark modal besides removing a bookmark.
2023-01-28 22:37:52 +01:00
JC Brand 7539fc1a6f Move functions out of src/headless/core.js into utils 2022-12-28 21:36:40 +01:00
JC Brand f740332e95 Fixes based on Github's code scanning results 2022-12-28 21:14:15 +01:00
JC Brand fdcab413f5 Use `crypto.randomUUID()` if available 2022-12-28 11:49:37 +01:00
JC Brand 5f38a914b1 Update and clean up password-reset feature
- No need for it to be in a separate plugin
- Make all UI strings translateable
- Remove the "Are you sure?" prompt
- Add tests

Fixes #326
2022-12-27 21:07:23 +01:00
based-a-tron fa132567da Reworked profile modal; Added rudimentary password reset plugin 2022-12-27 12:46:29 +01:00
JC Brand 5ea00b8008 Tweak modal tab style 2022-12-27 12:46:29 +01:00
JC Brand 739d79e90c Fixes #2816 2022-12-20 18:05:35 +01:00
JC Brand e63ba2075f Use `repeat` directive to render roster and MUC occupant items
If we don't use `repeat`, a DOM node may be reused with different state
(e.g. the `model` it receives originally changes upon next render).

https://lit.dev/docs/templates/lists/#when-to-use-map-or-repeat

Fixes #2816
2022-12-13 10:04:13 +01:00
JC Brand 78a7841afb Don't duplicate disco items across two collections
We now no longer have an `.items` collection on a disco entity.
Instead, add a new API method `api.disco.entities.items` should be used.

This should solve the issue of the entities disappearing when reloading
the page.

Updates #2925
2022-12-02 22:50:06 +01:00
JC Brand a251608fc5 Fix race condition where `waitUntilFeaturesDiscovered` was resolved too early
When calling `api.supports(feature, entity_jid)`, it checks whether the entity
supports the feature or whether any of the sub-items on the entity
supports that feature.

However, on `DiscoEntity`, the `waitUntilFeaturesDiscovered` promise
didn't wait for the items on the entity to be fetched, and was therefore
resolved too quickly.

This caused the file upload button to not render.

Updates #2925
2022-11-08 20:03:37 +01:00
JC Brand 659a69e7b7 Make sure a moderator can also add contacts...
since they can see real JIDs, even if the room is semi-anonymous.

Also made changes regarding programming style and conventions:

- Pass in `this` to the template
    Recently I've started simplifying the `render` method by just
    passing `this` into the template and letting the template calculate
    what it needs from that.
- Don't use `bind()`
    It's slow and arrow functions can be used instead.
- Don't use an i18n string inside a tagged template literal
    Due to limitations with `xgettext` which cannot parse properly
    inside tagged template literals
- Use snake-case for variables
2022-11-03 10:14:12 +01:00
Simon Lipp b0b8a3f89d muc: add a add to contacts button 2022-11-03 09:46:06 +01:00