feat(plugins): P2 插件市场(market 索引生成 + 应用内安装/更新/卸载,sha256 校验写 plugins/)
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m10s
Verify (Gitea) / gate (build · unit · facts) (push) Successful in 1m10s
This commit is contained in:
1 parent
c1b9328978
commit
51bc9c581a
8 files changed
+195
-2
No files matched your search
@@ -23,6 +23,12 @@
|
||||
getSilentSave() { return !!(state.impl && state.impl.getSilentSave()) },
|
||||
setSilentSave(on) { if (state.impl) state.impl.setSilentSave(on) },
|
||||
openDataDir() { return state.impl ? state.impl.openDataDir() : Promise.reject(new Error('仅桌面端可用')) },
|
||||
market: {
|
||||
list() { return state.impl && state.impl.marketList ? state.impl.marketList() : Promise.resolve([]) },
|
||||
installed() { return state.impl && state.impl.marketInstalled ? state.impl.marketInstalled() : Promise.resolve([]) },
|
||||
install(id) { return state.impl && state.impl.marketInstall ? state.impl.marketInstall(id) : Promise.resolve({ ok: false, error: '仅桌面端可用' }) },
|
||||
uninstall(id) { return state.impl && state.impl.marketUninstall ? state.impl.marketUninstall(id) : Promise.resolve({ ok: false, error: '仅桌面端可用' }) },
|
||||
},
|
||||
}
|
||||
global.IWBDesktop = bridge
|
||||
})(typeof window !== 'undefined' ? window : globalThis)
|
||||
Reference in new issue
Block a user