From 883ec945d266be75d215103db54a864c855dda82 Mon Sep 17 00:00:00 2001 From: LemonNeko Date: Mon, 6 Apr 2026 19:54:21 +0800 Subject: [PATCH] feat(stage-pocket): WebSocket status indicator + shared i18n (#1586) --- .../components/websocket-status-button.vue | 117 +++++++++++++ apps/stage-pocket/src/pages/index.vue | 3 + apps/stage-pocket/src/styles/main.css | 1 + .../stage-islands/status-island/index.vue | 154 ++---------------- .../src/renderer/styles/main.css | 1 + apps/stage-web/src/styles/main.css | 1 + apps/ui-server-auth/src/styles/main.css | 1 + packages/i18n/src/locales/en/stage.yaml | 4 + .../i18n/src/locales/en/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/es/stage.yaml | 4 + .../i18n/src/locales/es/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/fr/stage.yaml | 4 + .../i18n/src/locales/fr/tamagotchi/stage.yaml | 4 + packages/i18n/src/locales/ja/stage.yaml | 4 + .../i18n/src/locales/ja/tamagotchi/stage.yaml | 4 + packages/i18n/src/locales/ko/stage.yaml | 4 + .../i18n/src/locales/ko/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/ru/stage.yaml | 4 + .../i18n/src/locales/ru/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/vi/stage.yaml | 4 + .../i18n/src/locales/vi/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/zh-Hans/stage.yaml | 4 + .../src/locales/zh-Hans/tamagotchi/stage.yaml | 4 - packages/i18n/src/locales/zh-Hant/stage.yaml | 4 + .../src/locales/zh-Hant/tamagotchi/stage.yaml | 4 - packages/stage-ui/src/composables/index.ts | 1 + .../composables/use-lamp-flicker-animation.ts | 64 ++++++++ packages/stage-ui/stories/styles/main.css | 1 + packages/ui/package.json | 1 + .../src/constants/lamp-flicker-animation.ts | 2 + packages/ui/src/index.ts | 3 +- packages/ui/src/lamp-flicker.css | 88 ++++++++++ packages/ui/src/main.css | 6 + 33 files changed, 344 insertions(+), 172 deletions(-) create mode 100644 apps/stage-pocket/src/components/websocket-status-button.vue create mode 100644 packages/stage-ui/src/composables/use-lamp-flicker-animation.ts create mode 100644 packages/ui/src/constants/lamp-flicker-animation.ts create mode 100644 packages/ui/src/lamp-flicker.css create mode 100644 packages/ui/src/main.css diff --git a/apps/stage-pocket/src/components/websocket-status-button.vue b/apps/stage-pocket/src/components/websocket-status-button.vue new file mode 100644 index 000000000..20a19217a --- /dev/null +++ b/apps/stage-pocket/src/components/websocket-status-button.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/apps/stage-pocket/src/pages/index.vue b/apps/stage-pocket/src/pages/index.vue index f7f35e97e..ac6d9e317 100644 --- a/apps/stage-pocket/src/pages/index.vue +++ b/apps/stage-pocket/src/pages/index.vue @@ -23,6 +23,8 @@ import { breakpointsTailwind, useBreakpoints, useMouse } from '@vueuse/core' import { storeToRefs } from 'pinia' import { computed, onMounted, onUnmounted, ref, useTemplateRef, watch } from 'vue' +import WebSocketStatusButton from '../components/websocket-status-button.vue' + const paused = ref(false) function handleSettingsOpen(open: boolean) { @@ -181,6 +183,7 @@ watch([stream, () => vadLoaded.value], async ([s, loaded]) => { :top-color="sampledColor" >
+