| | |
| | | engineStatus.set('loading') |
| | | } else { |
| | | engineHardwareInfo.set('') |
| | | engineStatus.set('need_model') |
| | | } |
| | | await Call.ByName('voicesnap/services.EngineService.ReloadCurrentModel') |
| | | } catch {} |
| | |
| | | } |
| | | return t('settings.modelWorking') |
| | | } |
| | | if (option.isCurrent) return t('settings.modelCurrent') |
| | | if (option.isCurrent && option.installed) return t('settings.modelCurrent') |
| | | if (option.installed) return t('settings.modelUse') |
| | | return t('settings.modelDownload') |
| | | } |
| | | |
| | | async function onModelAction(option: ModelOption) { |
| | | if (option.isCurrent || modelBusyID) return |
| | | if ((option.isCurrent && option.installed) || modelBusyID) return |
| | | modelBusyID = option.modelID |
| | | modelProgress = 0 |
| | | modelError = '' |
| | |
| | | <div class="model-main"> |
| | | <div class="model-title-row"> |
| | | <span class="model-title">{option.displayName}</span> |
| | | <span class="model-pill" class:current={option.isCurrent}> |
| | | {option.isCurrent ? t('settings.modelCurrent') : modelTierLabel(option)} |
| | | <span class="model-pill" class:current={option.isCurrent && option.installed}> |
| | | {option.isCurrent && option.installed ? t('settings.modelCurrent') : modelTierLabel(option)} |
| | | </span> |
| | | </div> |
| | | <span class="model-desc">{modelDescription(option)}</span> |
| | |
| | | {/if} |
| | | </span> |
| | | </div> |
| | | {#if option.isCurrent} |
| | | {#if option.isCurrent && option.installed} |
| | | <span class="model-current-status">{t('settings.modelCurrent')}</span> |
| | | {:else} |
| | | <button |