Граф коммитов

713 Коммитов

Автор SHA1 Сообщение Дата
Marco Ambrosini 029e2291ca Fix appcontentlistitem hover active behavior
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-16 16:00:15 +01:00
Joas Schilling f3d2846860
Merge pull request #2765 from nextcloud/bugfix/noissue/add-hover-active-focus-states
Add hover/active/focus states to the appcontentlistitem component
2020-01-16 15:32:37 +01:00
Joas Schilling 06e8210ae6
Fix typo
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-16 15:32:00 +01:00
Daniel Calviño Sánchez 2663cd0807 Fix autocompletion of mentions in public share auth page
The autocompletion panel is reparented to the body element and placed
using an absolute position. However, as the body element used a flex
layout the absolute position of the panel was ignored. Therefore now all
the body elements are wrapped in another div element, which becomes the
flex element and acts like the body element, so the real body element is
no longer flex and reparenting the autocompletion panel to it then works
as expected.

Besides that the CSS for the autocompletion panel were not included in
public share auth pages.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-16 14:50:49 +01:00
Marco Ambrosini 65d1472008 Add hover/active/focus states to the appcontentlistitem component
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-16 12:45:53 +01:00
Ivan Sein 587eaad86e
Merge pull request #2764 from nextcloud/techdebt/noid/placeholder-participants
Dummy placeholders for the participant list
2020-01-16 12:40:30 +01:00
Ivan Sein dfeab35989
Merge pull request #2762 from nextcloud/bugfix/2760/fx-counter-layout-bugs
Fix counter layout bugs
2020-01-16 12:29:08 +01:00
Joas Schilling 0fe4e38a34
Dummy placeholders for the participant list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-16 12:25:13 +01:00
Marco Ambrosini 88b31e44cd Fix counter layout bugs
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-16 12:14:49 +01:00
Joas Schilling e546904e90
Add loading placeholders to the conversation list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-16 10:39:25 +01:00
Joas Schilling 34c7e64b59
Don't clear conversations list on errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-16 09:24:22 +01:00
Joas Schilling ed079b57b1
Preserve whitespace when posting code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 22:38:07 +01:00
Ivan Sein 1fc009e2dd
Merge pull request #2753 from nextcloud/bugfix/2750/fix-posted-code
Fix posted code to not be sent escaped
2020-01-15 22:25:45 +01:00
Joas Schilling d900a29f99
Primary unread counter in one-to-one conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 17:39:11 +01:00
Joas Schilling 59e1eee114
Also make sure the sidebar doesn't escape the last message twice
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 17:19:20 +01:00
Joas Schilling fd70ff167c
Fix posted code to not be sent escaped
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 17:10:19 +01:00
Joas Schilling 4e97ed7f31
Fix ESlint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 13:37:48 +01:00
Marco Ambrosini b1417a7bb1 Allow guests to set their user name
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-15 11:16:10 +01:00
Joas Schilling 9b9b0f6d0b
Move the author of the message above the quote box
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-15 09:29:05 +01:00
Daniel Calviño Sánchez e2cd8b5e22 Fix "The operation is insecure" when accessing cssRules
In Firefox accessing "cssRules" may throw a "SecurityError" if the style
sheet was loaded from a different domain. The style sheets loaded by
Nextcloud all come from the same domain, but some Firefox extensions
inject their own stylesheets from a different domain. Due to this, when
the style sheet from the vue-at component was being looked for those
style sheets from a different domain could be iterated over, which
caused the exception to be thrown and stopped the load of Talk, which
ended causing a blank page.

