From d59fbaa9bd760f4db5e0f42f201a7d022777e822 Mon Sep 17 00:00:00 2001 From: Nguyen HP Laptop Date: Sun, 26 Apr 2026 10:20:59 -0400 Subject: [PATCH] 04/26 Fixed import/export functions --- app/static/js/vault.js | 9 +++++++-- app/templates/vault/index.html | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/static/js/vault.js b/app/static/js/vault.js index 6800516..833ba30 100644 --- a/app/static/js/vault.js +++ b/app/static/js/vault.js @@ -3200,7 +3200,12 @@ const Vault = (() => { } } - return { init }; + return { + init, + // Exposed for inline onclick on the sidebar li — ensures the click reaches + // switchView regardless of addEventListener binding order or timing. + switchToImportExport: () => switchView('import-export'), + }; })(); /** @@ -3263,4 +3268,4 @@ const Vault = (() => { } })(); -document.addEventListener("DOMContentLoaded", Vault.init); +document.addEventListener("DOMContentLoaded", Vault.init); \ No newline at end of file diff --git a/app/templates/vault/index.html b/app/templates/vault/index.html index 91e6f47..1432968 100644 --- a/app/templates/vault/index.html +++ b/app/templates/vault/index.html @@ -127,8 +127,9 @@ id="sidebar-import-export" data-view="import-export" data-tooltip="Import / Export" + onclick="Vault.switchToImportExport()" > - ↕️ + 📤 Import / Export
  • -{% endblock %} +{% endblock %} \ No newline at end of file