Simon Ser
2ac7be6218
state: add isReceiptBefore
2022-02-12 10:21:11 +01:00
Simon Ser
5f8cd976e6
keybindings: fix error on alt+h
...
Fixes the following JS error:
TypeError: e.setReceipt is not a function
2022-02-12 10:05:58 +01:00
Simon Ser
fbc42b6dab
components/app: move lastErrorID declaration down
...
Move it right before App, rather than drown in-between unrelated
functions.
2022-02-11 21:17:35 +01:00
Simon Ser
dc398baa3b
components/app: stop updating prevReadReceipt on READ message
...
prevReadReceipt is used for the unread marker. Let's not update it
before the user switches the current buffer.
2022-02-11 21:09:11 +01:00
Simon Ser
6a9a8e88f1
store: fix no-op read receipt update detection
...
If the old and new times are equal, the update is a no-op.
2022-02-11 21:07:49 +01:00
Simon Ser
f47d93af8a
Don't fetch backlog before read receipt
2022-02-11 21:02:34 +01:00
Simon Ser
fce0936c20
components/app: introduce getReceipt
2022-02-11 20:59:31 +01:00
Simon Ser
0636544c40
components/app: close notifications when receiving READ message
2022-02-11 19:32:30 +01:00
Simon Ser
7c6f334dbf
components/app: close notifications when switching buffer
2022-02-11 19:32:30 +01:00
Simon Ser
7ddd783150
components/app: make showNotification return null on error
...
We'll do more involved stuff with notifications soon, and don't
want to deal with buggy notification objects.
2022-02-11 19:32:30 +01:00
Simon Ser
bb42ff6a07
components/app: include server ID in notification tags
2022-02-11 19:32:30 +01:00
Simon Ser
db0ef39c6b
Add support for soju.im/read
2022-02-11 19:32:26 +01:00
Simon Ser
77f54080e7
Make delivery receipts follow read receipts
...
If a message has been read, it's been delivered.
Fixes #23 at least partially.
References: https://todo.sr.ht/~emersion/gamja/23
2022-02-11 19:29:55 +01:00
Simon Ser
065b3f21fc
Refactor receipts
...
They are now saved in the buffer store to allow for proper server
separation.
2022-02-11 19:29:55 +01:00
Simon Ser
d2bcea8c86
Introduce isMessageBeforeReceipt
2022-02-11 16:37:58 +01:00
Simon Ser
3d81466788
components/app: introduce receiptFromMessage
2022-02-11 16:30:46 +01:00
Simon Ser
f2923452c1
store: debounce buffer store saves
2022-02-11 16:24:32 +01:00
Simon Ser
39c36e7a7b
Fix unread marker going back
...
Receipts must never go back in time.
Fixes: c428e504fe
("Don't show unread marker for outgoing messages")
2022-02-11 16:06:06 +01:00
Simon Ser
e91b044134
components/app: make switchBuffer state changes atomic
...
Instead of calling App.setBufferState inside the App.setState
callback invoked when the update is done, call State.updateBuffer.
2022-02-11 15:48:56 +01:00
delthas
4cb3abfa72
components/connect-form: make the server password field password-typed
2022-02-11 12:58:26 +01:00
Simon Ser
0063a5a372
Set min node version in package.json
...
v14.13.0 is required for CommonJS named imports to work properly.
2022-02-10 14:46:42 +01:00
Дамјан Георгиевски
1142145c6d
fix ping after reconnect
...
client.setPingInterval was only called once in app.connect(),
but client.disconnect() disables it, and the ping timer is never again set,
even though the client can reconnect.
the change passes the ping time as a parameter to the client, and the
client calls setPingInterval() after a successful WS open event.
2022-02-04 15:54:23 +01:00
Simon Ser
f465e24adf
components/buffer-header: fix dead space above description
2022-02-04 14:38:28 +01:00
Simon Ser
7f7a7c1aac
components/buffer-list: remove pointless temporary variable
2022-02-04 14:32:29 +01:00
Simon Ser
e1bbe34ff2
state: add bouncerNetworks helpers
2022-02-04 14:22:50 +01:00
delthas
fab42ba2ee
commands: add password param to /join
2022-02-02 20:45:18 +01:00
Simon Ser
9f93e200ed
commands: add comment param to /kick usage
2022-01-31 18:30:48 +01:00
Simon Ser
bd48f36ade
lib/irc: add missing Isupport.chanModes
...
It was called by forEachChannelModeUpdate, but wasn't implemented.
2022-01-31 18:24:34 +01:00
xse
393fd93253
components/buffer: use browser locale for date-separator
2022-01-14 23:26:05 +01:00
Simon Ser
a0f8f1f52f
components/buffer: fix INVITE link
...
It was throwing a TypeError.
2022-01-10 10:32:37 +01:00
Simon Ser
5d6de11a4c
commands: simplify /who usage string
...
As per https://modern.ircdocs.horse/#who-message
2022-01-09 19:30:01 +01:00
Simon Ser
6692ed0035
components/help: use bold for command name only
2022-01-09 19:28:23 +01:00
Simon Ser
5e34067d38
components/help: remove "/" keybinding, document middle mouse click
2022-01-09 19:20:44 +01:00
Isaac Freund
690845c2af
Better handle long topics on small screen sizes
...
Currently long topics will cause the buffer header to take up an
arbitrarily large percentage of the screen on mobile. Additionaly, long
words like URLS are not broken and may cause the buffer header to extend
outside of the viewport in the x direction, rendering the buffer content
unreadable.
This patch fixes these two issues by limiting the buffer header size to
20% of the viewport and breaking long words such as URLs if they would
overflow.
Fixes: https://todo.sr.ht/~emersion/gamja/129
2022-01-07 16:02:33 +01:00
Noelle Leigh
0b59cf92b9
Display persistant command input on server buffer
...
This commit changes the composer to not be read-only on the server
buffer, which tells the user that they can send commands from that view.
On the server buffer, the placeholder is changed to
"Type a command (see /help)", which indicates to the user that this buffer
only accepts commands, and gives them a hint for how to learn what
commands are available.
Implements: https://todo.sr.ht/~emersion/gamja/38
2021-12-21 10:44:24 +01:00
Simon Ser
b11f58b975
state: fix prefix() call in MODE handler
...
Lost during a refactoring.
Fixes: ab3d4dd661
("Refactor ISUPPORT handling")
2021-12-16 23:37:33 +01:00
Simon Ser
4704e0f12f
ci: fix deploy skip
2021-12-16 23:14:10 +01:00
Rafael Castillo
43f1329fb0
Add away command
2021-12-13 17:35:41 +01:00
Simon Ser
4cabae89ff
lib/irc: add CapRegistry
2021-12-10 15:34:51 +01:00
Simon Ser
f6895fed32
Add reconnect button
2021-12-07 13:39:02 +01:00
Simon Ser
fc93a8cef5
state: fix server bouncerNetID
...
Ooops.
2021-12-07 13:37:14 +01:00
Simon Ser
f3d38859d3
Move isBouncer props to server state
...
Avoids having to pass this around.
2021-12-07 13:16:07 +01:00
Simon Ser
f81c564d23
Implement exponential backoff for reconnections
...
Closes: https://todo.sr.ht/~emersion/gamja/118
2021-12-07 13:05:42 +01:00
Simon Ser
ab3d4dd661
Refactor ISUPPORT handling
...
Add a helper class to parse ISUPPORT tokens. Instead of having
manual ISUPPORT handling all over the place, use pre-processed
values.
2021-12-07 12:09:10 +01:00
Simon Ser
31b293fa03
lib/client: use Error objects for error events
2021-12-06 23:09:30 +01:00
Simon Ser
f9ec578fce
Handle FAIL ACCOUNT_REQUIRED
2021-12-06 22:54:15 +01:00
Simon Ser
305f510501
Read nickname from RPL_WELCOME
...
References: https://github.com/ircdocs/modern-irc/pull/146
2021-12-06 17:55:47 +01:00
Simon Ser
05f7c6e9fe
Add Client.join, show join errors in popup
2021-12-04 17:44:23 +01:00
Simon Ser
fc8aa30756
lib/client: add generic error handling to roundtrip()
2021-12-04 17:22:36 +01:00
Simon Ser
8c8bd43638
lib/client: introduce IRCError
2021-12-04 17:05:34 +01:00