From 23b4d4f1e055cbd8251a472d91e59f1df1f33339 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:07:02 +1100 Subject: [PATCH] Show confirmation when deleting via keybind (#4387) --- ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx | 2 +- ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx | 2 +- ui/v2.5/src/components/Tags/TagDetails/Tag.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx b/ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx index 696259f5337..299f47ea38b 100644 --- a/ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx +++ b/ui/v2.5/src/components/Movies/MovieDetails/Movie.tsx @@ -117,7 +117,7 @@ const MoviePage: React.FC = ({ movie }) => { useEffect(() => { Mousetrap.bind("e", () => toggleEditing()); Mousetrap.bind("d d", () => { - onDelete(); + setIsDeleteAlertOpen(true); }); Mousetrap.bind(",", () => setCollapsed(!collapsed)); diff --git a/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx b/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx index a7dc8c0645d..6030a81286c 100644 --- a/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx +++ b/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx @@ -147,7 +147,7 @@ const StudioPage: React.FC = ({ studio, tabKey }) => { useEffect(() => { Mousetrap.bind("e", () => toggleEditing()); Mousetrap.bind("d d", () => { - onDelete(); + setIsDeleteAlertOpen(true); }); Mousetrap.bind(",", () => setCollapsed(!collapsed)); diff --git a/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx b/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx index 6f694c2b63d..e3195dda0aa 100644 --- a/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx +++ b/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx @@ -144,7 +144,7 @@ const TagPage: React.FC = ({ tag, tabKey }) => { useEffect(() => { Mousetrap.bind("e", () => toggleEditing()); Mousetrap.bind("d d", () => { - onDelete(); + setIsDeleteAlertOpen(true); }); Mousetrap.bind(",", () => setCollapsed(!collapsed));