| | |
| | | } |
| | | }) |
| | | |
| | | Call.ByName('voicesnap/services.EngineService.ModelExists').then((exists: any) => { |
| | | if (!exists) { |
| | | engineStatus.set('need_model') |
| | | } |
| | | }) |
| | | refreshCurrentModelAvailability() |
| | | |
| | | // Load actual hotkey name from backend (store default is generic "Ctrl") |
| | | Call.ByName('voicesnap/services.HotkeyService.GetHotkeyName').then((name: any) => { |
| | |
| | | setLocale(locale) |
| | | languageReady = true |
| | | } |
| | | |
| | | async function refreshCurrentModelAvailability() { |
| | | try { |
| | | const current: any = await Call.ByName('voicesnap/services.EngineService.GetCurrentModelStatus') |
| | | if (!current?.installed) { |
| | | engineStatus.set('need_model') |
| | | } |
| | | } catch { |
| | | try { |
| | | const exists: any = await Call.ByName('voicesnap/services.EngineService.ModelExists') |
| | | if (!exists) { |
| | | engineStatus.set('need_model') |
| | | } |
| | | } catch {} |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | {#if isIndicatorRoute} |