From 5cef5757a50a5cbec89629fb747bbfad06a01c02 Mon Sep 17 00:00:00 2001 From: Caroline Denis Date: Thu, 6 Aug 2026 14:50:33 +0200 Subject: [PATCH 1/2] Fix: Remove extra close button for app resource overlay --- .../js_src/lib/components/AppResources/Editor.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx b/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx index aee52d71d0c..1ce8e193d3d 100644 --- a/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx +++ b/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx @@ -240,11 +240,17 @@ export function AppResourceEditor({ const footer = ( <> - navigate('/specify/resources/', { replace: true })} - > + { + // handleClone is undefined when the editor is used in a dialog, so don't show the close button in that case + handleClone === undefined ? + undefined + : + navigate('/specify/resources/', { replace: true })} + > {commonText.close()} - + + } {formElement !== null && hasToolPermission( From 1e5786de3fe1e4d3c185f4f1ce82df21d178c0de Mon Sep 17 00:00:00 2001 From: Caroline Denis Date: Thu, 6 Aug 2026 15:00:52 +0200 Subject: [PATCH 2/2] Format --- .../lib/components/AppResources/Editor.tsx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx b/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx index 1ce8e193d3d..b3b48965c77 100644 --- a/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx +++ b/specifyweb/frontend/js_src/lib/components/AppResources/Editor.tsx @@ -240,16 +240,17 @@ export function AppResourceEditor({ const footer = ( <> - { - // handleClone is undefined when the editor is used in a dialog, so don't show the close button in that case - handleClone === undefined ? - undefined - : - navigate('/specify/resources/', { replace: true })} - > - {commonText.close()} - + { + // handleClone is undefined when the editor is used in a dialog, so don't show the close button in that case + handleClone === undefined ? undefined : ( + + navigate('/specify/resources/', { replace: true }) + } + > + {commonText.close()} + + ) } {formElement !== null &&