From 982567acf90e9dd6a20647dc77c90d038056725d Mon Sep 17 00:00:00 2001
From: hermes-explorigin
Date: Thu, 27 Aug 2026 01:22:06 +0000
Subject: [PATCH] Add setting to re-enable the lock-screen web-server warning
- Settings dialog gains a 'Show web-server warning' toggle that maps to the
persisted dismissedLocalWarning flag, letting the user re-show the banner
after dismissing it (or hide it proactively).
---
dist/index.html | 25 ++++++++++++++++++++-----
src/components/SettingsDialog.svelte | 23 +++++++++++++++++++++++
2 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/dist/index.html b/dist/index.html
index a1120d6..2b7dbe2 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -7658,11 +7658,12 @@ delegate(["click", "change"]);
//#endregion
//#region src/components/SettingsDialog.svelte
var root_1$2 = /* @__PURE__ */ from_html(``);
-var root$1 = /* @__PURE__ */ from_html(``);
+var root$1 = /* @__PURE__ */ from_html(``);
function SettingsDialog($$anchor, $$props) {
push($$props, true);
let minutes = /* @__PURE__ */ state(proxy(settings.autoLockMinutes));
let lockOnTabSwitch = /* @__PURE__ */ state(proxy(settings.lockOnTabSwitch));
+ let showLocalWarning = /* @__PURE__ */ state(!settings.dismissedLocalWarning);
let saving = /* @__PURE__ */ state(false);
const minuteOptions = [
1,
@@ -7677,6 +7678,7 @@ function SettingsDialog($$anchor, $$props) {
try {
settings.autoLockMinutes = get(minutes);
settings.lockOnTabSwitch = get(lockOnTabSwitch);
+ settings.dismissedLocalWarning = !get(showLocalWarning);
await settings.save();
startAutoLock();
} catch (e) {
@@ -7688,6 +7690,7 @@ function SettingsDialog($$anchor, $$props) {
user_effect(() => {
set(minutes, settings.autoLockMinutes, true);
set(lockOnTabSwitch, settings.lockOnTabSwitch, true);
+ set(showLocalWarning, !settings.dismissedLocalWarning);
});
var div = root$1();
var form = child(div);
@@ -7720,18 +7723,29 @@ function SettingsDialog($$anchor, $$props) {
reset(p_1);
reset(div_2);
var div_3 = sibling(div_2, 2);
- var button = child(div_3);
- var text_3 = child(button, true);
+ var label_1 = child(div_3);
+ var input_1 = child(label_1);
+ remove_input_defaults(input_1);
+ next(4);
+ reset(label_1);
+ var p_2 = sibling(label_1, 2);
+ var text_3 = child(p_2, true);
+ reset(p_2);
+ reset(div_3);
+ var div_4 = sibling(div_3, 2);
+ var button = child(div_4);
+ var text_4 = child(button, true);
reset(button);
var button_1 = sibling(button, 2);
- reset(div_3);
+ reset(div_4);
reset(form);
reset(div);
template_effect(() => {
set_text(text_1, `Vault locks after ${get(minutes) ?? ""} ${get(minutes) === 1 ? "minute" : "minutes"} of inactivity.`);
set_text(text_2, get(lockOnTabSwitch) ? "The vault locks immediately when you switch to another tab." : "The vault stays unlocked even when you switch tabs.");
+ set_text(text_3, get(showLocalWarning) ? "Shows a reminder on the lock screen to use the vault from a downloaded local file." : "The lock-screen web-server warning banner is hidden.");
button.disabled = get(saving);
- set_text(text_3, get(saving) ? "Saving..." : "Save");
+ set_text(text_4, get(saving) ? "Saving..." : "Save");
});
event("submit", form, (e) => {
e.preventDefault();
@@ -7739,6 +7753,7 @@ function SettingsDialog($$anchor, $$props) {
});
bind_select_value(select, () => get(minutes), ($$value) => set(minutes, $$value));
bind_checked(input, () => get(lockOnTabSwitch), ($$value) => set(lockOnTabSwitch, $$value));
+ bind_checked(input_1, () => get(showLocalWarning), ($$value) => set(showLocalWarning, $$value));
delegated("click", button_1, function(...$$args) {
$$props.onBack?.apply(this, $$args);
});
diff --git a/src/components/SettingsDialog.svelte b/src/components/SettingsDialog.svelte
index 520a1c2..2d6297d 100644
--- a/src/components/SettingsDialog.svelte
+++ b/src/components/SettingsDialog.svelte
@@ -7,6 +7,8 @@
// Local copies so the user can cancel without losing values
let minutes = $state(settings.autoLockMinutes)
let lockOnTabSwitch = $state(settings.lockOnTabSwitch)
+ // Inverse of dismissedLocalWarning: on = show the web-server security banner.
+ let showLocalWarning = $state(!settings.dismissedLocalWarning)
let saving = $state(false)
const minuteOptions = [1, 5, 10, 15, 30, 60]
@@ -16,6 +18,7 @@
try {
settings.autoLockMinutes = minutes
settings.lockOnTabSwitch = lockOnTabSwitch
+ settings.dismissedLocalWarning = !showLocalWarning
await settings.save()
startAutoLock()
} catch (e) {
@@ -29,6 +32,7 @@
$effect(() => {
minutes = settings.autoLockMinutes
lockOnTabSwitch = settings.lockOnTabSwitch
+ showLocalWarning = !settings.dismissedLocalWarning
})
@@ -67,6 +71,25 @@
+
+
+
+ {showLocalWarning
+ ? 'Shows a reminder on the lock screen to use the vault from a downloaded local file.'
+ : 'The lock-screen web-server warning banner is hidden.'}
+