Граф коммитов

267 Коммитов

Автор SHA1 Сообщение Дата
Joas Schilling 107f77890c
Remove participant tooltip from room list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-13 10:34:00 +02:00
Arthur Schiwon 452eec9063
paste only plaintext into the comment input form
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-07-04 00:33:00 +02:00
Jan-Christoph Borchardt 9b65ad6d0b
Add render function to hasCall
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-25 12:47:54 +02:00
Jan-Christoph Borchardt 7c9d2d9400
Label button 'Start call' if none is in progress yet, fix #976
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-25 12:47:54 +02:00
Ivan Sein 5281ba3a10
Merge pull request #988 from nextcloud/remove-dead-code-now-that-the-guest-name-is-no-longer-shown
Remove dead code now that the guest name is no longer shown
2018-06-22 13:49:05 +02:00
Daniel Calviño Sánchez ba329de382 Remove dead code now that the guest name is no longer shown
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-21 14:41:47 +02:00
Jan-Christoph Borchardt 450c69385c
Fix copy link icon for guests
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-21 13:58:20 +02:00
Jan-Christoph Borchardt a10baaf77b
Improve call controls layout to single row
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-21 13:57:49 +02:00
Joas Schilling 53d274d4c5
Merge pull request #975 from nextcloud/sidebar-guest
Remove guest name input from sidebar as it already is in chat
2018-06-21 12:07:27 +02:00
Jan-Christoph Borchardt 98fb911c03 Fix wording for 'Leave conversation'
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-20 21:40:36 +02:00
Jan-Christoph Borchardt af535fcdc6
Remove guest name input from sidebar as it already is in chat
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-06-20 16:25:41 +02:00
Ivan Sein 8aa29fd2fc
Merge pull request #940 from nextcloud/fix-adding-the-same-participant-several-times-in-a-row
Fix adding the same participant several times in a row
2018-06-06 15:33:25 +02:00
Daniel Calviño Sánchez 7a32f754b8 Fix "Add participant" shown to normal participants
Adding a participant to a room can be done only by the owner and
moderators of that room, so the "Add participant" dropdown should be
shown only to those types of participants.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-06 14:17:05 +02:00
Daniel Calviño Sánchez d0c6f1a3ba Fix adding the same participant several times in a row
When a participant is selected in the select2 dropdown the "change"
event is triggered for the "Add participants" input; this sets the value
of the input and also adds the participant to the room. However, the
event is triggered only if the selected item is different than the
current value of the "Add participant" input. Due to this, the value has
to be cleared when it is set to make possible to add the same
participant several times in a row (for example, in different rooms).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-01 11:30:52 +02:00
Daniel Calviño Sánchez 86d2d66eb0 Fix chat view when leaving current room
When explicitly leaving the current room through the room list view the
chat view was detached. However, as the internal state of the
Application object (which manages the placement of the chat view) was
not updated the chat view was always hidden from that point on until the
page was reloaded.

Moreover, as the chat view was detached only when explicitly leaving the
current room the chat view was not hidden for other users in the room if
it was deleted by a moderator.

