fix(stage-*): isDev constant
This commit is contained in:
@@ -10,6 +10,7 @@ import workletUrl from '@proj-airi/stage-ui/workers/vad/process.worklet?worker&u
|
||||
import { BackgroundProvider } from '@proj-airi/stage-layouts/components/Backgrounds'
|
||||
import { useBackgroundThemeColor } from '@proj-airi/stage-layouts/composables/theme-color'
|
||||
import { useBackgroundStore } from '@proj-airi/stage-layouts/stores/background'
|
||||
import { IS_DEV } from '@proj-airi/stage-shared'
|
||||
import { WidgetStage } from '@proj-airi/stage-ui/components/scenes'
|
||||
import { useAudioRecorder } from '@proj-airi/stage-ui/composables/audio/audio-recorder'
|
||||
import { useVAD } from '@proj-airi/stage-ui/stores/ai/models/vad'
|
||||
@@ -204,7 +205,7 @@ watch([stream, () => vadLoaded.value], async ([s, loaded]) => {
|
||||
/>
|
||||
<InteractiveArea v-if="!isMobile" h="85dvh" absolute right-4 flex flex-1 flex-col max-w="500px" min-w="30%" />
|
||||
<MobileInteractiveArea v-if="isMobile" @settings-open="handleSettingsOpen">
|
||||
<template v-if="import.meta.env.DEV" #status>
|
||||
<template v-if="IS_DEV" #status>
|
||||
<WebSocketStatusButton />
|
||||
</template>
|
||||
</MobileInteractiveArea>
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
useElectronMouseInWindow,
|
||||
useElectronRelativeMouse,
|
||||
} from '@proj-airi/electron-vueuse'
|
||||
import { IS_DEV } from '@proj-airi/stage-shared'
|
||||
import { useModelStore, useThreeSceneIsTransparentAtPoint } from '@proj-airi/stage-ui-three'
|
||||
import { HoloCoupon } from '@proj-airi/stage-ui/components'
|
||||
import {
|
||||
@@ -474,7 +475,7 @@ watch([stream, () => vadLoaded.value], async ([s, loaded]) => {
|
||||
'transition-opacity duration-250 ease-in-out',
|
||||
]"
|
||||
>
|
||||
<StatusIsland v-if="import.meta.env.DEV" ref="statusIslandRef" />
|
||||
<StatusIsland v-if="IS_DEV" ref="statusIslandRef" />
|
||||
<ResourceStatusIsland />
|
||||
<WidgetStage
|
||||
ref="widgetStageRef"
|
||||
|
||||
@@ -4,6 +4,12 @@ export enum StageEnvironment {
|
||||
Tamagotchi = 'tamagotchi',
|
||||
}
|
||||
|
||||
/**
|
||||
* Build-time dev flag, replaced by Vite as a literal `true`/`false` so the
|
||||
* unused branch is tree-shaken in production bundles.
|
||||
*/
|
||||
export const IS_DEV: boolean = import.meta.env.DEV
|
||||
|
||||
export function isStageWeb(): boolean {
|
||||
return !import.meta.env.RUNTIME_ENVIRONMENT || import.meta.env.RUNTIME_ENVIRONMENT === 'browser'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user