feat(ui): simplify plugin activation and align task status badges
This commit is contained in:
1 parent
9c82a40cbf
commit
96fedc816f
11 files changed
+242
-31
No files matched your search
@@ -13,15 +13,17 @@
|
||||
@for (plugin of available(); track plugin.manifest.id) {
|
||||
<div class="choice">
|
||||
<label><input type="checkbox" [checked]="selected[plugin.manifest.id] !== undefined" (change)="choose(plugin, $event)">{{ plugin.manifest.name }}</label>
|
||||
<select [disabled]="selected[plugin.manifest.id] === undefined" [ngModel]="selected[plugin.manifest.id] || ''" (ngModelChange)="selected[plugin.manifest.id] = $event; emit()" [attr.aria-label]="plugin.manifest.name + '连接配置'">
|
||||
<option value="" disabled>选择连接配置</option>
|
||||
@for (profile of plugin.profiles; track profile.name) { @if (profile.authorized) { <option [value]="profile.name">{{ profile.label }}</option> } }
|
||||
</select>
|
||||
@if (authorizedProfiles(plugin).length > 1) {
|
||||
<select [disabled]="selected[plugin.manifest.id] === undefined" [ngModel]="selected[plugin.manifest.id] || ''" (ngModelChange)="selected[plugin.manifest.id] = $event; emit()" [attr.aria-label]="plugin.manifest.name + '使用设置'">
|
||||
<option value="" disabled>选择要使用的设置</option>
|
||||
@for (profile of authorizedProfiles(plugin); track profile.name) { <option [value]="profile.name">{{ profile.label }}</option> }
|
||||
</select>
|
||||
}
|
||||
</div>
|
||||
} @empty { <p>还没有可用插件,请先安装、授权并启用。</p> }
|
||||
<p class="hint">不勾选任何插件时,本次任务只使用手机能力。</p>
|
||||
} @else {
|
||||
<p class="hint">{{ available().length ? '默认连接用于自动调用,也可以关闭自动选择,指定本次可用的插件。' : '还没有可用插件,手机测试不受影响。' }}</p>
|
||||
<p class="hint">{{ available().length ? 'AI 会按需使用可用插件,无需逐次选择。关闭自动使用后,可指定本次允许使用的插件。' : '还没有可用插件,手机测试不受影响。' }}</p>
|
||||
}
|
||||
<a routerLink="/plugins" class="manage-link">管理插件 <span class="material-symbols-outlined" aria-hidden="true">arrow_forward</span></a>
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user