As the "leaveCurrentRoom" event is triggered in the room channel when
the current room is left, either explicitly or implicitly, now the
Application object listens to that event and hides the chat view as
needed when it is received.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-08 13:23:23 +02:00
Ivan Sein c1cb7df5aa
Merge pull request #856 from nextcloud/bugfix/849/deleting-of-one2one-conversations
Do not show "remove from list" option for one2one conversations
2018-05-08 11:54:49 +02:00
Joas Schilling 58b744704c
Don't try to calculate the height of no comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-07 09:01:25 +02:00
Joas Schilling c768846f8e
Do not show "remove from list" option for one2one conversations
We always delete the room anyway

Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-04 14:45:47 +02:00
Ivan Sein 5d962c22a1 Fix check for guest's display name.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2018-05-04 10:56:18 +02:00
Joas Schilling ffb65b468e
Limit unread message counter to "99+"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-03 11:18:22 +02:00
Joas Schilling 56bf6707ca
Merge pull request #841 from nextcloud/disable-contacts-menu-for-mentions-in-the-public-view
Disable contacts menu for mentions in the public view
2018-05-02 18:50:17 +02:00
Daniel Calviño Sánchez f042b623bf Disable contacts menu for mentions in the public view
The contacts menu can be shown only in user sessions; in the public view
it just fails and shows an error message instead of any useful option,
so now it is disabled for mentions in the public view.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 18:08:34 +02:00
Daniel Calviño Sánchez 6453be1bb5 Fix scroll position when detaching chat view
When an element is detached and then attached again its scroll position
is reset to the top. Now the chat view provides the "saveScrollPosition"
and "restoreScrollPosition" methods to save the scroll position before
detaching its element and then restoring it when attached again.

Note that the position can not be exactly restored, as the size of the
chat view may have changed due to switching it from the main view to the
sidebar, and thus the visible messages can not be the same in both
cases. Due to this, restoring the scroll position just ensures that the
last message that was partially visible when it was saved will be fully
visible when it is restored.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Daniel Calviño Sánchez 985bf93f91 Do not take margins into account for the container scroll height
The scroll area covers the top and bottom padding of an element, but not
its top and bottom margins, so the margins should not be taken into
account in the scroll calculations.

Currently this does not cause any difference in the behaviour, as the
message lists does not have any margin, but it is fixed just in case it
is added in the future.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Daniel Calviño Sánchez b11b8425b1 Fix handling of negative top margins
When an element has a negative top margin jQuery returns its top
position as the position in where the element would be if it had no
margin. In a similar way, when there is a negative margin the returned
height is not the actual height of the element, but its height without
that margin.

The message list is expected to scroll to the newest message if the last
one is partially visible, but due to the jQuery behaviour the message
list did not scroll when the last message was grouped and less than 20px
(the negative top margin) of the content of that message was visible.
Now the negative margin is taken into account and the message list
always scrolls to the newest message if the last one is partially
visible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Daniel Calviño Sánchez 50afe74a96 Remove support for newest on top chat layout
When the oldest on top layout was added it was enabled by default,
although the original newest on top layout was also kept as an option.
However, the newest on top layout has not been used since then, and it
is not expected to be used ever again. To make the chat view more
maintainable and ease adding new features this commit removes the
original newest on top chat layout.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 14:42:35 +02:00
Daniel Calviño Sánchez 8335f2611e Remove unused CSS rules for ".oldestOnTopLayout"
When the chat view used the oldest on top layout the "oldestOnTopLayout"
CSS class was suppossed to be added to its main element. However, when
the "className" method was executed the "initialize" method had not been
executed yet, so there was no "_oldestOnTopLayout" attribute even if it
was included in the options, so the CSS class was never set and thus the
CSS rules were never used.

