Skip to content

Commit

Permalink
Styling improvements to the viewer options
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanLeRoy committed Nov 19, 2024
1 parent 646646c commit e610a11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/core/hooks/useOpenWithMenuItems/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const APPS = (fileDetails?: FileDetail): Apps => ({
return (
<>
{defaultRenders.renderItemName(props)}
<span className={styles.secondaryText}>Desktop |</span>
<a
className={styles.viewLink}
href="https://www.allencell.org/pathtrace-rendering.html"
Expand All @@ -68,6 +67,7 @@ const APPS = (fileDetails?: FileDetail): Apps => ({
<Icon iconName="OpenInNewWindow" />
</DefaultButton>
</a>
<span className={styles.secondaryText}>| Desktop</span>
</>
);
},
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
color: var(--white);
font-size: 12px !important;
opacity: 0.5;
padding-left: 10px;
}

.desktop-menu-item .info-button > span {
Expand All @@ -53,3 +52,7 @@
.desktop-menu-item a {
padding-left: 0;
}

.view-link {
padding-left: 24px !important;
}

0 comments on commit e610a11

Please sign in to comment.