In a similar way this caused an exception to be thrown when starting a
call in the Files app sidebar, which ended causing the call view to not
be shown in the sidebar.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-15 02:09:54 +01:00
marco 0ff3a25095
Merge pull request #2742 from nextcloud/bugfix/noid/fix-broken-group-option-on-creation
Fix broken group option on conversation creation
2020-01-14 22:10:22 +01:00
Joas Schilling 5b8933fcf8
Merge pull request #2745 from nextcloud/bugfix/2452/use-action-seperator
Use defined ActionSeparator
2020-01-14 22:10:14 +01:00
Joas Schilling 8dd807b68c
Merge pull request #2732 from nextcloud/bugfix/2688/add-ability-to-password-protect-conversations
Password protect group conversations
2020-01-14 22:02:09 +01:00
Joas Schilling a035bba929
Use defined ActionSeparator
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 19:33:22 +01:00
Daniel Calviño Sánchez c5d6b0b368 Leave conversation when navigating away from public share auth page
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-14 19:06:24 +01:00
Daniel Calviño Sánchez 16562abd5a Replace dummy sidebar contents with CallView and ChatView
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-14 19:06:24 +01:00
Daniel Calviño Sánchez b409fd3975 Add slide animation when opening and closing the sidebar
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-14 19:06:24 +01:00
Daniel Calviño Sánchez 833d96a8f5 Add dummy Talk sidebar to public share auth page
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-14 19:06:24 +01:00
Marco Ambrosini 13f7f0a72b Add ability to set password from the sidebar menu
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-14 17:14:14 +01:00
Joas Schilling 6cacfd0a3c
Fix broken group option on conversation creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 16:48:35 +01:00
Joas Schilling c1c3377799
Merge pull request #2734 from nextcloud/bugfix/2590/dont-override-style-of-avatars
Don't override the avatar style to "fix" guests
2020-01-14 15:28:29 +01:00
Joas Schilling 2b1aadf2cf
Merge pull request #2738 from nextcloud/bugfix/2621/leave-conversation-when-navigating-away
Leave conversation when navigating away
2020-01-14 15:27:56 +01:00
Joas Schilling 7ab394a43b
Autofocus chat on reply
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 14:32:28 +01:00
Joas Schilling c0071f3ea8
Kill signaling and leave conversation in unload
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 12:44:13 +01:00
Joas Schilling 6c0c6a2a16
Prevent unload from the files app too
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 12:28:50 +01:00
Joas Schilling 65af232343
Fix primary bubble
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-14 09:24:55 +01:00
Marco Ambrosini a244dbaab0 Add ability to set password wen creating a new conversation
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 23:06:02 +01:00
Marco Ambrosini eeaaba27ad Create setConversationPassword service
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 23:06:02 +01:00
Marco Ambrosini 3d0299e765 Add ability to choose password in the new group conversation dialog
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 23:06:02 +01:00
Marco Ambrosini 6a68cde8ab Fix avatar layout bug
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 19:29:19 +01:00
Joas Schilling fda3bc0040
Show part of the name on the lest message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 19:06:53 +01:00
Joas Schilling 177816a342
Don't override the avatar style to "fix" guests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 18:49:36 +01:00
Joas Schilling 459bf58f4d
Forward the click event to the parent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 17:50:07 +01:00
Joas Schilling c7768bab9b
Fix colors of icons in the modal
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 17:35:54 +01:00
Joas Schilling 1c7d3a39be
Use the ParticipantList for the ParticipantTab
Also fixing the icons there so group suggestions have the correct icon

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 17:35:54 +01:00
Joas Schilling cfaa6bde29
Rename the OptionsList
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-13 17:35:53 +01:00
Marco Ambrosini 6ec73f4cb1 Get older messages
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 16:51:09 +01:00
Marco Ambrosini f37bd0db2d Display loader if the message list is scrolled to the top
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 16:51:09 +01:00
Marco Ambrosini bccb2f4f5b Remove vue-scroll library
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-13 11:10:29 +01:00
Joas Schilling 9e900b1c9c
Spell checking
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-10 10:40:12 +01:00
Joas Schilling 0d006641c2
Merge pull request #2669 from nextcloud/add-call-view-to-sidebar-in-files-app
Add call view to sidebar in Files app
2020-01-10 10:31:06 +01:00
Joas Schilling 2adb03af99
Merge pull request #2710 from nextcloud/fix-autocompletion-issues
Increase the max height of the mention suggestion to 4.5 mentions ins…
2020-01-10 10:13:36 +01:00
Joas Schilling 54e87ddf49
Merge pull request #2703 from nextcloud/followup/2698/combine-empty-sources-in-rightsidebar-and-filter-there-aswell
Unification of participant selections
2020-01-10 10:00:49 +01:00
Joas Schilling d4ecf7b07f
Merge pull request #2694 from nextcloud/bugfix/2676/allow-logged-in-users-to-join-public-conversations
Allow logged in users to join public conversations
2020-01-10 09:52:25 +01:00
Joas Schilling 58d7618e34
Fix loading the avatar of users with a space in their id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-10 09:47:17 +01:00
Joas Schilling 0ef29e1616
Re-enable mentions for other things as its only broken in dev mode
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-10 09:44:55 +01:00
Daniel Calviño Sánchez 1bbc90d77b Replace default vue-at style sheet with a wrapped version
The wrapped version roots all the rules of the default style sheet on
".talk.candidate-mentions", so the rules affect only the candidate
mentions of Talk. Otherwise, as the default rules are too broad (as they
use just ".atwho-XXX") they could mess with the autocompletion of other
elements (like the comments tab in the Files app).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 06:22:51 +01:00
Daniel Calviño Sánchez 8d4a28610f Make possible to set extra CSS classes to the vue-at panel
This will be needed to limit the style applied only to the vue-at panel
created by Talk, as by default it uses "atwho-XXX" classes, which clash
for example with the autocompletion in the comments tab of the Files
app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:46:22 +01:00
Daniel Calviño Sánchez c5e86fdb56 Fix indentation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:30:48 +01:00
Daniel Calviño Sánchez c6a3816902 Fix check for previously added style sheet
Although it is possible to use the "title" attribute of a style sheet as
an ID that is totally wrong and a complete misuse of the attribute.
Moreover, that only works when only a single style sheet has a title
set.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:25:21 +01:00
Daniel Calviño Sánchez e48c75913d Fix wrong property being unset
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:22:20 +01:00
Daniel Calviño Sánchez b9e8a9a3da Force restoring the sidebar header contents on file changes
If the sidebar is opened in a different file during a call the sidebar
header contents may not be properly restored due to the order in which
the updates are handled, so it needs to be executed again when the
FileInfo has been set and it does not match the current conversation.

