From 8322727f9b1d795f3c90fbd0122962749eb18d0f Mon Sep 17 00:00:00 2001 From: Neko Date: Wed, 19 Aug 2026 03:58:18 +0800 Subject: [PATCH] feat(stage-tamagotchi): move connection status into controls island (#2317) --- .../stage-islands/controls-island/index.vue | 8 +++ .../stage-islands/status-island/index.vue | 60 +++++++------------ .../src/renderer/pages/index.vue | 13 ++-- 3 files changed, 34 insertions(+), 47 deletions(-) diff --git a/apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue b/apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue index 68f9418d0..fd54a7828 100644 --- a/apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue +++ b/apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue @@ -1,6 +1,7 @@ diff --git a/apps/stage-tamagotchi/src/renderer/pages/index.vue b/apps/stage-tamagotchi/src/renderer/pages/index.vue index a0f083407..44d67f2b0 100644 --- a/apps/stage-tamagotchi/src/renderer/pages/index.vue +++ b/apps/stage-tamagotchi/src/renderer/pages/index.vue @@ -14,7 +14,7 @@ import { useElectronRelativeMouse, } from '@proj-airi/electron-vueuse' import { createTranscriptBuffer } from '@proj-airi/pipelines-audio' -import { hearingInputChannelName, IS_DEV } from '@proj-airi/stage-shared' +import { hearingInputChannelName } from '@proj-airi/stage-shared' import { useModelStore, useThreeSceneIsTransparentAtPoint } from '@proj-airi/stage-ui-three' import { HoloCoupon } from '@proj-airi/stage-ui/components' import { @@ -37,7 +37,6 @@ import { toast } from 'vue-sonner' import ControlsIsland from '../components/stage-islands/controls-island/index.vue' import ResourceStatusIsland from '../components/stage-islands/resource-status-island/index.vue' -import StatusIsland from '../components/stage-islands/status-island/index.vue' import { electronOpenOnboarding } from '../../shared/eventa' import { modelSettingsRuntimeSnapshotChannelName } from '../../shared/model-settings-runtime' @@ -53,7 +52,6 @@ import { } from '../utils/voice-input-suppression' const controlsIslandRef = ref>() -const statusIslandRef = ref>() const widgetStageRef = ref>() const stageCanvas = toRef(() => widgetStageRef.value?.canvasElement()) const componentStateStage = ref<'pending' | 'loading' | 'mounted'>('pending') @@ -68,9 +66,7 @@ const openOnboarding = useElectronEventaInvoke(electronOpenOnboarding) const { isOutside: isOutsideWindow } = useElectronMouseInWindow() const { isOutside } = useElectronMouseInElement(controlsIslandRef) -const { isOutside: isOutsideStatusIsland } = useElectronMouseInElement(statusIslandRef) const isOutsideFor250Ms = refDebounced(isOutside, 250) -const isOutsideStatusIslandFor250Ms = refDebounced(isOutsideStatusIsland, 250) const { x: relativeMouseX, y: relativeMouseY } = useElectronRelativeMouse() // NOTICE: In real-world use cases of Fade on Hover feature, the cursor may move around the edge of the // model rapidly, causing flickering effects when checking pixel transparency strictly. @@ -245,7 +241,7 @@ const modelSettingsRuntimeSnapshot = computed(() = * -> {@link handleFadeOnHoverInteractionChange} * * Upstream: - * - {@link isOutsideFor250Ms}, {@link isOutsideStatusIslandFor250Ms}, and {@link isAroundWindowBorderFor250Ms} + * - {@link isOutsideFor250Ms} and {@link isAroundWindowBorderFor250Ms} * - {@link isOutsideWindow}, {@link isTransparent}, and {@link isTransparentForMouseEvents} * - {@link hearingDialogOpen}, {@link fadeOnHoverEnabled}, and {@link stagePaused} * @@ -269,7 +265,7 @@ function handleFadeOnHoverInteractionChange() { return } - const insideControls = !isOutsideFor250Ms.value || !isOutsideStatusIslandFor250Ms.value + const insideControls = !isOutsideFor250Ms.value const nearBorder = isAroundWindowBorderFor250Ms.value if (insideControls || nearBorder) { @@ -293,7 +289,7 @@ function handleFadeOnHoverInteractionChange() { } watch( - [isOutsideFor250Ms, isOutsideStatusIslandFor250Ms, isAroundWindowBorderFor250Ms, isOutsideWindow, isTransparent, isTransparentForMouseEvents, hearingDialogOpen, fadeOnHoverEnabled, stagePaused], + [isOutsideFor250Ms, isAroundWindowBorderFor250Ms, isOutsideWindow, isTransparent, isTransparentForMouseEvents, hearingDialogOpen, fadeOnHoverEnabled, stagePaused], handleFadeOnHoverInteractionChange, { immediate: true }, ) @@ -816,7 +812,6 @@ const cursorPosition = computed(() => ({ 'transition-opacity duration-250 ease-in-out', ]" > -