feat(plugins): 从插件源仓同步产物(幂等脚本)+ 桌面端标签改为「已加载」不再说远程
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m40s
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m40s
This commit is contained in:
1 parent
5da4f255d8
commit
c1b9328978
2 files changed
+46
-1
No files matched your search
@@ -46,7 +46,13 @@
|
||||
onChange: (e) => { const r = PluginHost.setEnabled(p.id, e.target.checked); setPluginsRev((v) => v + 1); if (!r.ok) setMsg({ type: 'err', text: p.name + ':' + r.error }) },
|
||||
}),
|
||||
el('span', null, p.name + '(' + p.id + ' v' + p.version + (p.compatible ? '' : ',apiVersion 不兼容') + ')'),
|
||||
(() => { const rt = wRuntimePlugins.find((r) => r.id === p.id); return rt ? el('span', { className: 'iwb-plugin-tag' + (rt.status === 'loaded' ? '' : ' iwb-plugin-tag-warn'), title: rt.file + ' · ' + rt.status + (rt.error ? ':' + rt.error : '') }, rt.status === 'loaded' ? '远程' : '远程·' + rt.status) : null })(),
|
||||
(() => {
|
||||
const rt = wRuntimePlugins.find((r) => r.id === p.id)
|
||||
if (!rt) return null
|
||||
// 桌面端不再有「远程 KV」概念:标签只表达 已加载/未加载,来源在行首已经标了
|
||||
const tag = isDesk() ? (rt.status === 'loaded' ? '已加载' : rt.status) : (rt.status === 'loaded' ? '远程' : '远程·' + rt.status)
|
||||
return el('span', { className: 'iwb-plugin-tag' + (rt.status === 'loaded' ? '' : ' iwb-plugin-tag-warn'), title: rt.file + ' · ' + rt.status + (rt.error ? ':' + rt.error : '') }, tag)
|
||||
})(),
|
||||
),
|
||||
p.error ? el('div', { className: 'iwb-status-err' }, p.error) : null,
|
||||
el('button', { className: 'iwb-btn iwb-btn-sm', onClick: () => setTab('plugin:' + p.id) }, '设置'),
|
||||
|
||||
Reference in new issue
Block a user