diff --git a/lib/common/static/instance_settings_prefs.js b/lib/common/static/instance_settings_prefs.js
index 0c728fa..9e61431 100644
--- a/lib/common/static/instance_settings_prefs.js
+++ b/lib/common/static/instance_settings_prefs.js
@@ -373,6 +373,39 @@
}
}
+ function installDelegatedHandlers() {
+ if (document.documentElement.dataset.prefsDelegateBound === "1") return;
+ document.documentElement.dataset.prefsDelegateBound = "1";
+ document.addEventListener("click", (ev) => {
+ const target = ev.target;
+ if (!(target instanceof Element)) return;
+ if (target.closest("#display-prefs-save")) {
+ ev.preventDefault();
+ void saveDisplayPrefs();
+ return;
+ }
+ if (target.closest("#env-config-save")) {
+ ev.preventDefault();
+ void saveEnvConfig(false);
+ return;
+ }
+ if (target.closest("#env-config-save-restart")) {
+ ev.preventDefault();
+ void saveEnvConfig(true);
+ return;
+ }
+ if (target.closest("#env-config-reload")) {
+ ev.preventDefault();
+ void loadEnvConfig(true);
+ return;
+ }
+ if (target.closest("#pwd-save-btn")) {
+ ev.preventDefault();
+ void savePassword();
+ }
+ });
+ }
+
function bindClickOnce(id, handler) {
const el = document.getElementById(id);
if (!el || el.dataset.bound === "1") return;
@@ -389,6 +422,7 @@
}
function initPage() {
+ installDelegatedHandlers();
bindEvents();
loadDisplayPrefsForm(false);
loadEnvConfig(false);
diff --git a/lib/hub/hub_bridge.py b/lib/hub/hub_bridge.py
index 00e1bc5..9d22ede 100644
--- a/lib/hub/hub_bridge.py
+++ b/lib/hub/hub_bridge.py
@@ -69,6 +69,8 @@ def install_instance_theme_static(app) -> None:
"instance_page.css": "text/css; charset=utf-8",
"instance_embed.js": "application/javascript; charset=utf-8",
"instance_live.js": "application/javascript; charset=utf-8",
+ "instance_settings_prefs.js": "application/javascript; charset=utf-8",
+ "options_panel.js": "application/javascript; charset=utf-8",
"order_entry_model.js": "application/javascript; charset=utf-8",
"focus_chart_page.js": "application/javascript; charset=utf-8",
"focus_chart_page.css": "text/css; charset=utf-8",
diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html
index 6d0d199..13d306c 100644
--- a/lib/instance/templates/embed_shell.html
+++ b/lib/instance/templates/embed_shell.html
@@ -103,7 +103,7 @@ const ORDER_ENTRY_MODEL_CODE_TO_CATEGORY = {{ entry_model_code_to_category | toj
-
+