Otherwise the call view could be a child of the header instead of the
header actions, so if a call is started again "hidden-by-call" will be
set to the call view too, hiding it during the call.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:37 +01:00
Daniel Calviño Sánchez d204b09fe0 Fix frozen video after closing and opening the sidebar during a call
When a video element is removed from the DOM and then added again it
will be frozen in its last frame until its "srcObject" is set again
(even overwriting itself with
"videoElement.srcObject = videoElement.srcObject" would be enough).
Closing and opening the sidebar removes it from and adds it back to the
DOM, but as "srcObject" is only set when the stream changes the video
element was frozen after opening the sidebar again.

Instead of notifying the child views that they were shown again (as it
does not seem to be possible to detect it from the child views
themselves) so they can refresh the "srcObjects", for simplicity now the
CallView is fully rendered again when the sidebar is opened after being
closed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:37 +01:00
Daniel Calviño Sánchez 0cb5519588 Extract function to update data based on CallViewParticipantModels
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:37 +01:00
Daniel Calviño Sánchez 678c1b0de0 Add a "constrained layout" for call view to be used in the sidebar
Currently this mimics the layout used in Talk 7 when the call view was
shown in the Files app sidebar (smaller avatars, videos and paddings, no
screensharing button...), but even once the call view is moved to the
new layout a special handling will be needed when the space is limited.

Ideally the call view should automatically change between layouts based
on its size (probably using something like
ResizeObserver/MutationObserver), but for the time being it is
explicitly enabled when the call view is shown in the Files app sidebar.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:37 +01:00
Daniel Calviño Sánchez 1459983a5f Replace placeholder with actual call view
As the call view has a black background the close button of the sidebar
is forced to white during calls to make it visible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:37 +01:00
Daniel Calviño Sánchez c133d5ed50 Replace sidebar header contents with call view during calls
During calls the call view is now moved from the header actions to the
header itself, and all the other elements in the header (except the
close button) are hidden. This is done by setting a special CSS class,
"hidden-by-call", which is defined in a style sheet added dynamically.

