From d464976772a3fb85a61b918281e30d64f965b6f0 Mon Sep 17 00:00:00 2001 From: MickaelK Date: Fri, 18 Sep 2026 01:04:03 +1000 Subject: [PATCH] fix (plg_widget_console): lazy load console assets --- server/plugin/plg_widget_console/assets/shell.patch | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server/plugin/plg_widget_console/assets/shell.patch b/server/plugin/plg_widget_console/assets/shell.patch index 269d6701..4f8501fb 100644 --- a/server/plugin/plg_widget_console/assets/shell.patch +++ b/server/plugin/plg_widget_console/assets/shell.patch @@ -2,17 +2,12 @@ diff --git a/public/assets/components/decorator_shell_filemanager.js b/public/as index a499e5ef..caebd17c 100644 --- a/public/assets/components/decorator_shell_filemanager.js +++ b/public/assets/components/decorator_shell_filemanager.js -@@ -6,3 +6,4 @@ import { animate, slideYOut } from "../lib/animate.js"; - import { qs, safe } from "../lib/dom.js"; - import { loadCSS } from "../helpers/loader.js"; - import { init as initBreadcrumb } from "../components/breadcrumb.js"; -+import { init as initShell } from "../components/shell.js"; -@@ -18,3 +19,4 @@ export default function(ctrl) { +@@ -18,3 +18,4 @@ export default function(ctrl) {
+ -@@ -51,3 +53,11 @@ export default function(ctrl) { +@@ -51,3 +52,12 @@ export default function(ctrl) { navigate(p.join("/") + "/" + location.hash); }), )); @@ -22,5 +17,6 @@ index a499e5ef..caebd17c 100644 + $shell.setAttribute("path", urlToPath(fromHref(location.pathname + location.hash))); + effect(rxjs.fromEvent(window, "keydown").pipe( + rxjs.filter((e) => ["F4", "F9"].indexOf(e.code) !== -1), ++ rxjs.switchMap(() => import(new URL("../components/shell.js", import.meta.url).href)), + rxjs.tap(() => $shell.classList.toggle("hidden")), + ));