From f642cdd274514b4c093a11cb1fdaefd4bbc7c33f Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 11 Feb 2025 16:15:25 +0800 Subject: [PATCH] refactor: improve preview media action buttons layout and styling - Restructure preview media action buttons container - Remove unnecessary pointer-events-none class from inner div - Wrap action buttons in an additional container for better overflow handling - Maintain existing functionality for download and open in browser actions Signed-off-by: Innei --- .../src/components/ui/media/preview-media.tsx | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/apps/renderer/src/components/ui/media/preview-media.tsx b/apps/renderer/src/components/ui/media/preview-media.tsx index e4263127d..7230e1bff 100644 --- a/apps/renderer/src/components/ui/media/preview-media.tsx +++ b/apps/renderer/src/components/ui/media/preview-media.tsx @@ -110,39 +110,41 @@ const Wrapper: Component<{ > {children} - - {showActions && ( - - {IN_ELECTRON && ( +
+ + {showActions && ( + + {IN_ELECTRON && ( + { + tipcClient?.download(src) + }} + > + + + )} { - tipcClient?.download(src) + window.open(src) }} > - + - )} - { - window.open(src) - }} - > - - - - )} - + + )} + +
{!!sideContent && (