| 1 | <div x-data x-init="$store.whisperStt.ensureStatusLoaded()" x-show="$store.whisperStt"> |
| 2 | <div class="voice-plugin-card"> |
| 3 | <div class="voice-plugin-card-header"> |
| 4 | <div> |
| 5 | <div class="voice-plugin-title">Whisper STT</div> |
| 6 | <div class="voice-plugin-description"> |
| 7 | Browser microphone input routed into the built-in Whisper transcription backend. |
| 8 | </div> |
| 9 | </div> |
| 10 | <span class="voice-plugin-badge" :class="`is-${$store.whisperStt.statusClass || 'warn'}`" x-text="$store.whisperStt.statusText || 'Idle'"></span> |
| 11 | </div> |
| 12 | |
| 13 | <div class="voice-plugin-meta"> |
| 14 | <div class="voice-plugin-meta-row"> |
| 15 | <span>Model size</span> |
| 16 | <span x-text="$store.whisperStt.config.model_size || 'base'"></span> |
| 17 | </div> |
| 18 | <div class="voice-plugin-meta-row"> |
| 19 | <span>Language</span> |
| 20 | <span x-text="$store.whisperStt.config.language || 'en'"></span> |
| 21 | </div> |
| 22 | <div class="voice-plugin-meta-row"> |
| 23 | <span>Message</span> |
| 24 | <span x-text="$store.whisperStt.messageModeLabel"></span> |
| 25 | </div> |
| 26 | <div class="voice-plugin-meta-row"> |
| 27 | <span>Microphone</span> |
| 28 | <span x-text="$store.whisperStt.selectedDeviceLabel"></span> |
| 29 | </div> |
| 30 | </div> |
| 31 | |
| 32 | <div class="voice-plugin-actions"> |
| 33 | <button class="btn btn-field" @click="$store.whisperStt.openConfig()">Configure</button> |
| 34 | <button class="btn btn-field" @click="$store.whisperStt.openPanel()">Status</button> |
| 35 | </div> |
| 36 | </div> |
| 37 | |
| 38 | <style> |
| 39 | .voice-plugin-card { |
| 40 | display: flex; |
| 41 | flex-direction: column; |
| 42 | gap: 12px; |
| 43 | padding: 14px; |
| 44 | background: var(--color-input); |
| 45 | border: 1px solid var(--color-border); |
| 46 | border-radius: 10px; |
| 47 | } |
| 48 | |
| 49 | .voice-plugin-card-header { |
| 50 | display: flex; |
| 51 | justify-content: space-between; |
| 52 | gap: 12px; |
| 53 | align-items: flex-start; |
| 54 | } |
| 55 | |
| 56 | .voice-plugin-title { |
| 57 | font-weight: 700; |
| 58 | font-size: 0.98rem; |
| 59 | } |
| 60 | |
| 61 | .voice-plugin-description { |
| 62 | color: var(--color-text-secondary); |
| 63 | font-size: var(--font-size-small); |
| 64 | margin-top: 0.25rem; |
| 65 | } |
| 66 | |
| 67 | .voice-plugin-badge { |
| 68 | padding: 2px 8px; |
| 69 | border-radius: 999px; |
| 70 | font-size: 0.76rem; |
| 71 | font-weight: 600; |
| 72 | border: 1px solid transparent; |
| 73 | white-space: nowrap; |
| 74 | } |
| 75 | |
| 76 | .voice-plugin-badge.is-ok { |
| 77 | color: #1b5e20; |
| 78 | background: rgba(46, 125, 50, 0.14); |
| 79 | border-color: rgba(46, 125, 50, 0.24); |
| 80 | } |
| 81 | |
| 82 | .voice-plugin-badge.is-warn { |
| 83 | color: #8a6100; |
| 84 | background: rgba(191, 144, 0, 0.14); |
| 85 | border-color: rgba(191, 144, 0, 0.24); |
| 86 | } |
| 87 | |
| 88 | .voice-plugin-meta { |
| 89 | display: flex; |
| 90 | flex-direction: column; |
| 91 | gap: 8px; |
| 92 | font-size: 0.84rem; |
| 93 | } |
| 94 | |
| 95 | .voice-plugin-meta-row { |
| 96 | display: flex; |
| 97 | justify-content: space-between; |
| 98 | gap: 12px; |
| 99 | } |
| 100 | |
| 101 | .voice-plugin-actions { |
| 102 | display: flex; |
| 103 | gap: 8px; |
| 104 | flex-wrap: wrap; |
| 105 | } |
| 106 | </style> |
| 107 | </div> |