From 325d180e9ef4dc7b9fedab7479143e972656d5e2 Mon Sep 17 00:00:00 2001 From: chrisfu Date: Sat, 20 Dec 2025 20:55:52 -0800 Subject: [PATCH] fix(installer, scripts): improve read-only text handling and streamline db password input - Update `screen.py` to make text read-only using `state='disabled'`, while allowing text selection and copying. - Simplify `init_primary_domain.sh` by removing unnecessary local variable declaration for `db_pass`. --- etc/init_primary_domain.sh | 2 +- installer/screen.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/init_primary_domain.sh b/etc/init_primary_domain.sh index 571438d..c71a3c2 100755 --- a/etc/init_primary_domain.sh +++ b/etc/init_primary_domain.sh @@ -366,7 +366,7 @@ case "$ACTION" in initialize) ensure_tools # Read password from stdin if provided - local db_pass="" + db_pass="" if [[ ! -t 0 ]]; then read -r db_pass fi diff --git a/installer/screen.py b/installer/screen.py index a5dd4e6..2084d88 100644 --- a/installer/screen.py +++ b/installer/screen.py @@ -195,8 +195,8 @@ class TerminalConsole(ttk.Frame): self.scroll.pack(side='right', fill='y') self.text.pack(side='left', fill='both', expand=True) - # Make read-only by default - self.text.bind("", lambda e: "break") + # Make read-only by default but allow selection and copying + self.text.configure(state='disabled') def write(self, content: str): """Append text to the console and scroll to the bottom."""