mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-02 09:46:48 +08:00
GUI: Minor UX tweaks
This commit is contained in:
parent
34e03dbce1
commit
87760d48b7
4 changed files with 28 additions and 8 deletions
|
@ -619,10 +619,14 @@ def _main_gui(viewer_mode: bool):
|
|||
__ignore_errors=GUI_STATUS_IGNORE_ERRORS,
|
||||
)
|
||||
GUI_STATUS_IGNORE_ERRORS = False
|
||||
if not result or not result["result"]:
|
||||
try:
|
||||
if not result or not result["result"]:
|
||||
snapshots = None
|
||||
else:
|
||||
snapshots = result["output"]
|
||||
except TypeError:
|
||||
snapshots = None
|
||||
else:
|
||||
snapshots = result["output"]
|
||||
sg.popup_error(_t("mail_gui.failed_operation"))
|
||||
try:
|
||||
min_backup_age = repo_config.g("repo_opts.minimum_backup_age")
|
||||
except AttributeError:
|
||||
|
|
|
@ -941,7 +941,9 @@ def config_gui(full_config: dict, config_file: str):
|
|||
],
|
||||
[
|
||||
sg.Text(
|
||||
_t("config_gui.stdin_from_command"), key="text_stdin_from_command"
|
||||
_t("config_gui.stdin_from_command"),
|
||||
key="text_stdin_from_command",
|
||||
visible=False,
|
||||
)
|
||||
],
|
||||
[
|
||||
|
@ -950,18 +952,30 @@ def config_gui(full_config: dict, config_file: str):
|
|||
key="inherited.backup_opts.stdin_from_command",
|
||||
tooltip=_t("config_gui.group_inherited"),
|
||||
pad=1,
|
||||
visible=False,
|
||||
),
|
||||
sg.Input(
|
||||
key="backup_opts.stdin_from_command", size=(100, 1), visible=False
|
||||
),
|
||||
sg.Input(key="backup_opts.stdin_from_command", size=(100, 1)),
|
||||
],
|
||||
[sg.Text(_t("config_gui.stdin_filename"), key="text_stdin_filename")],
|
||||
[
|
||||
sg.Text(
|
||||
_t("config_gui.stdin_filename"),
|
||||
key="text_stdin_filename",
|
||||
visible=False,
|
||||
)
|
||||
],
|
||||
[
|
||||
sg.Image(
|
||||
NON_INHERITED_ICON,
|
||||
key="inherited.backup_opts.stdin_filename",
|
||||
tooltip=_t("config_gui.group_inherited"),
|
||||
pad=1,
|
||||
visible=False,
|
||||
),
|
||||
sg.Input(
|
||||
key="backup_opts.stdin_filename", size=(100, 1), visible=False
|
||||
),
|
||||
sg.Input(key="backup_opts.stdin_filename", size=(100, 1)),
|
||||
],
|
||||
[
|
||||
sg.Column(
|
||||
|
|
|
@ -46,6 +46,7 @@ en:
|
|||
snapshot_is_empty: Snapshot is empty
|
||||
cancel_operation: Are you sure you want to cancel the operation? Try to avoid interrupting write operations
|
||||
load_existing_file: Load existing config file
|
||||
failed_operation: Failed operation, Please check the logs
|
||||
|
||||
# logs
|
||||
last_messages: Last messages
|
||||
|
|
|
@ -46,7 +46,8 @@ fr:
|
|||
snapshot_is_empty: L'instantané est vide
|
||||
cancel_operation: Etes-vous sûr de vouloir annuler l'opération? Essayez d'éviter d'interrompre les opérations d'écriture
|
||||
load_existing_file: Charger fichier de configuration existant
|
||||
|
||||
failed_operation: Operation échouée. Vérifier les journaux
|
||||
|
||||
# logs
|
||||
last_messages: Last messages
|
||||
error_messages: Error messages
|
Loading…
Add table
Reference in a new issue