Rework user selection (#1728)

* Move to new route

* Convert to tailwind

* Basic style

* Add userStore

* nit

* nit

* nit

* Remove app.#setUser

* Route to user-select view

* Mock login

* Use primevue UI components

* handle create new user

* Remove legacy user selection

* Add logout button on side toolbar

* Add username to logout button tooltip

* Add playwright tests

* hide logout button in single user server

* nit
This commit is contained in:
Chenlei Hu
2024-11-28 20:36:41 -08:00
committed by GitHub
parent 541335bb31
commit 9e565154a9
18 changed files with 341 additions and 673 deletions

View File

@@ -431,8 +431,10 @@ export const zSystemStats = z.object({
})
const zUser = z.object({
storage: z.enum(['server']),
migrated: z.boolean(),
users: z.record(z.string(), z.unknown())
// `migrated` is only available in single-user mode.
migrated: z.boolean().optional(),
// `users` is only available in multi-user server mode.
users: z.record(z.string(), z.string()).optional()
})
const zUserData = z.array(z.array(z.string(), z.string()))
const zUserDataFullInfo = z.object({