The support for the newest on top layout is going to be removed, and the
common CSS rules were already being used for the oldest on top layout
without problems; due to this, instead of fixing the setting of the CSS
class, the specific CSS rules for the oldest on top layout were simply
removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 18:42:17 +02:00
Ivan Sein f4e2d2251c
Merge pull request #831 from nextcloud/fix-pointer-cursor-shown-for-guests-and-in-new-message-form
Fix pointer cursor shown for guests and in new message form
2018-04-30 16:18:36 +02:00
Ivan Sein 914b662fd4
Merge pull request #808 from nextcloud/bugfix/noid/adjust-grouping
Only group up to 10 messages and only for up to 15 seconds
2018-04-30 16:03:37 +02:00
Daniel Calviño Sánchez 19ed71a605 Do not show pointer cursor in the author row of guest users
Note that "currentUser" is not set in the author row of guest users, but
this is not a problem; that CSS class is used only to show the default
cursor instead of the pointer cursor, but as all the author rows of
guest users show the default cursor it makes no difference if
"currentUser" is set for them or not.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 15:05:04 +02:00
Daniel Calviño Sánchez cdda7379fb Do not show pointer cursor in the author row of the new message form
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 14:52:45 +02:00
Daniel Calviño Sánchez a93ae19ca1 Move "currentUser" CSS class to wrapper div
Instead of adding the "currentUser" CSS class to ".avatar" and ".author"
elements now it is added to their wrapping ".authorRow" element.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 14:03:58 +02:00
Joas Schilling fad03fbb4b
Make the unread count more obvious
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 15:33:00 +02:00
Joas Schilling 982bf986ba Add docs for the /mentions endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Daniel Calviño Sánchez 3244c2a9a9 Add formatted mentions to messages being composed
The server expects mentions to be in plain text, so the formatted
mentions have to be converted to "@" followed by the user name before
the message is sent to the server.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 85cd8181e5 Add basic UI for autocompletion
CSS styles were directly copied from
"apps/comments/css/autocomplete.scss".

JavaScript code in the chat view
was slightly simplified from "apps/comments/js/commentstabview.js".

Currently mentions are not formatted when a message is being composed;
"@" followed by the user name is added to the message so it can be
directly sent without further processing. Formatted mentions will be
introduced in another commit.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:49:24 +02:00
Daniel Calviño Sánchez 6effa97a1e Fix pointer cursor not shown on message authors
Clicking on a message author shows the contacts menu (provided the
author is not the current user); in those cases the cursor should be a
pointer so the user knows that an interaction with those elements is
possible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-26 00:49:41 +02:00
Joas Schilling f24177ee4b
Merge pull request #805 from nextcloud/format-mentions-without-avatars-in-the-message-list
Format mentions (without avatars) in the message list
2018-04-25 10:53:54 +02:00
Daniel Calviño Sánchez 7dc7274886 Do not show the contacts menu for mentions of the current user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-25 07:06:19 +02:00
Daniel Calviño Sánchez ee9383f4c4 Show contacts menu when clicking on a mention
The contacts menu expects its parent element to be its positioning
context, so the mention must have a relative position. Besides that, the
default CSS rules from the server set the position of the contacts menu
assuming that the parent element is an avatar, so the rules have to be
overriden to position it on the text.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-25 07:05:46 +02:00
Daniel Calviño Sánchez f1691c06bf Format rich messages in chat frontend
The RichObjectStringParser was copied from the Notifications app and
adapted to be used in the chat (support for file references was removed,
"-" is taken into account too in parameter IDs, only local users are
taken into account, and if the display name of a mention is empty the
user ID is used instead).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-24 17:47:18 +02:00
Joas Schilling d7ab059fc8
Only group up to 10 messages and only for up to 15 seconds
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-24 17:37:25 +02:00
Ivan Sein 16bc8888a0
Merge pull request #806 from nextcloud/feature/noid/unread-message-count
Add unread message count to the room list
2018-04-24 16:48:50 +02:00
Joas Schilling 47255e543d
Add unread message count to the room list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-24 16:28:32 +02:00
Joas Schilling 5f717327dd
Remove useless logs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-23 16:05:22 +02:00
Ivan Sein 4abbe710c9 Add lock icon to password popover.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2018-04-20 12:25:10 +02:00
Joas Schilling c874be537d
Merge pull request #587 from nextcloud/sidebar-toggle
Always show sidebar toggle, also when sidebar is open
2018-04-20 10:58:59 +02:00
Joas Schilling ac9a9494d4
Add an icon for participants which are in the call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-17 10:53:00 +02:00
Ivan Sein be1b58795c Implement toggle function.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2018-04-13 11:03:57 +02:00
Jan-Christoph Borchardt f72ed2da78 Always show sidebar toggle, also when sidebar is open
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-04-05 13:48:32 +02:00