Added tooltip for room names in case they are too long.
Note: the tooltip appears regardless of length.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Whenever a video or GIF as a preview displayed, add a play icon to make
it clear that it's a video and that a viewer is available for playing
it
Adds an image container to be able to center the play button.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
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>