From d64b21357b8682f061c9460c8aee38e855d5ce70 Mon Sep 17 00:00:00 2001 From: Matthew Yung <117509016+myung03@users.noreply.github.com> Date: Mon, 27 May 2024 10:28:49 -0700 Subject: [PATCH] added feedback for delete (#2507) * added feedback for delete * fixed requested common.json issues --- .../Layout/Sidebar/sections/Locations/ContextMenu.tsx | 6 +++++- interface/locales/en/common.json | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/app/$libraryId/Layout/Sidebar/sections/Locations/ContextMenu.tsx b/interface/app/$libraryId/Layout/Sidebar/sections/Locations/ContextMenu.tsx index 3688adc4b..589ed0c9a 100644 --- a/interface/app/$libraryId/Layout/Sidebar/sections/Locations/ContextMenu.tsx +++ b/interface/app/$libraryId/Layout/Sidebar/sections/Locations/ContextMenu.tsx @@ -42,6 +42,7 @@ export const ContextMenu = ({ /> )); } + } catch (error) { toast.error(t('error_message', { error })); } @@ -66,7 +67,10 @@ export const ContextMenu = ({ dialogManager.create((dp) => ( navigate('settings/library/locations')} + onSuccess={() => { + toast.success(t('location_deleted_successfully')); + navigate('settings/library/locations'); + }} locationId={locationId} /> )); diff --git a/interface/locales/en/common.json b/interface/locales/en/common.json index 55cad6df4..8cd4b92dc 100644 --- a/interface/locales/en/common.json +++ b/interface/locales/en/common.json @@ -388,7 +388,9 @@ "local_locations": "Local Locations", "local_node": "Local Node", "location": "Location", + "location_added_successfully": "Location added successfully.", "location_connected_tooltip": "Location is being watched for changes", + "location_deleted_successfully": "Location deleted successfully.", "location_disconnected_tooltip": "Location is not being watched for changes", "location_display_name_info": "The name of this Location, this is what will be displayed in the sidebar. Will not rename the actual folder on disk.", "location_empty_notice_message": "No files found here",