Commit Graph

727 Commits

Author SHA1 Message Date
JC Brand
b3e34a0636 Turn the emoji picker into a web component 2020-06-25 10:27:29 +02:00
JC Brand
be20b8e1a0 emojis: fix rendering of custom emojis 2020-06-25 10:24:45 +02:00
JC Brand
7c29ae4a8a Improve stying for /me messages
Show the actions dropdown on the right, like with other messages, and
don't wrap them.
2020-06-18 16:54:12 +02:00
JC Brand
0cc088a523 Use the assets_path setting for the icons sprite 2020-06-18 13:45:03 +02:00
JC Brand
59a5acf249 Fixes #2064 (for real this time) 2020-06-11 17:29:44 +02:00
JC Brand
abec9bc39e Fixes #2064 and move message markup into template
After some back-and-forth, I think it's still better to keep markup in
templates (instead of having them directly inside the components)
becaues it makes it easier for people to modify Converse.js (at the
expense of some developer ergonomics).
2020-06-11 15:27:45 +02:00
Ariel Fuggini
48fcbfa5ea Finds names by RegExp with i param for case insensitive 2020-06-09 10:33:21 +02:00
JC Brand
b0cb489769 Use @converse/skeletor, lodash-es and latest webpack-dev-server 2020-06-08 19:38:16 +02:00
JC Brand
1059b30641 Use lit-html to render the toolbar 2020-06-06 23:23:12 +02:00
JC Brand
09a79d609f Create an image picker component and use it in the profile modal 2020-06-03 13:53:52 +02:00
JC Brand
88c7d49054 Fixes #2039 2020-06-03 10:52:41 +02:00
JC Brand
d325059c28 Fix styling issue for the unread badge 2020-06-03 10:38:46 +02:00
JC Brand
7651d58470 Render chat messages as web components
- Render chat content as a <converse-chat-content> component
- Create new component for rendering the message body
- Get rid of `showMessage` method
2020-06-01 09:53:19 +02:00
Ariel Fuggini
d77f8d9fec Rearranged ifs to prevent unwanted spaces 2020-05-26 18:31:57 -05:00
JC Brand
e8f1f6d528 Pass both hat title and URI to template 2020-05-20 14:13:51 +02:00
Dele Olajide
cae5e9c875 Updates #1999 - Demarcate first unread message 2020-05-13 13:39:33 +02:00
sedrubal
20d70a042b Use <code> instead of <span> for fingerprint 2020-05-12 10:55:11 +02:00
JC Brand
555c0966cc muc: save error response to a sent message onto the original model 2020-05-07 13:32:56 +02:00
Christoph Scholz
a7deb2021a make use_system_emojis==false work 2020-04-29 11:25:08 +02:00
JC Brand
db69d724bb Fix typo in js-xss data
updates #2006
2020-04-28 21:28:33 +02:00
Christoph Scholz
f78a1372e3 fix rendering of muc_roomid_policy_hint 2020-04-28 10:52:49 +02:00
JC Brand
5efb7b2a84 MUC: provide feedback when no rooms found 2020-04-27 18:31:56 +02:00
JC Brand
7e2552bd8c core: Allow multiple imports 2020-04-23 13:50:35 +02:00
JC Brand
edf7f6b8d3 Show status messages via object creation 2020-04-19 08:11:53 +02:00
JC Brand
8a7b25584d Show error messages via objects
Instead of injecting them directly into the DOM.
2020-04-19 08:03:44 +02:00
JC Brand
2696c26ffb Add new config setting allow_adhoc_commands 2020-04-17 15:01:12 +02:00
JC Brand
fb92229f22 Rename modal 2020-04-17 14:29:09 +02:00
JC Brand
78b60a3bd9 Fixes #515 Add support for XEP-0050 Ad-Hoc commands 2020-04-17 11:01:44 +02:00
JC Brand
4c872164c3 Bugfix. Don't show 'undefined' for nick 2020-04-17 10:50:30 +02:00
JC Brand
be3cbe6dc3 Downgrade dayjs
Due to this bug: https://github.com/iamkun/dayjs/issues/792
2020-04-15 17:47:50 +02:00
JC Brand
f68f577b71 muc-views: Update ListChatRoomsModal to make better use of lit-html 2020-04-15 11:54:07 +02:00
JC Brand
16c58a966a modal: Add ability to show multiple input fields for confirm modal 2020-04-15 09:29:52 +02:00
JC Brand
df9612f937 Add support for XEP-0317 MUC Hats 2020-04-13 22:57:29 +02:00
JC Brand
3e27a5ec81 Template fix. Don't render boolean value 2020-04-07 10:29:28 +02:00
JC Brand
631b9bb438 Use the settings API for setting and getting config settings
This is an initial step towards no longer storing and accessing settings
directly via the `_converse` object
2020-03-31 11:57:03 +02:00
JC Brand
8d81637388 Bugfix. Make sure empty history feedback message gets removed
when messages appear
2020-03-30 05:34:47 +02:00
Holger Weiß
63b1886f50
Add missing space left to "Open Groupchats" label (#1925) 2020-03-26 11:30:40 +01:00
JC Brand
e363c02041 CSS: display rendered images as blocks 2020-03-25 10:39:41 +01:00
JC Brand
42235167f8 Bugfix. Fall back to JID if nick is not set 2020-03-25 09:02:31 +01:00
JC Brand
7812d4e7b6 Show chat state notifications inside the scrollable area
Rename CSS class to conform to convention
2020-03-24 11:28:50 +01:00
JC Brand
57709b2e78 Sort modtools search results by nickname 2020-03-23 18:06:36 +01:00
JC Brand
00cac6d250 Add the ability to filter the results in the modtools modal 2020-03-23 14:34:19 +01:00
JC Brand
b5d57f0ef8 Handle and render chat state notifications separately from messages 2020-03-21 17:21:53 +01:00
JC Brand
283a810d6b Use lit-html to render chatbox outlines 2020-03-21 17:21:53 +01:00
Rémy Grünblatt
bf063d4df7
Fix oauth provider template (#1916) 2020-03-20 11:31:35 +01:00
JC Brand
c9f29f76e5 Use lit-html to render URLs 2020-03-06 12:24:23 +01:00
JC Brand
2af93f4492 modtools: settings for which roles/affiliations may be queried or assigned 2020-02-22 23:16:22 +01:00
JC Brand
2c5cde050e CSS: fix bookmark indicator color and add title 2020-02-21 15:30:28 +01:00
JC Brand
c69a2abc45 modtools: Replace Backbone.View events with lit-html events 2020-02-21 15:25:57 +01:00
JC Brand
d07b9510a2 modtools: Show affiliations tab first 2020-02-21 15:01:19 +01:00
JC Brand
5b5c4595cc Rename hide_subject to subject_hidden 2020-02-18 17:26:49 +01:00
JC Brand
f564a1edaf Show reason and actor for ban/kick events 2020-02-14 13:19:12 +01:00
JC Brand
3400acbfeb Show MUC buttons in a dropdown menu
- Get rid of the ChatBoxHeading class
- Add support for showing standalone buttons in overlay viewmode
2020-02-13 20:57:47 +01:00
JC Brand
181d18fcfe Translation and undefined variable fixes 2020-02-11 10:13:23 +01:00
JC Brand
893ef10563 Use lit-html to render chat head 2020-02-07 16:09:12 +01:00
JC Brand
2235d4c432 Use lit-html to render MUC heading 2020-02-07 14:58:26 +01:00
JC Brand
15f15e9a09 Bugfix. Declare parameter 2020-02-07 13:34:22 +01:00
JC Brand
d2b6b41128 emoji-picker: Make sure that emojis as images are rendered properly 2020-02-06 16:27:44 +01:00
JC Brand
9b279ad39d Various emoji-picker fixes after recent refactoring
- Fix choosing of a categoy
- Make the highlight color darker (more visible)
2020-02-05 23:20:51 +01:00
JC Brand
f854e477b7 Add placeholder to MUC invite modal input 2020-02-03 23:24:44 +01:00
JC Brand
6430691c22 Fix template condition 2020-01-31 22:50:13 +01:00
JC Brand
6b4bdb636e sidebar: Show shortened text in overlay mode 2020-01-30 22:03:08 +01:00
JC Brand
e3708bd598 Refactor headlines list to render everything with one view 2020-01-30 19:57:04 +01:00
JC Brand
c55a2171d5 Refactor headlines-view
* Use lit-html
* Let it look and behave similarly to other list views in the controlbox
2020-01-30 19:37:00 +01:00
JC Brand
73fa24a844 headlines: move view code into converse-headlines-view.js 2020-01-30 18:18:27 +01:00
JC Brand
fef92ad99e oauth: Replace VDOMView with HTMLView 2020-01-30 17:36:55 +01:00
JC Brand
8b5227761e Replace roster filter VDOMView with HTMLView 2020-01-30 17:36:55 +01:00
JC Brand
39f189b1d1 Use HTMLView for login form 2020-01-30 17:36:55 +01:00
JC Brand
30d08d2bfe muc-views: Remove features section...
and replace with button to open invite modal
2020-01-30 17:36:55 +01:00
JC Brand
9fb2056753 Move MUC invite widget into a modal 2020-01-30 17:36:55 +01:00
JC Brand
d32c4c1f61 muc-views: replace VDOMView with HTMLView 2020-01-30 17:36:55 +01:00
JC Brand
9fb2d279e9 Replace VDOMView with HTMLView 2020-01-30 17:36:55 +01:00
JC Brand
393a96cf02 roomslist: remove Backbone 2020-01-30 17:36:55 +01:00
JC Brand
c4b48d701f bookmark-views: Changes templates to lit-html 2020-01-30 17:36:55 +01:00
JC Brand
d310f1e3e4 emoji-views: use lit-html for templating
* declare picker events in lit-html
* init intersection observer only once
* don't set value manually
* don't manually add classes
* avoid x-scrollbar and 'undefined' in search input
2020-01-30 17:36:55 +01:00
JC Brand
ad93407907 Replace modal templates with lit-html components 2020-01-30 17:36:55 +01:00
Christoph Scholz
a472a0806e show headline messages in controlbox 2020-01-23 11:32:15 +01:00
JC Brand
d5472a8d23 muc-views: Use native methods instead of lodash 2020-01-21 11:46:39 +01:00
JC Brand
aa86a8be32 muc: Store room configuration (e.g. disco#info fields) on the MUC
This will make it easier to add config-based functionality, such as
allowing/showing the `/topic` slash command only to those users who are
allowed to set the subject.
2020-01-16 15:28:02 +01:00
JC Brand
17e9f5607d Set meta and noscript tags 2020-01-15 11:40:40 +01:00
JC Brand
66d1a65432 Update chat head markup and CSS
- Use flexbox where possible
- Simplify header by using `justify-content` instead of setting column widths
- Show description below the row containing the title and buttons
2020-01-14 13:38:27 +01:00
Christoph Scholz
e2d744ddc4 config option for roomid validation 2020-01-13 09:01:21 +01:00
JC Brand
916e300a79 Updates #1313 and #1793: Send button improvements 2020-01-10 15:40:46 +01:00
JC Brand
224f41ca8a Remove autofocus, it's bad for accessibility and mobile usability
See here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus
2020-01-09 14:15:16 +01:00
JC Brand
c3102561f4 updates #1795: Only download metadata for video files 2019-12-18 15:20:51 +01:00
raphaelSeguin
97b8ecbbdf Display status avatars in the occupants list 2019-12-05 14:13:52 +01:00
JC Brand
b1c9af3ed0 Various improvements to resizing of occupants view.
- Remove need for the `converse-mouse-events` plugin.
- Register `mousemove` and `mouseup` handlers only when necessary and only inside the MUC DOM element.
- Restore converse-dragresize to roughly it's original state before work started on this.
- Move `applyDragResistance` to utils.

updates #1640
2019-12-05 09:32:48 +01:00
JC Brand
115abdda27 muc-views: pass all model attributes to template
Makes it possible to show a validation message in a downstream
application.
2019-12-03 15:02:37 +01:00
JC Brand
9bff567b3c Fixes #1796 2019-12-03 10:57:01 +01:00
JC Brand
d7d810ba89 Improvements to rendering MUC MAM logs before joining
- Add config variable `muc_show_logs_before_join`
- Restore nickname form for the original use-case (when not showing MAM logs before joining).
- Render nickname form in the `.muc-bottom-panel` when showing MAM logs (instead of in a modal)
- Show a message when there aren't any archived messages to show
- Fix converse-mam so that chat logs are properly fetched before entering a MUC

closes #1266
2019-11-29 09:23:15 +01:00
Emmanuel Gil Peyrot
a83911d67f WIP: Move the nickname selection form to a modal 2019-11-28 15:45:48 +01:00
JC Brand
025cdbf18f Check for support before allowing message moderation 2019-11-22 13:50:36 +01:00
JC Brand
1b9ba58aca Rename variable to be more accurate 2019-11-22 13:50:36 +01:00
JC Brand
d895c7fc16 Bugfix. Leave space between classes 2019-11-22 13:50:36 +01:00
JC Brand
b4dafcc45b Add support for XEP-0424 and XEP-0425
- Add support for switching ephemerality after message creation
- Move more methods from ChatBox and ChatRoom to utils/stanza.js
- Rename 'ephemeral' to 'is_ephemeral' since it's a boolean
2019-11-22 13:50:36 +01:00
JC Brand
1fa203c990 Support for IndexedDB. updates #1105
Depend on latest backbone.browserStorage which has support for IndexedDB
via localforage.

Storage operations are now asynchronous and transactional.

Bugs fixed (mostly by waiting for operations to complete):

* Rooms are now fetched asynchronously, so wait before triggering `show`
  or when closing.
* Make sure chat create/update transactions complete before firing events
* Make sure chats and messages have been fetched before creating new ones.
* When doing a `fetch` with `wait: false` on a collection and then
  creating a model in that collection, then once the read
  operation finishes (after creating the model), the collection is emptied again.
* Patch and wait when saving.
  Otherwise we have previously set attributes overriding later ones.
* Make sure api.roomviews.close returns a promise

Test fixes:

* Chats are now asynchronously returned, so we need to use `await`
* Wait for the storage transaction to complete when creating and updating messages
* Wait for all chatboxes to close
    Otherwise we get sessionStorage inconsistencies due to the async nature of localforage.
* Wait for room views to close in spec/chatroom.js

In the process, remove the `closeAllChatBoxes` override in
converse-controlbox by letting the `close` method decide whether it
should be closed or not.
2019-10-30 13:02:23 +01:00
JC Brand
b71500104b Move emoji-picker out so that its width can expand 2019-10-29 17:19:33 +01:00
JC Brand
015f1c6fc8 Make status clickable instead of adding pencil icon 2019-10-17 13:33:43 +02:00
JC Brand
e6e23a1a82 Add initial support for custom emojis 2019-10-17 12:12:08 +02:00
JC Brand
2ed8b4660e Bugfix. Duplicate rooms-list header 2019-10-16 12:11:59 +02:00