Commit graph

542 commits

Author SHA1 Message Date
Reto Brunner 3259ac596d client: fix all new linter errros 2024-05-04 12:29:57 +02:00
Reto Brunner 3fbbc39cd6 client/commands: statically import commands
Dynamic imports won't work very well with modules and we don't
really need them, it's just there to save us an import statement.

Let's flip this to a static version.
2024-05-04 12:29:57 +02:00
Reto Brunner 36cb75ee99 NetworkForm: disable unsafe return lints for now
The NetworkForm type is wrong, hence the compiler can't infer the type.
This needs quite some changes, so for now we just turn the linter off
for the 2 watch functions.
The whole component is too dynamic to fix easily.
2024-04-21 15:11:52 +02:00
Reto Brunner 91ac363cc6 components/MessageTypes/errors: fix eslint errors
This makes the code somewhat ugly, but to properly fix we need
to enforce the needed fields
2024-04-21 15:11:52 +02:00
Reto Brunner 6c9d2c36a1 components/Message: fix eslint errors 2024-04-21 15:11:52 +02:00
Reto Brunner 6241eed8f4 client/ImageViewer: fix types and guard against undefined 2024-04-21 15:11:52 +02:00
Reto Brunner 0067c30273 Split sort event
The sort event bundled networks and channels for no reason at all.
They share none of the actual logic, so combining them just makes
the typing poor but serves no benefit.
2024-04-21 15:11:51 +02:00
Reto Brunner 194b4e1a2f import fix 2024-04-21 15:11:51 +02:00
Reto Brunner 88c8830a17 chatuserlist 2024-04-21 15:11:51 +02:00
Reto Brunner b67e4699f5 wip sharedmsg in client 2024-04-21 15:10:45 +02:00
Reto Brunner 68ba13ca12 wip: searchquery 2024-04-21 15:10:45 +02:00
Nachtalb daabb76781
Add shorcut to navigate between channels with undread msgs 2024-01-27 22:50:10 +01:00
Reto Brunner 071ad96d9b Merge branch 'signin' 2023-06-25 10:15:21 +02:00
Reto Brunner c43a47afc1 Merge branch 'applePush' 2023-06-24 14:31:23 +02:00
Reto Brunner c5326e8795 Sign in: use v-model
There's no need to mess with DOM elements, we can use the normal
v-model approach for both username and password
2023-06-18 15:20:08 +02:00
Reto Brunner 7a9ddc01e1 settings: make missing_field msg descriptive
The "missing_fields" error triggers on any missing field (duh).
"Please enter a new password" is not a sensible string for that.
2023-05-23 08:24:20 +02:00
Reto Brunner 8f08cf3d0b client: fix password change input
The TS rewrite dropped the form that was expected to be passed
as props.
That lead to the password change being borked, as the fields
were always set to "null".
We don't need a form, can just use refs here.
2023-05-23 08:18:20 +02:00
Reto Brunner 9388960497 linkPreview: Pass channel prop
Else the update logic doesn't work and we don't show
the next / prev buttons
2023-05-15 09:38:09 +02:00
Reto Brunner 7bce779254 Remove unused code 2023-05-15 09:37:40 +02:00
Reto Brunner 12d9ef34f0 Client/Settings: Remove bogus settings-form prop
As is this has no effect, other than looking weird in html:
<div settings-form="[object HTMLFormElement]"><div><h2>Native app</h2>
2023-04-29 11:52:34 +02:00
Lenore ba1a4206a6 fix motd display to match settings 2023-04-25 00:49:57 +02:00
Reto Brunner 21d1dbaad6 Unbreak nick colors for existing themes
https://github.com/thelounge/thelounge/pull/4649 broke existing
themes by removing the colored-nicks class from chat.

Considering that we don't bump the major version, keep backwards
compatibility for now
2023-04-17 01:11:35 +02:00
Reto Brunner e25c296901 push: remove iOS warning
iOS 16.4 introduced webpush, we can get rid of the special case
in our settings panel.
2023-03-28 10:00:56 +02:00
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 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
aab12345 8b1a4f72fa Add password param to /join docs 2022-12-29 13:12:15 +01:00
Pavel Djundik 502780c5a3 Fix sidebar swipe flicker after letting go 2022-12-23 10:50:20 +02:00
Reto 073a38ef1e
Fix previous-source calculation (#4656)
CondensedMessage is a proxy object, outside of the templates
we need to unwrap it manually
2022-12-17 13:59:07 -08:00
Reto Brunner f55f772659 style: Put user colors into the smallest possible scope
The only thing that cares about user colors is the user component.
Putting a class value on the chat component seems to be the wrong
place.

This also allows us to remove various css selectors so that we
don't need to be that specific.
After all whatever has that class needs to be colored, we don't
care where it is.
2022-11-27 16:04:56 +01:00
Reto Brunner d34b58811a Merge branch 'search' 2022-11-24 09:34:24 +01:00
Reto Brunner 83e11b0143 Search: Clear earlier searches when a new one is executed
Fixes: https://github.com/thelounge/thelounge/issues/4637
2022-11-15 18:50:52 +01:00
Reto Brunner 51c9ce078d Search: fix off by one offset error
Offset is eventually passed to sqlite as an OFFSET clause.

This works as follows:

sqlite> select num from seq limit 5 offset 0;
┌─────┐
│ num │
├─────┤
│ 1   │
│ 2   │
│ 3   │
│ 4   │
│ 5   │
└─────┘

sqlite> select num from seq limit 5 offset 5;
┌─────┐
│ num │
├─────┤
│ 6   │
│ 7   │
│ 8   │
│ 9   │
│ 10  │
└─────┘

However, the code currently emits a request for offset + 1, which ends
up skipping a message

sqlite> select num from seq limit 5 offset 5+1;
┌─────┐
│ num │
├─────┤
│ 7   │
│ 8   │
│ 9   │
│ 10  │
│ 11  │
└─────┘
2022-11-15 18:50:52 +01:00
Reto 53f6041f42
SearchResults: remove dead code (#4639)
Nachtalb put some infra in place that was never actually working.
It errors out when a user clicks on a message.

Remove the offending code, but keep it all in place so that we
can improve on it.
2022-11-12 22:34:41 -08:00
Reto Brunner dca202427a SearchResults: Fix search progess upon search
When we hit doSearch, we always reset the offset value to 0,
meaning we always hit the conditional (!0) and always set the
messageSearchInProgress flag to undefined.
This is wrong, we do want to set this flag when we initiate a search.
2022-11-12 23:14:53 +01:00
Reto Brunner 6b617f893d SearchResults: remove computed search prop
It is only used in one location, and not from the template.
In other words we should inline it to make the code simpler.
2022-11-12 23:14:53 +01:00
Reto 0fa203569a
connect: Trim white space from user input fields (#4623)
Fixes: https://github.com/thelounge/thelounge/issues/4521
2022-09-07 20:25:08 -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 437dd1667d
Improve setings menu responsiveness 2022-04-29 19:30:35 -07:00
Max Leiter 24bdc46b0a
Settings: move nav to left side on larger screens 2022-04-29 19:27:52 -07:00
Max Leiter 5a383814f6
Settings: nav style tweaks 2022-04-29 19:27:51 -07:00
Max Leiter 1f39e078f4
Settings: change general icon from paintbrush to desktop 2022-04-29 19:27:51 -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
Val Lorentz d145fb3738
Re-add missing space between timestamp and nick (#4492)
It was accidentally removed by 027c5b4ff7
2022-02-21 12:38:50 -08:00
Val Lorentz 027c5b4ff7 Remove leading space when copying multiple messages 2022-02-14 19:41:34 +01:00