When the mouse hovers on a participant name or status, detect whether
that one is ellipsized. If yes, set the matching tooltip text to display
it. Otherwise, let the text empty so the tooltip doesn't appear.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
For when participant names or status texts are too long, the user can
hover on them to view them in a tooltip.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Previews are recognizable only for properly loaded image previews.
But not when:
- file is not an image (doc previews usually not that recognizable)
- no preview available on server
- image loading failed
In the latter cases the file name will now still be shown.
File names will still be shown in the upload editor for images.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Instead of displaying file names below attachments in a conversations,
like for images, it is now displayed only on hover in a tooltip.
Howver, in the upload editor the file names are still shown as they can
be helpful in that situation.
This cleans up the message list a bit and also solves some layout issues
with images in narrow views like the sidebar.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
With the changes in the Files app sidebar API the Chat tab can be
directly used in the OCA.Files.Sidebar.Tab object without having to use
a special Vue component as a bridge.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a tab is registered in the Files sidebar a component is no longer
provided. Instead an object with some attributes that describe
the tab (like id or icon) and some callbacks for lifecycle events is
expected now.
Essentially the AppSidebarTab component is now created by the Sidebar
itself instead of being given it. However, as the component needed some
adjustments in its CSS style that needs to be forced when the child
component is mounted.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
To upload files a hidden file input is "clicked", which shows the
browser dialog to pick the files, and the "change" event of the file
input is listened to to know the selected files.
However, although Firefox always emits the "change" event when files are
selected, Chromium only emits the "change" event if the selected files
have changed since the last time. Due to this if a file was uploaded and
then the same file was tried to be uploaded again nothing happened.
Now the value of the file input is cleared (which also clears the files
from the file input) after the files are handled to ensure that there is
no previous state when the browser dialog is shown again, and thus the
selected files always change.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fixes an issue where a chat in the files sidebar would trigger a warning
because the conversation list element don't exist there.
When posting a message, an event is now triggered so other components
could react on it.
The conversation list will now take the responsibility of scrolling the
current conversation into view after posting, instead of the
NewMessageForm.
The behavior is also adjusted to always scroll regardless where the
conversation is located in the list.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-Authored-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a presentation starts (screen share), remember the grid + stripe
state then switch to presenter mode (no grid + no stripe).
When the presentation stops (last screen share stops), restores the grid
+ stripe state, unless the user has changed the state during the
presentation.
Stripe mode is now also remembered for each call.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>