fix(plugin): prevent theme flash in embedded workbenches

This commit is contained in:
t8y2 committed 2026-09-14 14:43:02 +08:00
1 parent 8d32cf9ffa
commit f1cc68a4ba
4 files changed
+49 -4

No files matched your search

@@ -124,7 +124,7 @@ async function loadWorkbench() {
const bytes = Uint8Array.from(atob(asset.dataBase64), (character) => character.charCodeAt(0));
const html = await inlineLocalUiAssets(new TextDecoder().decode(bytes), props.plugin.manifest.id);
if (disposed || generation !== loadGeneration) return;
source.value = pluginSandboxDocument(html, props.plugin.manifest.permissions);
source.value = pluginSandboxDocument(html, props.plugin.manifest.permissions, currentBridgeTheme());
await nextTick();
if (disposed || generation !== loadGeneration) return;
createBridge();