| 1 | <html> |
| 2 | <head> |
| 3 | <title>Kokoro TTS</title> |
| 4 | <script type="module"> |
| 5 | import { store } from "/plugins/_kokoro_tts/webui/kokoro-tts-store.js"; |
| 6 | </script> |
| 7 | </head> |
| 8 | |
| 9 | <body> |
| 10 | <div |
| 11 | x-data |
| 12 | x-init="$store.kokoroTts.ensureStatusLoaded()" |
| 13 | class="speech-plugin-page" |
| 14 | > |
| 15 | <template x-if="$store.kokoroTts"> |
| 16 | <div> |
| 17 | <div class="section-title">Kokoro TTS</div> |
| 18 | <div class="section-description"> |
| 19 | Built-in Kokoro speech synthesis. Dependency installation remains on the |
| 20 | Docker/bootstrap path; disabling this plugin returns spoken output to the |
| 21 | browser fallback. |
| 22 | </div> |
| 23 | |
| 24 | <div class="speech-plugin-grid"> |
| 25 | <div class="speech-plugin-card"> |
| 26 | <div class="field-title">Provider State</div> |
| 27 | <div class="status-row"> |
| 28 | <span class="status-key">Enabled</span> |
| 29 | <span class="status-badge" :class="$store.kokoroTts.enabled ? 'ok' : 'warn'" x-text="$store.kokoroTts.enabled ? 'Yes' : 'No'"></span> |
| 30 | </div> |
| 31 | <div class="status-row"> |
| 32 | <span class="status-key">Model</span> |
| 33 | <span class="status-badge" :class="$store.kokoroTts.statusClass" x-text="$store.kokoroTts.statusText"></span> |
| 34 | </div> |
| 35 | <div class="status-row" x-show="$store.kokoroTts.packageVersion"> |
| 36 | <span class="status-key">Package</span> |
| 37 | <span class="status-value" x-text="$store.kokoroTts.packageVersion"></span> |
| 38 | </div> |
| 39 | </div> |
| 40 | |
| 41 | <div class="speech-plugin-card"> |
| 42 | <div class="field-title">Resolved Config</div> |
| 43 | <div class="status-row"> |
| 44 | <span class="status-key">Voice</span> |
| 45 | <span class="status-value mono" x-text="$store.kokoroTts.voiceSummary"></span> |
| 46 | </div> |
| 47 | <div class="status-row"> |
| 48 | <span class="status-key">Speed</span> |
| 49 | <span class="status-value" x-text="$store.kokoroTts.config.speed"></span> |
| 50 | </div> |
| 51 | </div> |
| 52 | </div> |
| 53 | |
| 54 | <div class="speech-plugin-actions"> |
| 55 | <button class="btn btn-field" @click="$store.kokoroTts.openConfig()">Open Settings</button> |
| 56 | <button class="btn btn-field" @click="$store.kokoroTts.refreshStatus()">Refresh</button> |
| 57 | </div> |
| 58 | </div> |
| 59 | </template> |
| 60 | </div> |
| 61 | |
| 62 | <style> |
| 63 | .speech-plugin-page { |
| 64 | display: flex; |
| 65 | flex-direction: column; |
| 66 | gap: 14px; |
| 67 | } |
| 68 | |
| 69 | .speech-plugin-grid { |
| 70 | display: grid; |
| 71 | gap: 12px; |
| 72 | grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); |
| 73 | } |
| 74 | |
| 75 | .speech-plugin-card { |
| 76 | display: flex; |
| 77 | flex-direction: column; |
| 78 | gap: 10px; |
| 79 | padding: 14px; |
| 80 | background: var(--color-input); |
| 81 | } |
| 82 | |
| 83 | .speech-plugin-actions { |
| 84 | display: flex; |
| 85 | gap: 8px; |
| 86 | flex-wrap: wrap; |
| 87 | } |
| 88 | |
| 89 | .status-row { |
| 90 | display: flex; |
| 91 | align-items: flex-start; |
| 92 | justify-content: space-between; |
| 93 | gap: 12px; |
| 94 | font-size: 0.84rem; |
| 95 | } |
| 96 | |
| 97 | .status-key { |
| 98 | opacity: 0.7; |
| 99 | min-width: 64px; |
| 100 | } |
| 101 | |
| 102 | .status-value { |
| 103 | text-align: right; |
| 104 | word-break: break-word; |
| 105 | } |
| 106 | |
| 107 | .status-badge { |
| 108 | padding: 2px 8px; |
| 109 | border-radius: 999px; |
| 110 | font-size: 0.76rem; |
| 111 | font-weight: 600; |
| 112 | border: 1px solid transparent; |
| 113 | } |
| 114 | |
| 115 | .status-badge.ok { |
| 116 | color: #1b5e20; |
| 117 | background: rgba(46, 125, 50, 0.14); |
| 118 | border-color: rgba(46, 125, 50, 0.24); |
| 119 | } |
| 120 | |
| 121 | .status-badge.warn { |
| 122 | color: #8a6100; |
| 123 | background: rgba(191, 144, 0, 0.14); |
| 124 | border-color: rgba(191, 144, 0, 0.24); |
| 125 | } |
| 126 | |
| 127 | .mono { |
| 128 | font-family: var(--font-mono); |
| 129 | font-size: 0.78rem; |
| 130 | } |
| 131 | </style> |
| 132 | </body> |
| 133 | </html> |