mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-06 03:35:26 +08:00
GUI: Improve object deletion UX when no object exists
This commit is contained in:
parent
23ecad40ab
commit
1e4b596c89
3 changed files with 6 additions and 1 deletions
|
@ -199,7 +199,10 @@ def config_gui(full_config: dict, config_file: str):
|
|||
|
||||
def delete_object(full_config: dict, full_object_name: str) -> dict:
|
||||
object_type, object_name = get_object_from_combo(full_object_name)
|
||||
result = sg.PopupYesNo(
|
||||
if not object_type and not object_name:
|
||||
sg.popup_error(_t("config_gui.no_object_to_delete"), keep_on_top=True)
|
||||
return full_config
|
||||
result = sg.popup_yes_no(
|
||||
_t("config_gui.are_you_sure_to_delete") + f" {object_type} {object_name} ?"
|
||||
)
|
||||
if result == "Yes":
|
||||
|
|
|
@ -136,6 +136,7 @@ en:
|
|||
add_object: Add another repo or group
|
||||
delete_object: Delete selected repo or group
|
||||
are_you_sure_to_delete: Are you sure you want to delete
|
||||
no_object_to_delete: No object to delete
|
||||
repo_already_exists: Repo already exists
|
||||
group_already_exists: Group already exists
|
||||
cannot_remove_group_inherited_settings: Cannot remove group inherited settings. Please remove directly in group configuration
|
||||
|
|
|
@ -137,6 +137,7 @@ fr:
|
|||
add_object: Ajouter un autre dépot ou groupe
|
||||
delete_object: Supprimer le dépot ou groupe actuel
|
||||
are_you_sure_to_delete: Êtes-vous sûr de vouloir supprimer le
|
||||
no_object_to_delete: Aucun objet à supprimer
|
||||
repo_already_exists: Dépot déjà existant
|
||||
group_already_exists: Groupe déjà existant
|
||||
cannot_remove_group_inherited_settings: Impossible de supprimer une option héritée de groupe. Veuillez supprimer l'option directement dans la configuration de groupe
|
||||
|
|
Loading…
Add table
Reference in a new issue