When the file is changed the sidebar is cleared until the new file is
loaded. However, "setFileInfo" is called once the new file has loaded,
so the call view can not be hidden based on when a new fileInfo is set,
as that would keep the call view shown while the sidebar only shows the
loading spinner. However, "OCA.Talk.fileInfo" is cleared by
"FilesSidebarTab" when the tab is destroyed, which happens when the rest
of the sidebar is cleared, so that fileInfo is the one used to show and
hide the call view.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-10 04:02:21 +01:00
Marco Ambrosini 0b46115795
Fix chat tab autoscroll to bottom
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-09 21:49:46 +01:00
Daniel Calviño Sánchez 3eb801d16c Add dummy call view to the Files sidebar
Currently the dummy call view is simply shown when the user is in the
call and hidden otherwise.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 21:45:22 +01:00
Daniel Calviño Sánchez 397bbd5500 Generalize names to encompass both the chat tab and the call view
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 21:45:22 +01:00
Daniel Calviño Sánchez c3a7f1b8d7 Refresh current conversation periodically
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 21:45:22 +01:00
Daniel Calviño Sánchez ed8ef2dd76 Replace placeholder with actual call button
The CallButton component uses the current conversation and participant
from the Vuex store to set its state. When changing to a different
conversation and joining a previous conversation again the CallButton
may be shown before the conversation and participants have been fetched
again, so they need to be removed when the conversation is left.
Otherwise the CallButton may show a wrong state for a while (like being
in a call if the user changed to a different conversation while being in
a call) when joining the conversation again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 21:45:22 +01:00
Daniel Calviño Sánchez b685361a34 Add action store to delete a conversation by token
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 21:45:22 +01:00
Joas Schilling ec9f82de44
Use a different icon for email addresses
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:21 +01:00
Joas Schilling a2f05ac3ca
Simplify the icon code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling abd38309f3
Also add the ContactsList with avatars to it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling 405ee8daef
Replace the duplicated OptionsLists with it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling 8079051b67
Allow to add emails to existing conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling 9673991e67
Deduplicate the methods
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling fbfbc3c0e8
Move the participant tab options to the dedicated lists
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:20 +01:00
Joas Schilling 499371806f
Extract the actions from the components so they can be reused
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:19 +01:00
Joas Schilling aa197ed2ed
Use the token to pre-filter the list of potential options
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:19 +01:00
Joas Schilling 0419f84308
Add a header for the participants like in hte left sidebar
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:19 +01:00
Joas Schilling 68d0187f3e
Also filter the list of participants
Otherwise in long participant lists you don't see the option for adding new people

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:19 +01:00
Joas Schilling fd7670aea4
Combine empty sources in the right sidebar as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:39:19 +01:00
Joas Schilling 19ed07e749
Merge pull request #2691 from nextcloud/add-autocompletion-for-mentions
Add autocompletion for mentions
2020-01-09 21:38:18 +01:00
Joas Schilling 003207b68e
Dark theme fixes for vue-at
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 21:34:10 +01:00
Daniel Calviño Sánchez f0b1297060
Merge pull request #2705 from nextcloud/fix-getting-messages-in-messageslist-in-talk-sidebar
Fix getting messages in MessagesList in Talk sidebar
2020-01-09 20:51:58 +01:00
Joas Schilling afad3154a4
Show also matches by id not only display name
The vue-at library only searches in the display name by default.
But luckily our server responds already only with matching items,
so we just filter none and show them all.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 20:41:08 +01:00
Joas Schilling 0a9cdace2e
Temporarily disable guest/all mentions so autocomplete for users works
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 20:25:46 +01:00
Daniel Calviño Sánchez b733303448
Show HTML mentions instead of plain text when composing a message
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:18 +01:00
Daniel Calviño Sánchez c1fc2a123e
Show avatars for candidate mentions in the autocompletion panel
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:18 +01:00
Daniel Calviño Sánchez 2f98ec671e
Add custom template for elements in the autocompletion panel
In order to show the user label in the autocompletion panel but set the
user id in the content editable both attributes need to be included for
every vue-at member. When the members are objects instead of a string
the "name-key" property needs to be used so vue-at knows which attribute
to use to filter the panel based on the text after the "@". However, the
default embedded item uses that attribute, so a custom template is
needed to set the user id in the content editable. In turn, this causes
the content editable contents to be set as HTML elements instead of
plain text, so the HTML element of the mentions need to be converted to
plain "@userId" before sending them to the server.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:18 +01:00
Daniel Calviño Sánchez c728282147
Add basic autocompletion of mentions
The vue-at component is used to provide the autocompletion UI. This
component handles the edition in its wrapped contenteditable, so the
"vue-contenteditable-directive" is no longer needed. As the new message
form hides its overflowing children (and it can not be removed, as it
breaks the layout when typing long (tall) messages) the
"vue-at-reparenter" helper is used.

