diff --git a/web/scripts/app.js b/web/scripts/app.js index 709ce6818..992242cf5 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -1318,8 +1318,12 @@ export class ComfyApp { let user = localStorage["Comfy.userId"]; if (!user || !users[user]) { // This will rarely be hit so move the loading to on demand - const { UserSelectionDialog } = await import("./ui/userSelection.js"); - const { userId, username, created } = await new UserSelectionDialog().show(users, user); + const { UserSelectionScreen } = await import("./ui/userSelection.js"); + + this.ui.menuContainer.style.display = "none"; + const { userId, username, created } = await new UserSelectionScreen().show(users, user); + this.ui.menuContainer.style.display = ""; + user = userId; localStorage["Comfy.userName"] = username; localStorage["Comfy.userId"] = user; @@ -1367,7 +1371,6 @@ export class ComfyApp { async setup() { await this.#setUser(); await this.ui.settings.load(); - this.ui.menuContainer.style.display = ""; await this.#loadExtensions(); // Create and mount the LiteGraph in the DOM diff --git a/web/scripts/ui/userSelection.js b/web/scripts/ui/userSelection.js index 4bd0459ec..5ef2010a5 100644 --- a/web/scripts/ui/userSelection.js +++ b/web/scripts/ui/userSelection.js @@ -3,7 +3,7 @@ import { $el } from "../ui.js"; import { addStylesheet } from "../utils.js"; import { createSpinner } from "./spinner.js"; -export class UserSelectionDialog { +export class UserSelectionScreen { async show(users, user) { // This will rarely be hit so move the loading to on demand await addStylesheet(import.meta.url);