fix(plugins): 补 DesktopPluginsTab 的 restart 状态(上一版误加到旧组件,点插件报 Can't find variable)
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m19s
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m19s
This commit is contained in:
1 parent
6426b9db37
commit
3aa8b77d2c
1 file changed
+2
-1
@@ -109,6 +109,7 @@
|
||||
const [q, setQ] = React.useState('')
|
||||
const [msg, setMsg] = React.useState('')
|
||||
const [busy, setBusy] = React.useState('')
|
||||
const [restart, setRestart] = React.useState(false)
|
||||
const D = (typeof window !== 'undefined') ? window.IWBDesktop : null
|
||||
const refresh = React.useCallback(async () => {
|
||||
if (!D || !D.market) { setMarket([]); return }
|
||||
@@ -129,7 +130,7 @@
|
||||
if (!r || !r.ok) { setMsg((r && r.error) || '操作失败'); return }
|
||||
setMsg(kind === 'install' ? '已安装,重启应用后生效' : '已移除外部副本,重启后回退内置')
|
||||
await refresh()
|
||||
if (window.confirm('需要重启应用才能生效,现在重启?')) window.location.reload()
|
||||
setRestart(true)
|
||||
} finally { setBusy('') }
|
||||
}
|
||||
const toggle = (p, on) => {
|
||||
|
||||
Reference in new issue
Block a user