In this initial version the candidate mentions show the id of the user
or guest that matches the current "@" mention being written and, when
selected, adds that id as plain text to the editable content.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:18 +01:00
Daniel Calviño Sánchez 920deedec8
Enable HTML markup in contenteditable div
By default the "vue-contenteditable-directive" sets the text of a
contenteditable div using the "innerText" property, which causes any
HTML markup to become escaped plain text inside the div. In order to
provide rich text messages with mentions real HTML elements are needed,
so the "dangerousHTML" option needs to be enabled so the text is set to
the "innerHTML" property instead.

When real HTML elements are used the browser adds new lines using "<br>"
and spaces that would otherwise be collapsed into one (like several
white spaces in a row) using "&nbsp;". Therefore now the raw text of the
contenteditable div needs to be converted to the format expected by the
server (that is, "\n" and regular white spaces).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:17 +01:00
Daniel Calviño Sánchez 818b644401
Fix enabling and disabling the AdvancedInput using the property
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:17 +01:00
Daniel Calviño Sánchez 895f21640a
Add helper to reparent the panel of the vue-at component
The panel of the vue-at component is a child of the root element of the
component. In some cases a different parent may be needed, but the
component does not provide any way to change that, so a helper mixin
that works around that limitation was added.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 20:19:17 +01:00
Joas Schilling ed5a5e9ccb
Merge pull request #2707 from nextcloud/bugfix/noid/fix-chat-tab
Correctly register the chat tab
2020-01-09 20:15:24 +01:00
Joas Schilling dfd44fc134
Correctly register the chat tab
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 18:35:08 +01:00
Daniel Calviño Sánchez 5f3f714d0c Show mentions to guests using a UserBubble
The UserBubble component currently does not provide a way to set an
arbitrary letter on the avatar, only the first letter of the display
name or an icon. Therefore, for the time being, a user icon is used for
the avatar instead of the "?" character.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 14:38:50 +01:00
Daniel Calviño Sánchez d7cc4f3510 Show mentions to all using a UserBubble
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 14:38:50 +01:00
Daniel Calviño Sánchez d594bb84b6 Adjust chat tab to the new vue-scroll directive
Due to the changes in the message list it is no longer needed to reset
the height of the chat view. Moreover, the chat view now needs to have a
height of 100% (which was the reset value before) in order to be
properly shown in Chromium.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 13:43:08 +01:00
Daniel Calviño Sánchez 22a8bfdfec Set current participant when joining a conversation in the chat tab
The MessagesList starts getting messages once the current participant
has been set, so it needs to be fetched and set after joining the
conversation (as if the current user is not a participant of the
conversation yet only a limited data about the conversation will be
received). Getting the conversation automatically sets the current
participant, and as both the conversation and the participant will be
needed for the CallButton, which will be added later, the participant is
now set implicitly through the conversation.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 13:43:08 +01:00
Daniel Calviño Sánchez 944c5e5cc9 Fix join/leaveConversation not waiting until the action is done
join/leaveConversation are marked as asynchronous, so it is expected
that invoking them with await will wait until the conversation is joined
or left before continuing.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 13:43:08 +01:00
Joas Schilling f6989b69a6
Merge pull request #2701 from nextcloud/bugfix/noid/fix-posting-messages
Prevent empty messages and pasting HTML
2020-01-09 12:54:54 +01:00
Joas Schilling fa890665b2
Add a different empty-content view for invalid conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 12:52:44 +01:00
Joas Schilling 0b92266cdc
Allow logged in users to join public conversations
Instead of failing and redirecting to root,
we try to manually load the conversation in case it is a public one.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 12:52:44 +01:00
Joas Schilling 30541a45d4
Delay loading the participants until the conversation was joined.
Before it will error for guests and self-joined users

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 12:52:38 +01:00
Daniel Calviño Sánchez 145c78c76e Show lobby screen for non moderators when it is enabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 12:42:12 +01:00
Daniel Calviño Sánchez 26a47813af Stop and start requests depending on the lobby state
When the current participant is in the lobby the messages and
participants can not be fetched.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 12:42:11 +01:00
Joas Schilling d7fd9268a6
Fix pasting HTML code into the input
Ref https://github.com/nextcloud/spreed/pull/1018

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 11:11:31 +01:00
Joas Schilling 2c7b766d1f
Don't allow empty messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 11:05:26 +01:00
Daniel Calviño Sánchez e99cbef9e5 Extract function to handle start getting messages preconditions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 11:03:56 +01:00
Daniel Calviño Sánchez 8e4456a6d5 Remove unused code
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 11:03:56 +01:00
Daniel Calviño Sánchez 6684c1c865 Remove dangling character
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 11:03:56 +01:00
Daniel Calviño Sánchez 701a178192 Add action to moderation menu to set the lobby timer
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 11:03:56 +01:00
Daniel Calviño Sánchez e41cbbd20e
Prevent trying to get new messages on a destroyed MessagesList
As "getNewMessages" is enqueued to be executed in the next tick it could
happen (even if it is extremely rare) that the MessagesList component is
destroyed in the meantime. If that happens the component is disconnected
from the store, so it can access only those values already known. Due to
this the last known message ID is never updated, so when a new message
is sent the MessagesList enters in a infinite loop trying to get the new
messages again and again always using an old message ID.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 08:36:51 +01:00
Daniel Calviño Sánchez a4896cc4f7
Fix getting messages in MessagesList
The MessagesList component only started getting the messages after a
conversation was joined. Due to this the messages were not updated after
joining a call, as the original MessageList component was removed from
the main view and a new component was added to the sidebar, but as the
conversation was not changed the new MessagesList component did not
fetch new messages and only showed those that were already in the store.

