mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-06 12:52:04 +00:00
tui2: default profiles online and add phase4 inspector boards
This commit is contained in:
1 parent
d4cbd04242
commit
93cf78b2c8
7 files changed
+447
-23
No files matched your search
@@ -70,7 +70,8 @@ class ConfigManager:
|
||||
logger.info("Config file not found; returning defaults")
|
||||
return {
|
||||
"relays": list(DEFAULT_NOSTR_RELAYS),
|
||||
"offline_mode": True,
|
||||
"offline_mode": False,
|
||||
"online_mode_notice_seen": False,
|
||||
"pin_hash": "",
|
||||
"password_hash": "",
|
||||
"inactivity_timeout": INACTIVITY_TIMEOUT,
|
||||
@@ -101,7 +102,8 @@ class ConfigManager:
|
||||
raise ValueError("Config data must be a dictionary")
|
||||
# Ensure defaults for missing keys
|
||||
data.setdefault("relays", list(DEFAULT_NOSTR_RELAYS))
|
||||
data.setdefault("offline_mode", True)
|
||||
data.setdefault("offline_mode", False)
|
||||
data.setdefault("online_mode_notice_seen", False)
|
||||
data.setdefault("pin_hash", "")
|
||||
data.setdefault("password_hash", "")
|
||||
data.setdefault("inactivity_timeout", INACTIVITY_TIMEOUT)
|
||||
@@ -277,7 +279,7 @@ class ConfigManager:
|
||||
def get_offline_mode(self) -> bool:
|
||||
"""Retrieve the offline mode setting."""
|
||||
config = self.load_config(require_pin=False)
|
||||
return bool(config.get("offline_mode", True))
|
||||
return bool(config.get("offline_mode", False))
|
||||
|
||||
def set_clipboard_clear_delay(self, delay: int) -> None:
|
||||
"""Persist clipboard clear timeout in seconds."""
|
||||
|
||||
@@ -292,7 +292,7 @@ class PasswordManager:
|
||||
self.secret_mode_enabled: bool = False
|
||||
self.deterministic_totp: bool = False
|
||||
self.clipboard_clear_delay: int = 45
|
||||
self.offline_mode: bool = True
|
||||
self.offline_mode: bool = False
|
||||
self.profile_stack: list[tuple[str, Path, str]] = []
|
||||
self.last_unlock_duration: float | None = None
|
||||
self.verbose_timing: bool = False
|
||||
@@ -1771,13 +1771,28 @@ class PasswordManager:
|
||||
self.manifest_id = None
|
||||
self.delta_since = 0
|
||||
self.nostr_account_idx = 0
|
||||
self.offline_mode = bool(config.get("offline_mode", True))
|
||||
self.offline_mode = bool(config.get("offline_mode", False))
|
||||
self.inactivity_timeout = config.get("inactivity_timeout", INACTIVITY_TIMEOUT)
|
||||
self.secret_mode_enabled = bool(config.get("secret_mode_enabled", False))
|
||||
self.clipboard_clear_delay = int(config.get("clipboard_clear_delay", 45))
|
||||
self.verbose_timing = bool(config.get("verbose_timing", False))
|
||||
if not self.offline_mode:
|
||||
print("Connecting to relays...")
|
||||
if not self.offline_mode and not bool(
|
||||
config.get("online_mode_notice_seen", False)
|
||||
):
|
||||
self.notify(
|
||||
"Profile is ONLINE by default. Switch to offline mode in Settings if needed.",
|
||||
level="INFO",
|
||||
)
|
||||
config["online_mode_notice_seen"] = True
|
||||
try:
|
||||
self.config_manager.save_config(config)
|
||||
except Exception as exc:
|
||||
logger.warning(
|
||||
"Failed to persist online mode onboarding notice state: %s",
|
||||
exc,
|
||||
)
|
||||
self.nostr_client = NostrClient(
|
||||
encryption_manager=self.encryption_manager,
|
||||
fingerprint=self.current_fingerprint,
|
||||
|
||||
Reference in new issue
Block a user