After moving the room name into a flex container the room name input no
longer expanded to fill the whole width of the sidebar.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The rules for the opacity of the submit button for the chat message
input were not merged with the generalized ones due to "styles.scss" not
being included everywhere that "chatview.scss" is included (for example,
in the Talk sidebar for the Files app).
The rule explicitly excludes a hovered or focused submit button, as due
to specifity in this specific case the rule for the focused input
overrides the rule for hovered or focused submit buttons (even if in the
generalized ones it is not necessary to explicitly exclude those
states).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The authentication page uses pure CSS instead of the SCSS styles, so the
rules were adjusted as needed.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In the server the pointer cursor is set for the whole menu item. In the
pop up to set the room password only the button in the password field is
clickable, so the pointer cursor should not be used for the whole menu
item.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The button is highlighted to convey that it can be interacted with, so
it should not be done if the button is disabled.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The guest name now behaves like the room name regarding the opacity of
its submit button.
Both the room name and the guest name are editable text labels, so the
CSS rules were moved from the room name to the editable text label.
However, although the guest name uses the default server rules for the
input and the submit button the room name does not (they are adjusted to
better fit a header); the rules set for the editable text label are
based on the default server rules, and the room name inherits the rules
for the editable text label customizing them as needed.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
As ".room-name" and ".guest-name" elements are also
".editable-text-label" elements the rules for the later, which should be
more generic, are moved above the rules for the specific elements.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the input field for the room name is focused pressing enter sets
the room name without having to explicitly click on the submit button.
To hint this behaviour now the opacity of the submit button is slightly
increased when its input field is focused.
Due to the specifity of the CSS rules, the one for the focused input
needs to be defined before the other to get the full opacity of the
button when it is hovered and the input is also focused.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
For consistency with the button to send a new chat message the submit
button is now by default at a opacity of .3 and is shown in full opacity
only when hovered/focused/active.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the "UI not ready" placeholder is shown the other elements in the
tab are hidden using a CSS trick to hide all its next siblings. However,
the call button was prepended to the tab, so it was a previous sibling
of the placeholder and thus it was not hidden. Now it is inserted based
on the chat view instead to ensure that it will be a next sibling of the
placeholder.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the "Chat" tab is selected for a different file a new room is
loaded. However, as first it has to be checked if the Talk sidebar is
supported for the file, which may require a query to the server, and
then the messages for the new room need to be fetched some time can pass
between selecting the tab and rendering the messages for the new room.
Due to this now a "UI not ready" placeholder is shown in the "Chat" tab
while a new room is being loaded, which prevents the messages of the old
room from being shown.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In some cases it is not possible to know if the Talk sidebar is
supported for a file or not just from the data in the FileInfo. For
example, the Talk sidebar is supported for files in a folder shared by
the current user, but the FileInfo does not provide any hint about that
case (it does, on the other hand, when the file is in a folder shared by
another user with the current one).
In those cases it is necessary to query the server to know whether the
room for the file is accessible by the user or not. Once that is known
everything works as before; if the room is accessible then the Talk
sidebar is supported for the file and the chat is shown; if it is not
accessible then the message hinting the user to share the file is shown
instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the file is in a shared folder and the file is not explicitly
shared the first share found is not for the file, but for the folder. In
that case the file needs to be searched in the shared folder to get the
proper name for the room.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Before a file was seen as directly accessible by the user if the user
received the file through a user, group, circle or room share. Now files
that are a descendant of a folder that meets those conditions are seen
as directly accessible by the user too.
Due to this now the rooms for files in a shared folder can be accessed
by any user that has access to the folder; it is no longer needed to
explicitly share the file too with them.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In Nextcloud 15 icons were added to the tab headers in the sidebar; due
to the shared CSS rules this broke the position of icons in the tab
headers of Talk.
For consistency with the server, the tab header icons were not fixed to
their previous position (to the left of the label), but to the same
position used in the sidebar of the server (above the label).
To do this the icon was simply extracted from the link to use the same
markup as the server.
However, there are still some differences between the tab headers in
Talk and in the server; in Talk the whole tab header is highlighted when
hovered, so now that the icon is in a separate element it should use the
same opacity rules, specific to Talk, as its link.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This only applies to the message shown when WebRTC is not supported, and
includes a hint of the supported browsers; the additional message is
already removed in the "Waiting for XXX to join the call", as the hint
about adding other participants is not applicable in the Files app nor
in the password request.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Browsers merge two or more consecutive spaces, even when they are in
different elements. Due to this, when there is a trailing space inside a
mention it gets merged with the space after that mention, which causes
the mention to visually "touch" the following text despite the space
between them. To prevent that now all the spaces were removed from the
Handlebars template that renders mentions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The EmptyContentView expects some events to be triggered in the
"localMedia" radio channel while waiting for permissions or when WebRTC
is not supported to show the proper message.
Although the "Waiting for permissions" message is never shown in the
Files app (because the call UI is shown only once the permissions are
granted or denied) all the events are triggered anyway for consistency.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In the server, ".icon-file" is set to the "text" icon instead of to the
"file" icon. For consistency with the server and between the room list
(which uses ".icon-file-white") and the icon to go to the file (which
uses ".icon-file") now ".icon-file-white" uses the "text" icon too.
Note, however, that the icon for shared files that do not have a preview
is still the "file" icon, as in that case it should reflect the file
contents and using a text icon for other types of files could be
misleading.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
If a room is associated to a file now an icon is shown to the right of
the room name; when that icon is clicked the Files app is opened in a
new tab and focused on the file.
The "Go to the file" hint is shown using the tooltip plugin instead of
the link title for consistency with other buttons in the UI, and because
it is automatically shown when the icon is focused while traversing the
UI elements with the tab key.
The icon has a clickable area of 44x44px; due to how the properties for
h2 elements are defined in the server some margin juggling is needed to
vertically align the icon with the room name header.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The editable div inserts non-breaking spaces (url encode %C2%A0) after a mention.
When two mentions are right behind each others, the later one is not matched by the
regex later, because the lookahead on the @ finds only non-breaking content.
Manually adding a space in between the two mentions solves this already.
But instead we replace them with normal spaces before sending them to the server.
Signed-off-by: Joas Schilling <coding@schilljs.com>
In Nextcloud 16 the Handlebars library shipped in the server is no
longer the full Handlebars library, but a trimmed down version that does
not support compiling Handlebars templates at runtime.
Currently Talk still needs to compile Handlebars templates at runtime,
so for the time being the full Handlebars library that was included
before in the server is now included in Talk.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>