mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-07 01:55:51 +08:00
feat(classroom): show local speech bridge connection status in settings
Subtle status row (dot + Connected/Not detected) reflecting the same useLocalSpeechBridge probe already driving TTS routing.
This commit is contained in:
@@ -1324,6 +1324,17 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="set-row">
|
||||
<div class="set-info">
|
||||
<span>Local Bridge</span>
|
||||
<small class="muted">Speech requests use a Bridge running on this device when detected, otherwise the cloud service.</small>
|
||||
</div>
|
||||
<span class="bridge-status" :class="{connected: localBridgeConnected}">
|
||||
<span class="bridge-dot"/>
|
||||
{{ localBridgeConnected ? 'Connected' : 'Not detected' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="set-row">
|
||||
<span>Test TTS</span>
|
||||
<div class="row">
|
||||
@@ -2851,7 +2862,8 @@ const promptReplayCount = ref(0)
|
||||
const replaySpeedHintSeen = ref(false)
|
||||
|
||||
const api = useApi()
|
||||
const {localUrl} = useLocalSpeechBridge()
|
||||
const {localUrl, localBase} = useLocalSpeechBridge()
|
||||
const localBridgeConnected = computed(() => Boolean(localBase.value))
|
||||
const isClient = typeof window !== 'undefined'
|
||||
const auth = useAuthStore()
|
||||
|
||||
@@ -7203,6 +7215,30 @@ onMounted(() => {
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
.bridge-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 0.85rem;
|
||||
color: var(--t3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bridge-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--t3);
|
||||
}
|
||||
|
||||
.bridge-status.connected {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.bridge-status.connected .bridge-dot {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.speech-server-dialog {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
|
||||
Reference in New Issue
Block a user