feat: mount VoiceOverlay and wire Space bar shortcut in App.vue

This commit is contained in:
2026-04-06 20:20:19 -04:00
parent 853dc810ff
commit a5e35f7c72
+7 -1
View File
@@ -3,6 +3,7 @@ import { onMounted, onUnmounted, ref, watch } from "vue";
import { useRouter } from "vue-router";
import AppHeader from "@/components/AppHeader.vue";
import ToastNotification from "@/components/ToastNotification.vue";
import VoiceOverlay from "@/components/VoiceOverlay.vue";
import { useTheme } from "@/composables/useTheme";
import { useShortcuts } from "@/composables/useShortcuts";
import { useAuthStore } from "@/stores/auth";
@@ -120,6 +121,10 @@ function onGlobalKeydown(e: KeyboardEvent) {
router.push("/chat");
}
break;
case " ":
e.preventDefault();
document.dispatchEvent(new CustomEvent("voice:ptt-toggle"));
break;
}
}
@@ -271,7 +276,7 @@ onUnmounted(() => {
</div>
<div class="shortcut-row">
<kbd class="shortcut-key">Space</kbd>
<span class="shortcut-desc">Hold to speak (voice, when enabled)</span>
<span class="shortcut-desc">Tap to speak (voice, when enabled)</span>
</div>
</div>
</div>
@@ -282,6 +287,7 @@ onUnmounted(() => {
<template v-else>
<router-view />
</template>
<VoiceOverlay />
<ToastNotification />
</template>