From 248e28412a16234582a92203952f232e07c9c1a0 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Fri, 3 Apr 2026 15:43:09 +0800 Subject: [PATCH] wip(ui-server-auth): basic ui, not yet finalized --- apps/stage-pocket/src/App.vue | 1 + apps/stage-tamagotchi/src/renderer/App.vue | 1 + .../src/renderer/pages/index.vue | 4 +- apps/stage-web/src/App.vue | 1 + apps/stage-web/src/pages/auth/sign-in.vue | 71 ++++--- apps/stage-web/tsconfig.json | 2 + apps/ui-server-auth/src/App.vue | 2 + .../src/components/auth-notice.vue | 149 +++++++++++++++ .../composables/electron-callback.shared.ts | 64 +++++++ .../src/composables/electron-callback.test.ts | 54 ++++++ .../src/modules/sign-in.test.ts | 76 ++++++++ apps/ui-server-auth/src/modules/sign-in.ts | 76 ++++++++ .../src/pages/electron-callback.vue | 176 +++++++++++++++++- apps/ui-server-auth/src/pages/sign-in.vue | 89 ++++++++- apps/ui-server-auth/vitest.config.ts | 14 ++ .../src/components/auth/LoginDrawer.vue | 19 +- .../src/components/auth/SignInPanel.vue | 127 +++++++++++++ .../stage-ui/src/components/auth/index.ts | 2 + .../stage-ui/src/components/auth/providers.ts | 20 ++ .../stage-ui/src/stores/display-models.ts | 25 ++- vitest.config.ts | 1 + 21 files changed, 909 insertions(+), 65 deletions(-) create mode 100644 apps/ui-server-auth/src/components/auth-notice.vue create mode 100644 apps/ui-server-auth/src/composables/electron-callback.shared.ts create mode 100644 apps/ui-server-auth/src/composables/electron-callback.test.ts create mode 100644 apps/ui-server-auth/src/modules/sign-in.test.ts create mode 100644 apps/ui-server-auth/src/modules/sign-in.ts create mode 100644 apps/ui-server-auth/vitest.config.ts create mode 100644 packages/stage-ui/src/components/auth/SignInPanel.vue create mode 100644 packages/stage-ui/src/components/auth/providers.ts diff --git a/apps/stage-pocket/src/App.vue b/apps/stage-pocket/src/App.vue index 4e9f83f12..3f30b0f00 100644 --- a/apps/stage-pocket/src/App.vue +++ b/apps/stage-pocket/src/App.vue @@ -69,6 +69,7 @@ watch(settings.themeColorsHueDynamic, () => { // Initialize first-time setup check when app mounts onMounted(async () => { analyticsStore.initialize() + await displayModelsStore.initialize() cardStore.initialize() if (onboardingStore.needsOnboarding) { diff --git a/apps/stage-tamagotchi/src/renderer/App.vue b/apps/stage-tamagotchi/src/renderer/App.vue index aed63b030..2993cb1d2 100644 --- a/apps/stage-tamagotchi/src/renderer/App.vue +++ b/apps/stage-tamagotchi/src/renderer/App.vue @@ -122,6 +122,7 @@ context.value.on(electronSettingsNavigate, (event) => { onMounted(async () => { analyticsStore.initialize() + await displayModelsStore.initialize() cardStore.initialize() await chatSessionStore.initialize() diff --git a/apps/stage-tamagotchi/src/renderer/pages/index.vue b/apps/stage-tamagotchi/src/renderer/pages/index.vue index 6c345d517..0f3f94c88 100644 --- a/apps/stage-tamagotchi/src/renderer/pages/index.vue +++ b/apps/stage-tamagotchi/src/renderer/pages/index.vue @@ -37,9 +37,7 @@ import ResourceStatusIsland from '../components/stage-islands/resource-status-is import StatusIsland from '../components/stage-islands/status-island/index.vue' import { electronOpenOnboarding } from '../../shared/eventa' -import { - modelSettingsRuntimeSnapshotChannelName, -} from '../../shared/model-settings-runtime' +import { modelSettingsRuntimeSnapshotChannelName } from '../../shared/model-settings-runtime' import { useChatSyncStore } from '../stores/chat-sync' import { useControlsIslandStore } from '../stores/controls-island' import { useStageWindowLifecycleStore } from '../stores/stage-window-lifecycle' diff --git a/apps/stage-web/src/App.vue b/apps/stage-web/src/App.vue index e6821e30e..0dd9a140d 100644 --- a/apps/stage-web/src/App.vue +++ b/apps/stage-web/src/App.vue @@ -81,6 +81,7 @@ watch(settings.themeColorsHueDynamic, () => { // Initialize first-time setup check when app mounts onMounted(async () => { analyticsStore.initialize() + await displayModelsStore.initialize() cardStore.initialize() if (onboardingStore.needsOnboarding) { diff --git a/apps/stage-web/src/pages/auth/sign-in.vue b/apps/stage-web/src/pages/auth/sign-in.vue index 706ef47bf..2e816a22a 100644 --- a/apps/stage-web/src/pages/auth/sign-in.vue +++ b/apps/stage-web/src/pages/auth/sign-in.vue @@ -1,26 +1,24 @@