Richard Hansen
2d3418caf7
chat: Deprecate the chat
export from the client-side chat module
2022-05-06 20:43:55 -04:00
Richard Hansen
e0f28cfe86
chat: Move cookie pref handling to chat init in chat.js
...
It's unclear why this logic was previously triggered by connection
state changes, but it doesn't make sense for it to be there.
2022-05-06 20:41:13 -04:00
Richard Hansen
a5c729af32
chat: Move chat init to chat.js
2022-05-06 02:54:34 -04:00
Richard Hansen
8d3a6e5ef9
chat: Move chat message handling to chat.js
2022-05-06 02:54:34 -04:00
Richard Hansen
870191f622
chat: Move Alt-C handling to chat.js
2022-05-06 02:54:34 -04:00
Richard Hansen
59848efc9b
chat: Delete non-functional Alt-C shortcut handler
2022-05-06 02:54:34 -04:00
Richard Hansen
a1388b7876
chat: Move chat-specific option processing to chat.js
2022-05-06 02:54:34 -04:00
Richard Hansen
1cbba4ea3a
chat: New hide
method to completely hide chat
2022-05-06 02:54:34 -04:00
Richard Hansen
8ae5f25075
chat: Make sure the icon is visible when minimizing
2022-05-06 02:54:34 -04:00
Richard Hansen
b830ed9744
chat: Rename hide
method to reduce
...
It doesn't hide: If sticky, it unsticks. Otherwise, it minimizes.
2022-05-06 02:54:34 -04:00
Richard Hansen
f7d7d89874
chat: Move click handlers to chat.js
2022-05-06 02:54:34 -04:00
Richard Hansen
6bf8142221
chat: Translate newly created message entries
2021-11-01 04:56:46 -04:00
Richard Hansen
51907015ed
chat: Fix gritter duration
2021-11-01 01:54:29 -04:00
Richard Hansen
23f963c9fe
chat: Improve name mention detection
2021-11-01 01:54:29 -04:00
Richard Hansen
9fbd2e5c3d
chat: New chatSendMessage
client-side hook
2021-11-01 01:54:28 -04:00
Richard Hansen
4c2f7f9a11
chat: Rename userId
to authorId
, userName
to displayName
2021-11-01 01:54:28 -04:00
Richard Hansen
0f47ca9046
chat: Plumb message object end to end
...
This will make it possible for future commits to add hooks that allow
plugins to augment chat messages with arbitrary metadata.
2021-11-01 01:54:28 -04:00
Richard Hansen
f1f4ed7c58
chat: Allow chatNewMessage
hook to control rendering
2021-11-01 01:54:28 -04:00
Richard Hansen
2597b940f4
chat: Give chatNewMessage
hook access to the raw message object
2021-11-01 01:54:28 -04:00
Richard Hansen
caac4bf711
chat: Promisify addMessage()
2021-11-01 01:54:28 -04:00
Richard Hansen
3f7f629eeb
chat: Scroll down after the chatNewMessage
hook finishes
2021-11-01 01:54:28 -04:00
Richard Hansen
195a6bd81b
chat: Move click handler setup to init()
2021-11-01 01:54:28 -04:00
Richard Hansen
4ceb3ca4c8
Chat: Allow Shift-Enter to insert a newline
2021-07-19 23:44:33 +02:00
Richard Hansen
cf86ae8b63
Chat: Use KeyboardEvent.key
instead of deprecated .which
2021-07-19 23:44:33 +02:00
Richard Hansen
d01b593d3c
chat: Ensure that ctx.text
is interpreted as HTML
2021-04-11 06:20:29 +02:00
Richard Hansen
a3a0ff7bc1
chat: Use jQuery to build the chat message DOM object
...
This reduces the likelihood of accidentally introducing an XSS
vulnerability.
2021-04-11 06:20:29 +02:00
Richard Hansen
74554d36a5
chat: Allow chatNewMessage
hook to modify more values
2021-04-11 06:20:29 +02:00
webzwo0i
a796811558
escape userId before setting it as HTML attribute
2021-04-07 23:29:27 -04:00
John McLear
996a2d86dd
lint: chat ( #4573 )
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-23 16:18:28 -05:00
Richard Hansen
8e5fd19db2
lint: Run eslint --fix
on src/
2020-11-24 20:06:12 +00:00
Richard Hansen
7df3ded66f
lint: Put opening brace on same line as function
...
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:
const x = function ()
{
// ...
};
to become:
const x = ()
=> {
// ...
};
which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen
a712ce457d
gritter: Treat strings as text, not HTML
...
This forces users to use jQuery or DOM objects if they want
formatting, which helps avoid XSS vulnerabilities.
2020-10-20 10:01:49 +01:00
John McLear
40f36d7eb5
Tests: ShowChat fix ( #4049 )
...
Resolves https://github.com/ether/etherpad-lite/issues/3541
2020-05-28 15:18:13 +01:00
Sebastian Castro
b06324ad80
css: improve gritters
...
- have two containers, one of the top, on of the bottom;
- remove gritting chat message when opening the chat.
2020-04-19 03:03:44 +02:00
Sebastian Castro
3e12b6d132
chat: fix coloring with dark background, and scrolling chattext when new message come in
2020-04-19 03:03:44 +02:00
Sebastian Castro
cbc6304243
css: add chat animation on opening
2020-04-19 03:03:44 +02:00
Sebastian Castro
9497db89c9
css: fix popup broken by new animation
...
fix connectivity
fix chat and users
2020-04-19 03:03:44 +02:00
Sebastian Castro
a482a94fb8
css: improve gritter
...
- rename DOM wrapper because is was blacklisted by some ad blocker
- make the template and the lib to add gritter more simple (remove unused
option, make template simpler)
- add style for gritter error message
2020-04-19 03:03:44 +02:00
Sebastian Castro
5fd6aeeea6
css: refactor element positioning
...
No more javascript to change css properties
Remove a number of useless tables
Try to stop positioning elements with absolute, but use flex-boxes instead
Adds comment to pad template, and move popups and chatbox inside editorcontainerbox (so absolute positioning is straightforward)
Make the design more consistent: always use base color, font-family and font-size. USe relative font size if necessary (.9rem instead of 11px for example)
Remove two columns in the popups, just use one column
Remove css meant to support old browser (like -webkit-box-shadow, -moz-box-shadow). Those css rules are quite common now, and If we want to support very old browser, we should use clean-css or other tools to add them automatically
2020-04-19 03:03:44 +02:00
John McLear
25bf460ac6
chat: in addMessage(), be tolerant when userId is missing
...
For whatever reason (a bug, a database corruption, ...) the userId field in
"msg" can sometimes be missing.
In this case, let's be defensive, use "unknown" as userId and issue a warning
in the console, instead of crashing the client.
Fixes #3731 (really a patch, the underlying issue is still present)
2020-03-30 22:15:51 +02:00
Neil Oosten
7a999ee398
hooks: allow to set the duration of the gritter notification when a new chat message arrives
...
This is done adding a new "duration" parameter to the chatNewMessage() client
side hook.
2020-03-27 02:39:29 +01:00
muxator
dc7e49f89d
Remove trailing whitespaces
...
Hoping to minimize future diffs. Not touching vendorized libraries.
2019-04-16 00:34:29 +02:00
John McLear
c903cb3925
fix alt c and escape
2015-05-06 00:32:36 +01:00
John McLear
35948989b3
make Alt C and Alt F9 and Escape work from anywhere
2015-03-31 13:45:11 +01:00
John McLear
19e83d5405
much better chat focus toggle behavior
2015-03-26 16:58:13 +00:00
John McLear
428b547d24
alt c to focus on chat and gritter and chat both now work with aria
2015-03-26 16:44:22 +00:00
John McLear
b216f9271b
should be final logic for chatandusers
2015-02-09 19:11:35 +00:00
John McLear
5245d2b797
and even mroe polish
2015-02-09 18:36:11 +00:00
John McLear
8c6507e78c
more styling stuff
2015-02-09 18:01:45 +00:00
John McLear
7adcd5cba4
cleaner fix for queue issue
2015-02-08 14:34:48 +00:00