Although the CSS rules for the candidate mentions of Talk no longer
mess with other elements, some too broad rules of other elements still
mess with the candidate mentions of Talk, so they need to be explicitly
overriden.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>