fix(stage-web,stage-tamagotchi): modules indicator not working

Close #175
This commit is contained in:
Neko Ayaka
2025-07-17 03:50:31 +08:00
parent 92f5a2671a
commit 20533103d2
4 changed files with 16 additions and 4 deletions
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { IconStatusItem } from '@proj-airi/stage-ui/components'
import { useConsciousnessStore, useSpeechStore } from '@proj-airi/stage-ui/stores'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
@@ -28,7 +29,7 @@ const modulesList = computed<Module[]>(() => [
description: t('settings.pages.modules.consciousness.description'),
icon: 'i-solar:ghost-bold-duotone',
to: '/settings/modules/consciousness',
configured: false,
configured: useConsciousnessStore().configured,
},
{
id: 'speech',
@@ -36,7 +37,7 @@ const modulesList = computed<Module[]>(() => [
description: t('settings.pages.modules.speech.description'),
icon: 'i-solar:user-speak-rounded-bold-duotone',
to: '/settings/modules/speech',
configured: false,
configured: useSpeechStore().configured,
},
{
id: 'hearing',
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { IconStatusItem } from '@proj-airi/stage-ui/components'
import { useConsciousnessStore, useSpeechStore } from '@proj-airi/stage-ui/stores'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
@@ -28,7 +29,7 @@ const modulesList = computed<Module[]>(() => [
description: t('settings.pages.modules.consciousness.description'),
icon: 'i-solar:ghost-bold-duotone',
to: '/settings/modules/consciousness',
configured: false,
configured: useConsciousnessStore().configured,
},
{
id: 'speech',
@@ -36,7 +37,7 @@ const modulesList = computed<Module[]>(() => [
description: t('settings.pages.modules.speech.description'),
icon: 'i-solar:user-speak-rounded-bold-duotone',
to: '/settings/modules/speech',
configured: false,
configured: useSpeechStore().configured,
},
{
id: 'hearing',
@@ -92,8 +92,13 @@ export const useConsciousnessStore = defineStore('consciousness', () => {
}
})
const configured = computed(() => {
return !!activeProvider.value && !!activeModel.value
})
return {
// State
configured,
activeProvider,
activeModel,
customModelName: activeCustomModelName,
@@ -209,8 +209,13 @@ export const useSpeechStore = defineStore('speech', () => {
return toXml(ssmlXast)
}
const configured = computed(() => {
return !!activeSpeechProvider.value && !!activeSpeechModel.value && !!activeSpeechVoiceId.value
})
return {
// State
configured,
activeSpeechProvider,
activeSpeechModel,
activeSpeechVoice,