Commit graph

1429 commits

Author SHA1 Message Date
Max Leiter c6a202d6ab
Merge pull request #4686 from thelounge/decoupleServer
Decouple server
2023-02-26 17:20:20 -08:00
Maxime Poulin 2ce374fe85 Fix uploader mount/unmount lifecycle
Currently, in `ChatInput.vue` we call `upload.abort()` which removes the event listeners, which are never added back. This effectively permanently disable uploads if the user navigates away to Settings or any other non-chat pages, and back.

Moves the binding to `mounted()` so that they're properly rebound when a chat window is in view, and also adds an `unmounted()` for clarity.

This should also fix an edge case if the page opens up on a non-chat page and there was never a ChatInput to unbind it, such as login page or add network pages.
2023-02-05 22:32:12 -05:00
Reto Brunner b7540b5827 Move condensedTypes to shared/
This decouples the rest of the server from the client
2023-01-30 09:14:40 +01:00
Reto Brunner e305e23c43 client: use the versions in shared/ where applicable 2023-01-30 09:14:40 +01:00
Reto Brunner 7f3ac62e0d Merge branch 'searchFixTakeTwo' 2023-01-22 15:22:32 +01:00
Reto Brunner 0ebc3a574c search: ignore searchResults if it isn't the active query
Prior to this, the search is still racy but one tends to notice
this only when the DB is large or network is involved.
The user can initiate a search, get bored, navigate to another chan
issue a different search.

Now however, the results of the first search come back in and
hilarity ensues as we are now confused with the state.

To avoid this, keep track of the last search done and any result
that comes in that isn't equal to the active query is garbage and
can be dropped.
2023-01-08 11:41:09 +01:00
Reto Brunner e597e75847 allow away and back to be collapsed
This means we also apply the collapsing to normal queries,
which might also collapse other things like joins / quits
which may be undesired by some

Fixes: https://github.com/thelounge/thelounge/issues/4583
2022-12-30 13:35:38 +01:00
Reto Brunner 982816ff20 store: addMessageSearchResults shouldn't accept null
It makes no sense to emit a add mutation with null, so let's
forbid it.
2022-11-27 14:06:14 +01:00
Reto Brunner 8204c3481a search: fix order of result merging
During a search, we get the results from oldest --> newest.
When we hit the more button, we get the results of the second batch
in the same order.
However, logically to the first batch everything is older, so we
need to prepend it to the result array, not
append.

msg  DB  logical ID
A    3     5
B    2     4
C    1     3

