To provide a stronger feedback that the action is still going on now a
working/loading icon is shown in the call button while joining or
leaving a call.
In the Files app the call button width depends on its text (in the
regular Talk UI it depends on the sidebar width), so the padding was
increased to always make room for the icon, even when hidden, to prevent
a sudden increase of the width when the icon is shown.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Joining or leaving a call is not an immediate action; in some cases a
few seconds can pass before the action is finished, so during that time
the button should be disabled, both to prevent further actions from the
user and to give her feedback that the action is still going on.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In the original "fix" (spoiler alert: the fix was wrong) "POSTGRES_DB"
ended being empty due to "$DATABASE_NAME_dummy" being parsed as a full
variable name, instead of "$DATABASE_NAME" followed by the string
"_dummy".
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"onRender" is always called after the template has been rendered, so
there is no need to remove the icons for other types of rooms; even if
the room type has changed the element will not use have any of the
previous CSS classes, it will be a new element as defined in the
template. Due to this the room icons can be set in the template itself
instead of in "onRender".
Avatars, on the other hand, are set using JavaScript, so they still need
to be set in "onRender"; the name of the called function has been
changed to better reflect is current purpose.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Swapping the "public-room" and "private-room" CSS classes comes from the
time in which the share link was shown in the room list. However, since
the share link was moved to the sidebar the "public-room" and
"private-room" CSS classes are not set anywhere, so their switching code
as well as their CSS rules can be removed.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Updating a received share is no longer allowed by the server, so the
integration tests have to be adjusted to the new behaviour.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Chromium seems to drop a stream when the element it is attached to is
detached or reparented. The sidebar in the Files app is open and closed
using a jQuery animation, which reparents the whole sidebar and then
restores it at the end of the animation, so closing the sidebar breaks
an ongoing call in Chromium. To prevent that, during a call the
functions to open and close the sidebar are replaced with custom
versions that do not use an animation.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Rooms for files are available only for shared files; if the sharing API
is disabled the files can not be shared, and thus the Talk UI in the
sidebar does not provide any value.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Before, the "Chat" tab was shown only when the file was shared. This
made the feature hard to discover if you did not know about it.
Moreover, after sharing the file the details view had to be closed and
opened again, which was cumbersome, as there were no events to listen to
and the visibility of tabs can not be updated once shown either (at
least, without some hacks).
Due to all this now the "Chat" tab is always shown for files (although
not for folders); if the file is already shared the previous UI (call
button and chat view) is shown, and if it is not a message to inform the
user that the file needs to be shared is shown instead. This is updated
every time the tab is opened again, so after sharing the file going back
to the "Chat" tab will show the call button and the chat view.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Although in the main Talk UI there will be always a "#screen" element
this may not be the case when embedded in the Files app, for example,
when changing to an unshared file while in a call in a different file.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When "setFileInfo" is called the tab is not visible yet, so reloading
the message list does nothing; the reload needs to be delayed until the
next event loop to ensure that the tab will be visible.
Even without this fix the list was being shown as expected due to
joining the room causing the messages to be fetched and thus the list
being reloaded when received. However, joining to the room before
showing the tab would reveal the problem (as will happen once the call
button is added).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>