Rename, hide menu

This commit is contained in:
pythongosssss 2023-12-02 21:27:53 +00:00
parent 924ba2c343
commit 957b0dbbe8
2 changed files with 7 additions and 4 deletions

View File

@ -1318,8 +1318,12 @@ export class ComfyApp {
let user = localStorage["Comfy.userId"]; let user = localStorage["Comfy.userId"];
if (!user || !users[user]) { if (!user || !users[user]) {
// This will rarely be hit so move the loading to on demand // This will rarely be hit so move the loading to on demand
const { UserSelectionDialog } = await import("./ui/userSelection.js"); const { UserSelectionScreen } = await import("./ui/userSelection.js");
const { userId, username, created } = await new UserSelectionDialog().show(users, user);
this.ui.menuContainer.style.display = "none";
const { userId, username, created } = await new UserSelectionScreen().show(users, user);
this.ui.menuContainer.style.display = "";
user = userId; user = userId;
localStorage["Comfy.userName"] = username; localStorage["Comfy.userName"] = username;
localStorage["Comfy.userId"] = user; localStorage["Comfy.userId"] = user;
@ -1367,7 +1371,6 @@ export class ComfyApp {
async setup() { async setup() {
await this.#setUser(); await this.#setUser();
await this.ui.settings.load(); await this.ui.settings.load();
this.ui.menuContainer.style.display = "";
await this.#loadExtensions(); await this.#loadExtensions();
// Create and mount the LiteGraph in the DOM // Create and mount the LiteGraph in the DOM

View File

@ -3,7 +3,7 @@ import { $el } from "../ui.js";
import { addStylesheet } from "../utils.js"; import { addStylesheet } from "../utils.js";
import { createSpinner } from "./spinner.js"; import { createSpinner } from "./spinner.js";
export class UserSelectionDialog { export class UserSelectionScreen {
async show(users, user) { async show(users, user) {
// This will rarely be hit so move the loading to on demand // This will rarely be hit so move the loading to on demand
await addStylesheet(import.meta.url); await addStylesheet(import.meta.url);