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

@@ -42,6 +42,9 @@ export class ComfyApi extends EventTarget {
* The current client id from websocket status updates.
*/
clientId?: string
/**
* The current user id.
*/
user: string
socket: WebSocket | null = null
@@ -49,7 +52,6 @@ export class ComfyApi extends EventTarget {
constructor() {
super()
// api.user is set by ComfyApp.setup()
this.user = ''
this.api_host = location.host
this.api_base = location.pathname.split('/').slice(0, -1).join('/')