From e610a11bd0a4c7bd7f9b7ea8da29de4a7c3782c3 Mon Sep 17 00:00:00 2001 From: SeanLeRoy Date: Tue, 19 Nov 2024 15:33:24 -0800 Subject: [PATCH] Styling improvements to the viewer options --- packages/core/hooks/useOpenWithMenuItems/index.tsx | 7 ++++--- .../useOpenWithMenuItems/useOpenWithMenuItems.module.css | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/hooks/useOpenWithMenuItems/index.tsx b/packages/core/hooks/useOpenWithMenuItems/index.tsx index 24add203..db11f5d0 100644 --- a/packages/core/hooks/useOpenWithMenuItems/index.tsx +++ b/packages/core/hooks/useOpenWithMenuItems/index.tsx @@ -53,7 +53,6 @@ const APPS = (fileDetails?: FileDetail): Apps => ({ return ( <> {defaultRenders.renderItemName(props)} - Desktop | ({ + | Desktop ); }, @@ -138,10 +138,11 @@ const APPS = (fileDetails?: FileDetail): Apps => ({ } as IContextualMenuItem, }); -function getPrioritySupportedApps(fileDetails?: FileDetail): IContextualMenuItem[] { +function getSupportedApps(fileDetails?: FileDetail): IContextualMenuItem[] { if (!fileDetails) { return []; } + const isLikelyLocalFile = !fileDetails.path.startsWith("http") && !fileDetails.path.startsWith("s3"); @@ -242,7 +243,7 @@ export default (fileDetails?: FileDetail, filters?: FileFilter[]): IContextualMe }) .sort((a, b) => (a.text || "").localeCompare(b.text || "")); - const supportedApps = [...getPrioritySupportedApps(fileDetails), ...userApps]; + const supportedApps = [...getSupportedApps(fileDetails), ...userApps]; // Grab every other known app const unsupportedApps = Object.values(APPS(fileDetails)) .filter((app) => supportedApps.every((item) => item.key !== app.key)) diff --git a/packages/core/hooks/useOpenWithMenuItems/useOpenWithMenuItems.module.css b/packages/core/hooks/useOpenWithMenuItems/useOpenWithMenuItems.module.css index d8991728..274e3d48 100644 --- a/packages/core/hooks/useOpenWithMenuItems/useOpenWithMenuItems.module.css +++ b/packages/core/hooks/useOpenWithMenuItems/useOpenWithMenuItems.module.css @@ -30,7 +30,6 @@ color: var(--white); font-size: 12px !important; opacity: 0.5; - padding-left: 10px; } .desktop-menu-item .info-button > span { @@ -53,3 +52,7 @@ .desktop-menu-item a { padding-left: 0; } + +.view-link { + padding-left: 24px !important; +}