Enhance/Settings UI of plugins (#4035)

more settings types & polish releated ui
This commit is contained in:
Charlie
2022-02-17 10:00:53 +08:00
committed by GitHub
parent 736a4610e6
commit 24b0236b7d
24 changed files with 1028 additions and 472 deletions

View File

@@ -213,8 +213,8 @@ class LSPluginCaller extends EventEmitter {
cnt.id = id
// TODO: apply any container layout data
{
const mainLayoutInfo = this._pluginLocal.settings.get('layout')?.[0]
try {
const mainLayoutInfo = (await this._pluginLocal._loadLayoutsData())?.$$0
if (mainLayoutInfo) {
cnt.dataset.inited_layout = 'true'
const { width, height, left, top } = mainLayoutInfo
@@ -223,6 +223,8 @@ class LSPluginCaller extends EventEmitter {
left: left + 'px', top: top + 'px'
})
}
} catch (e) {
console.error("[Restore Layout Error]", e)
}
document.body.appendChild(cnt)