D    3     2
E    2     1
F    1     0
2022-11-27 14:06:14 +01:00
Reto Brunner dfb4217167 remove VueApp from router
Nothing actually depends on the vue app being monkey patched onto
the router, so let's get rid of it.
2022-11-22 21:27:19 +01:00
Reto Brunner 0765d209f2 keybinds: Fix invalid return
Mousetrap doesn't take an async function.
It either accepts False (stop key propagation) or any other
value (bubble up the event)
2022-11-16 06:50:56 +01:00
Antonio Mika 117c5fa3fd
Added client type checking to webpack (#4619)
* Added client type checking

* Fixed client-side typescript issues
2022-08-23 00:26:07 -07:00
Reto Brunner d6e1af0e7d Fix regex escape for prefix patterns
Our regex escape function escapes proper regexes, however
it isn't meant to be shoved into a char class via string interpolation.

We need to also escape '-' if we do so.
2022-07-04 10:08:23 +02:00
Max Leiter 80f65c5b72
Remove uploading event listeners on ChatInput unmount (#4600) 2022-06-28 13:31:55 -07:00
Max Leiter dd05ee3a65
TypeScript and Vue 3 (#4559)
Co-authored-by: Eric Nemchik <eric@nemchik.com>
Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
2022-06-18 17:25:21 -07:00
Max Leiter 6f64243671
Settings: rename user settings -> account 2022-04-29 19:27:51 -07:00
Max Leiter 31b67b7786
git push --set-upstream origin maxleiter/tabbedSettings 2022-04-29 19:27:50 -07:00
Max Leiter bdd6e71049
Autocomplete: update to @textcomplete package and close on blur (#4493)
* Autocomplete: update to @textcomplete package
* Autocomplete: close on blur
2022-04-11 18:11:43 -07:00
Max Leiter 551f85ea51
Fix /collapse and /expand from interacting with the server in public mode (#4488)
Reported by xnaas on IRC
2022-02-18 12:21:17 -08:00
Max Leiter 4be9a282fa
Add the option to mute channels, queries, and networks (#4282)
Co-authored-by: Reto <reto@labrat.space>
2022-02-10 17:56:17 -08:00
Reto d228a8c4f4
Bump most deps (#4453) 2022-02-09 15:27:34 -08:00
Reto Brunner e999171f29 Mentions window: filter list when we part a chan
Should some other client part a chan, then we need to clean
up the list from the mentions window in case it's open in ours.
2021-12-29 16:46:16 +01:00
Reto Brunner 26c2562124 upload: improve error message 2021-12-27 02:11:56 +01:00
itsjohncs 763047889d Remove uses of window.event.
window.event is a deprecated global that's set to the currently
dispatched event.

- Opened and closed mentions box by clicking its icon in the top bar
- Left and right clicked on an inline channel name and saw context menu
  open both times
- Two-finger swiped on iOS and saw channel change
- Long-touched and dragged channel in network list on iOS and reordered
  the list successfully
2021-12-20 15:34:28 -08:00
sfan5 1d5291929c
Add context menu when clicking inline channel name (#4376) 2021-11-29 15:35:26 -08:00
Max Leiter 40a5ee70b6
Disable /search and hide help item if searching is disabled 2021-11-17 20:23:51 -08:00
Max Leiter 3cec329e3b
Merge branch 'master' into fix-search-query 2021-11-15 12:42:56 -08:00
itsjohncs 393d4fe591 Enable Android's context menus in network list.
After #4326 Android users could no longer long-touch to bring up the
context menu for channels in the network list. Now they can again.
2021-10-30 02:06:35 -07:00
Max Leiter 1d33e0195a
Merge pull request #4324 from itsjohncs/gestures-next-channel
Two-finger swipe now switches windows (#3901)
2021-10-12 15:53:54 -07:00
Noah van der Aa 9a0ba1da6c
Add keyboard shortcut for help screen (#4315)
* Add keyboard shortcut for help screen

* Make escape key go back to the previous screen

* Use key instead of which

* Use router for navigating back

* Use alt instead of cmd/ctrl
2021-10-10 20:48:28 -07:00
itsjohncs ebe39b26dc Two-finger swipe now switches windows (#3901)
The Alt+Up and Alt+Down keybindings on Desktop did not have an
equivalent for Mobile users. Now a two-finger swipe left on a
touchscreen is equivalent to Alt+Up (similarly swipe right is
equivalent to Alt+Down).
2021-10-07 13:39:19 -07:00
Max Leiter beb5530c65
Revert "Support animated webp images" (#4287)
This reverts pull/4186.
2021-08-31 12:27:43 -07:00
Reto 8fcd079204
Properly track user modes for context menu (#4267)
* properly track user modes for context menu

The RPL_ISUPPORT response contains a PREFIX element, which not only tracks the
prefix chars ("@", "+" etc) but also their corresponding mode chars (+O, +v)
This commit changes the context menu to not rely on a hardcoded list but rather
user the one given in the prefix response by the server.

Co-authored-by: Max Leiter <maxwell.leiter@gmail.com>
2021-07-21 00:30:07 -07:00
JeDaYoshi 0a6c33af57
Create a message for search disabled error 2021-07-07 23:00:44 +00:00
JeDaYoshi 162b42d9b0
Apply changes to getCommands/search 2021-07-07 22:12:28 +00:00
JeDaYoshi 0d839c501e
Optimise commands processing 2021-07-06 15:43:02 +00:00
Max Leiter 11ba27d809
Update emoji map 2021-07-06 01:31:24 -07:00
JeDaYoshi 372d74db69
Add warning for HTTPS requirement on notifications 2021-07-04 20:22:49 +00:00
JeDaYoshi bbda392c3d
Move clientCommands to client
This approach automatically imports the command names.
2021-07-04 02:15:33 +00:00
JeDaYoshi 058b3155d0
Display error when /search is not enabled
Fixes thelounge/thelounge#4273
2021-07-03 22:53:45 +00:00
Max Leiter fc6c916e7c
Merge pull request #4213 from Nachtalb/na/search-command
Add new "/search query" command to open the search window
2021-05-25 21:31:17 -07:00
Max Leiter ad8a315cf9
Merge pull request #4206 from Nachtalb/na/fill-inputhistory-onload
Fill inputhistory on channel load and more message load
2021-05-25 21:30:47 -07:00
Nachtalb 24a738d521
Add new command to open the search window 2021-05-06 03:22:09 +02:00
Nachtalb b95643e1a6
Allow text drag & drop into text fields
We only have to stop the defualt behaviour in case we drag & drop a file (for uploading)
2021-05-06 02:48:07 +02:00
Nachtalb 04cf2277d9
Prevent possible error when findChannel can't find the wanted channel
Using ?. (optional chaining) requires ecma version 2020 as it is fairly new. Webpack / Babel can handle it.
2021-05-05 18:09:18 +02:00
Max Leiter 26a38b12ab
Merge pull request #4197 from Nachtalb/richrd/message-search
Message Search: Re-Rebase + Fixes / Adjustments
2021-05-03 16:18:15 -07:00
Nachtalb 11aa52687c
Fill inputhistory on channel load and more message load 2021-05-01 01:46:55 +02:00
Nachtalb bd4e821614
Improve readability of more.js 2021-05-01 01:36:44 +02:00
Nachtalb ef710a2631
Revert obsolete changes to vuex store 2021-04-30 01:53:07 +02:00
Nachtalb ddff3ac162
Stay in chan during search by searching on /chat-:id/search 2021-04-30 01:53:07 +02:00