mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-09 21:17:47 +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,
|
__ignore_errors=GUI_STATUS_IGNORE_ERRORS,
|
||||||
)
|
)
|
||||||
GUI_STATUS_IGNORE_ERRORS = False
|
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
|
snapshots = None
|
||||||
else:
|
sg.popup_error(_t("mail_gui.failed_operation"))
|
||||||
snapshots = result["output"]
|
|
||||||
try:
|
try:
|
||||||
min_backup_age = repo_config.g("repo_opts.minimum_backup_age")
|
min_backup_age = repo_config.g("repo_opts.minimum_backup_age")
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
|
@ -941,7 +941,9 @@ def config_gui(full_config: dict, config_file: str):
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
sg.Text(
|
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",
|
key="inherited.backup_opts.stdin_from_command",
|
||||||
tooltip=_t("config_gui.group_inherited"),
|
tooltip=_t("config_gui.group_inherited"),
|
||||||
pad=1,
|
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(
|
sg.Image(
|
||||||
NON_INHERITED_ICON,
|
NON_INHERITED_ICON,
|
||||||
key="inherited.backup_opts.stdin_filename",
|
key="inherited.backup_opts.stdin_filename",
|
||||||
tooltip=_t("config_gui.group_inherited"),
|
tooltip=_t("config_gui.group_inherited"),
|
||||||
pad=1,
|
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(
|
sg.Column(
|
||||||
|
|
|
@ -46,6 +46,7 @@ en:
|
||||||
snapshot_is_empty: Snapshot is empty
|
snapshot_is_empty: Snapshot is empty
|
||||||
cancel_operation: Are you sure you want to cancel the operation? Try to avoid interrupting write operations
|
cancel_operation: Are you sure you want to cancel the operation? Try to avoid interrupting write operations
|
||||||
load_existing_file: Load existing config file
|
load_existing_file: Load existing config file
|
||||||
|
failed_operation: Failed operation, Please check the logs
|
||||||
|
|
||||||
# logs
|
# logs
|
||||||
last_messages: Last messages
|
last_messages: Last messages
|
||||||
|
|
|
@ -46,7 +46,8 @@ fr:
|
||||||
snapshot_is_empty: L'instantané est vide
|
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
|
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
|
load_existing_file: Charger fichier de configuration existant
|
||||||
|
failed_operation: Operation échouée. Vérifier les journaux
|
||||||
|
|
||||||
# logs
|
# logs
|
||||||
last_messages: Last messages
|
last_messages: Last messages
|
||||||
error_messages: Error messages
|
error_messages: Error messages
|
Loading…
Add table
Reference in a new issue