feat(skins): add persistent voice workspace API and align KAAK

This commit is contained in:
illusia committed 2026-10-24 13:30:50 +08:00
1 parent 0af3236c30
commit 452e6f09ca
24 files changed
+451 -21

No files matched your search

@@ -0,0 +1,43 @@
<template>
<section
v-if="!connected"
class="voice-connection-status"
data-ws-part="voice.connection-status"
:data-ws-state="connecting ? 'connecting' : error ? 'failed' : 'disconnected'"
>
<p role="status" aria-live="polite" data-ws-part="voice.connection-status.message">
{{ connecting ? t('connecting') : error || t('voiceHealthDisconnected') }}
</p>
<label data-ws-part="voice.connection-status.nickname">
<span>{{ t('nickname') }}</span>
<input
:value="nickname"
:disabled="connecting"
maxlength="30"
autocomplete="nickname"
data-ws-part="voice.connection-status.nickname.input"
@input="$emit('update:nickname', ($event.target as HTMLInputElement).value)"
/>
</label>
<button
type="button"
:disabled="!canConnect || connecting"
data-ws-part="voice.connection-status.reconnect"
@click="$emit('connect')"
><Icon v-if="connecting" name="refresh" :size="16" />{{ t('reconnectNow') }}</button>
</section>
</template>
<script setup lang="ts">
import Icon from "../Icon.vue";
defineProps<{
connected: boolean;
connecting: boolean;
nickname: string;
error: string;
canConnect: boolean;
t: (key: string) => string;
}>();
defineEmits<{ connect: []; 'update:nickname': [value: string] }>();
</script>