Now getting the messages is done based on the conversation token and
whether the current participant is a participant of the conversation or
not. Both checks are needed and independent; when "token" changes that
signals a change in the current conversation, and when "isParticipant"
changes that signals that the current participant is now a participant
or not any longer of the conversation.

Note that getting the messages can not be done on 'routeChange' events,
as the token might not have been updated yet when the event is handled,
which would cause the messages for the new conversation to be got with
the token of the previous conversation (and with that all sort of
problems).

Finally, when scrolling to bottom it is necessary to check that there is
any message in the conversation. Otherwise "beforeUpdate" could be
triggered by some property change before the first batch of messages is
received, which would clear the "initiated" flag and thus no scrolling
would happen once the messages are finally got (although the scrolling
code need a revamp, this is just a small adjustment).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-09 08:36:51 +01:00
Joas Schilling 2c59757596
Merge pull request #2698 from nextcloud/bugfix/noid/combine-empty-sources
Bugfix/noid/combine empty sources
2020-01-09 08:04:18 +01:00
Joas Schilling e18e6be05e
Merge pull request #2690 from nextcloud/bugfix/2675/missing-guest-placeholder-name-on-quotes
Fix missing "Guests" placeholder on quotes
2020-01-09 08:03:54 +01:00
Joas Schilling 7be3922f21
Merge pull request #2692 from nextcloud/bugfix/2681-2595/scrolling
Fix scrolling issues
2020-01-09 08:00:35 +01:00
Joas Schilling 9168c903d0
Remove vue-virtual-scroll-list for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-09 07:58:39 +01:00
Joas Schilling 824f85b6d2
Merge pull request #2689 from nextcloud/fix/design/ConversationIcon
Cleanup: fixes on the ConversationIcon design
2020-01-08 19:02:25 +01:00
Joas Schilling 51a2b74853
Merge pull request #2695 from nextcloud/bugfix/2657/make-all-text-bold
Make all text bold for unread conversations
2020-01-08 19:01:20 +01:00
Marco Ambrosini ca1243182b Add scroll to bottom feature when receiving new messages
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-08 17:24:28 +01:00
Marco Ambrosini 6ef2d3f2b8 Install vue-scroll package
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-08 17:24:28 +01:00
Marco Ambrosini 4c72e2fe25 Use visibility store
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-08 17:24:25 +01:00
Joas Schilling d59a06c579
Fix padding of "No results"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-08 16:28:59 +01:00
Joas Schilling a951a4f5a9
Combine the empty sources for less "No results" messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-08 16:28:40 +01:00
Marco Ambrosini b6e40d0dcb Create window visibility store 2020-01-08 15:35:09 +01:00
Marco Ambrosini 4521c23bcc Fix layout
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-08 15:35:09 +01:00
Marco Ambrosini c96adaf0d9 Remove virtual list
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
2020-01-08 15:35:09 +01:00
Daniel Calviño Sánchez 3d40f399ed
Merge pull request #2683 from nextcloud/bugfix/2660/make-links-clickable-again
Make links clickable again
2020-01-08 13:26:03 +01:00
Joas Schilling 62157416e8
Make all text bold for unread conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-08 12:07:42 +01:00
Joas Schilling 719c05a92d
Merge pull request #2682 from nextcloud/followup/2649/translate-placeholder-for-new-messages
Translate placeholder for new messages
2020-01-07 18:08:49 +01:00
John Molakvoæ e10c0f8972
Small fixes on the ConversationIcon design
- Fix alignment and proper sizing of the elements
- Reduced star size for better antialiasing
2020-01-07 16:49:12 +01:00
Joas Schilling 55b3f591c6
Fix missing "Guests" placeholder on quotes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-07 16:47:54 +01:00
Joas Schilling 1dc2201dd8
Merge pull request #2673 from nextcloud/fix/design/ConversationIcon
Small fixes on the ConversationIcon design
2020-01-07 16:36:49 +01:00
Joas Schilling 69b3769392
Make avatars the same size
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-07 16:34:54 +01:00
John Molakvoæ b42bdc5724
Fix AppContentListItem left margin
So it is the same as the distance from the avatar to the left border of the screen

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-07 16:34:49 +01:00
John Molakvoæ 419319def9
Update conversation-icon width/height
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-07 16:34:47 +01:00
John Molakvoæ 69a177a3d9
Small fixes on the ConversationIcon design
- Fix alignment and proper sizing of the elements
- Reduced star size for better antialiasing

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-07 16:34:40 +01:00
Joas Schilling 3f0962d5e3
Merge pull request #2637 from nextcloud/fix-duplicated-participants-in-store-when-using-guest-page
Fix duplicated participants in store when using guest page
2020-01-07 16:29:00 +01:00
Joas Schilling 746cda4bed
Merge pull request #2665 from nextcloud/fix-leak-of-components-due-to-eventbus-event-handlers
Fix leak of components due to EventBus event handlers
2020-01-07 16:18:40 +01:00
Daniel Calviño Sánchez 8aa2199f3d
Fix leak of components due to EventBus event handlers
Several EventBus event handlers were registered in the components, but
never unregistered. Due to this even when the components were destroyed
the handlers were still active, so the references to the components
prevented them to be garbage collected.

Moreover, as the handlers were still active they were still called when
their associated event was triggered, which could cause for example an
infinite loop of requests to get new messages (as the store was
disconnected and thus the MessagesList component never got an updated
last known message ID, so it requested again and again new messages).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-01-07 16:15:40 +01:00
John Molakvoæ (skjnldsv) 51d872e01e
Prevent inherit attributes on messages v-bind
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-07 15:28:51 +01:00
Joas Schilling 86e3babb15
Fix setting the link for default parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-07 13:18:16 +01:00
Joas Schilling 63caa5bc3e
Make links clickable agaijn
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-07 13:18:03 +01:00
Joas Schilling b07c20cec5
Translate placeholder for new messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-01-07 12:10:26 +01:00
Joas Schilling 32b65ff3c8
Merge pull request #2658 from nextcloud/add-again-css-rules-for-scrolling-and-padding-in-right-sidebar
Add again CSS rules for scrolling and padding in right sidebar
2020-01-07 11:56:56 +01:00