feat(ui): Add warning for unmounted encrypted drives

Adds a warning message to the main UI.

The message "Accurate detection is only possible when the drive is mounted" is now displayed in addition to the standard "You can start a backup here" text, under the following conditions:
- The backup mode is active.
- The "Encrypt Backup" option is enabled for the current profile.
- The corresponding encrypted drive is not currently mounted.

This provides clearer feedback to the user on why size calculations might be unavailable or inaccurate for encrypted targets.
This commit is contained in:
2025-09-14 15:44:02 +02:00
parent ff640ca9ef
commit 6504758b7b
2 changed files with 15 additions and 0 deletions

View File

@@ -229,6 +229,7 @@ class Msg:
"ready_for_first_backup": _("Everything is ready for your first backup."),
"backup_mode": _("Backup Mode"),
"backup_mode_info": _("Backup Mode: You can start a backup here."),
"encrypted_unmounted_warning": _("Accurate detection is only possible when the drive is mounted."),
"restore_mode_info": _("Restore Mode: You can start a restore here."),
"advanced_settings_title": _("Advanced Settings"),
"animation_settings_title": _("Animation Settings"),

View File

@@ -290,7 +290,21 @@ class Drawing:
elif self.app.is_first_backup:
info_messages.append(Msg.STR["ready_for_first_backup"])
elif self.app.mode == "backup":
# Base message is always shown after calculation in backup mode
info_messages.append(Msg.STR["backup_mode_info"])
# Additionally, show a warning if encryption is on but the drive is not mounted
if self.app.encrypted_var.get():
dest_path = self.app.destination_path
profile_name = self.app.left_canvas_data.get('folder')
is_mounted = False
if dest_path and profile_name:
is_mounted = self.app.backup_manager.encryption_manager.is_mounted(
dest_path, profile_name)
if not is_mounted:
info_messages.append(Msg.STR["encrypted_unmounted_warning"])
else:
info_messages.append(Msg.STR["restore_mode_info"])