Commit Graph

241 Commits

Author SHA1 Message Date
Quentin Gliech 21d04a6781 frontend: fix navigation links by using absolute URLs
Looks like relative links are somewhat broken
2024-05-03 10:36:34 +02:00
Quentin Gliech 9eb49308bb Update snapshots 2024-05-02 10:36:13 +02:00
Quentin Gliech 94cd608f1c Remove the TooltipProvider, which is not needed anymore 2024-04-30 18:27:43 +02:00
Quentin Gliech 4501bfb504 Fix typings post-router upgrade 2024-04-30 16:20:29 +02:00
Quentin Gliech 10d7ca95ae Update copyright headers 2024-04-30 13:33:47 +02:00
Quentin Gliech ee68521792 Hide the displayname edit button if disabled in the config 2024-04-30 13:33:47 +02:00
Quentin Gliech 2976bee2ab Only show email form if the user is allowed to modify emails 2024-04-30 13:33:47 +02:00
Quentin Gliech 08a3b90942 Load the branding from the API instead of hardcoding in the config 2024-04-30 13:33:47 +02:00
Quentin Gliech 49cf6dc5cc Expose the site config in the GraphQL API 2024-04-30 13:33:47 +02:00
Quentin Gliech d178a63281 Apply prettier to all files in the frontend 2024-04-03 12:04:18 +02:00
Quentin Gliech 564bade714 Do not format generated files, as it breaks HMR 2024-04-03 12:04:18 +02:00
Quentin Gliech 9d1d336abd Update snapshots 2024-04-02 09:49:40 +02:00
Quentin Gliech 94f92cb698 Fix the disabled state of links 2024-03-29 19:28:30 +01:00
Quentin Gliech 7807d20866 Update @tanstack/router and fix links 2024-03-29 19:28:30 +01:00
Quentin Gliech 04fb8fe376 Import zod differently to better tree shake it 2024-03-29 19:28:30 +01:00
Quentin Gliech 4a390891f1 Replace i18next backend and detection with our own implementation
This reduces the gzip size of the JS bundle by 10KB
2024-03-29 19:28:30 +01:00
Quentin Gliech a03728743b Bump most frontend dependencies 2024-03-29 19:28:30 +01:00
Quentin Gliech 74582441e2 frontend: upgrade @tanstack/react-router 2024-03-18 18:42:47 +01:00
Michael Telatynski 894602bca1 Render browser icon for compat & browser sessions (#2478)
* Render browser icon for compat & browser sessions

* Use PNGs

* Add support for png resources
2024-03-18 18:41:40 +01:00
Michael Telatynski f543a8bd40 Update snapshots 2024-03-18 17:18:58 +01:00
Michael Telatynski 54f0b2c5be Add scopes to compat session detail view 2024-03-18 17:18:58 +01:00
Michael Telatynski 57c5e8601f Update session details styles to closer match latest Figma (#2439)
Co-authored-by: Quentin Gliech <quenting@element.io>
2024-03-08 14:41:41 +00:00
Quentin Gliech 452f4c17f5 graphql: check that the username is available when creating them
This calls the HS to make sure the username isn't reserved.
This check can be bypassed using the `skipHomeserverCheck` flag on the
`addUser` mutation.
2024-02-29 11:21:24 +01:00
Quentin Gliech 4e682793b1 Share the device card between the frontend and the backend 2024-02-27 17:56:20 +01:00
Quentin Gliech bfc088bdd0 Make the session list way better 2024-02-27 17:56:20 +01:00
Quentin Gliech f5e47edbb9 Remove unused SelectableSession component 2024-02-27 17:56:20 +01:00
Quentin Gliech 879a44ed99 Implement the user profile edit modal 2024-02-27 13:46:36 +01:00
Quentin Gliech 696dd2d910 Fix dialogs being blurry and not scrollable
This positions dialogs with a flexbox layout, which avoids the weird
bluriness due to `transform: translate` and allows the dialog to be
scrollable.

It also adds a story which has a long content to test the scrollability.
2024-02-27 12:37:55 +01:00
Quentin Gliech a8d1f151b8 Make the end session button more flexible 2024-02-27 12:23:46 +01:00
Quentin Gliech 9a6439a7c5 Make sure the dummy router finished loading in the test environment 2024-02-27 11:25:01 +01:00
Quentin Gliech f3cbd3b315 Parse User Agents on the backend side (#2388)
* Parse user agents on the server side

* Parse and expose user agents on the backend

* Use the parsed user agent in the device consent page

* Fix the device icon tests

* Fix clippy warnings

* Box stuff to avoid large enum variants

* Ignore a clippy warning

* Fix the requester boxing
2024-02-23 16:47:48 +01:00
Quentin Gliech ed5893eb20 Save which user session created a compat session
This also exposes the user session in the GraphQL API, and allow
filtering on browser session ID on the app session list.
2024-02-21 11:55:58 +01:00
Quentin Gliech e76945372a Make sure we load current session data in route loaders
This means we should almost never see a loading spinner when navigating
2024-02-20 12:08:50 +01:00
Quentin Gliech 800c594276 Set the session pagination to use query parameters
Also reverses the order of the sessions to show the most recent ones first.

Fixes #1497
2024-02-20 12:08:50 +01:00
Quentin Gliech edfcea0419 Make the layout wider on "account" pages
This also fixes a bug where a double "layout" was applied to the not
found pages.

It also sets the layout min height to use 100svh instead of 100vh, so
that it doesn't unecessarily scroll on iOS.
2024-02-19 17:56:06 +01:00
Quentin Gliech 1c000a1fed Make sure the locale fallback works as expected
- Also makes sure that the fallback runs in the backend and is then
   picked up by the frontend
 - and explicitely fallback zh-CN to zh-Hans
2024-02-19 11:43:36 +01:00
Quentin Gliech aefcc3cae2 Move the cross signing reset UI in its own page 2024-02-17 09:48:53 +01:00
Quentin Gliech 0d4b941b43 Make sure all the loader use the abort signal
This makes sure that the loader stops loading when navigating away
2024-02-17 09:48:53 +01:00
Quentin Gliech f10a1c7830 Make sure the error boundary & loading spinner don't suspend
This is done by making it possible to render the GenericError, Layout
and Footer with a `dontSuspend` prop. This then sets the `useSuspense`
to `false` in translations, and sets a default translations in case they
haven't been loaded yet.
2024-02-17 09:48:53 +01:00
Quentin Gliech 017ef2fd43 Revamp the confirmation dialog 2024-02-16 15:11:31 +01:00
Quentin Gliech dd6f1cbc9b Update the email list to match the new design 2024-02-16 15:11:31 +01:00
Quentin Gliech e041f47dfe Replace Jotai with @tanstack/router (#2359)
* Start replacing jotai with @tanstack/router

* Remove jotai completely

* Move the common layout & reimplement the ?action parameter

This also makes sure everything is properly loaded in the route loader,
and we use fragment where it makes sense

* Change the default error component

* GraphQL API: make the sessions fetchable through node(id: ID!)
2024-02-15 17:19:05 +01:00
Quentin Gliech f0f7497d2d Finish replacing jotai-urql with bare urql
Mostly remaining was pagination related stuff & fixing tests
2024-02-15 14:17:20 +01:00
Quentin Gliech 3f90839744 Replace remaining atomWithQuery with urql except paginated lists 2024-02-15 14:17:20 +01:00
Quentin Gliech 0591fbfb2b Replace all GraphQL mutations with urql 2024-02-15 14:17:20 +01:00
Quentin Gliech 1b75b3b185 WIP: start replacing jotai-urql with urql 2024-02-15 14:17:20 +01:00
Quentin Gliech 9e2d761e62 frontend: upgrade to Vite 5 2024-02-09 15:57:11 +01:00
Quentin Gliech 52f8c83e42 Upgrade compound and fix bad focus rings on inputs 2024-02-08 17:54:10 +01:00
Quentin Gliech de22a7f1b4 Fix compound tooltips by adding the missing TooltipProvider to the tree 2024-02-07 17:22:19 +01:00
Quentin Gliech 6c4205dfad Bump most frontend dependencies & fix CSS nesting warning 2024-02-06 15:40:08 +01:00