Skip to content

Commit

Permalink
Amend analysis page icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmcorvidae committed Oct 2, 2024
1 parent 972c0f4 commit 666ae5b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 17 deletions.
53 changes: 39 additions & 14 deletions src/components/analyses/landing/AnalysisSubmissionLanding.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ import {
useTheme,
} from "@mui/material";
import {
ContactSupport,
Cancel as CancelIcon,
ExpandMore,
HourglassEmptyRounded as HourGlassIcon,
Refresh,
Launch,
} from "@mui/icons-material";
Expand Down Expand Up @@ -392,28 +393,52 @@ export default function AnalysisSubmissionLanding(props) {
{!isSmDown && <>{t("refresh")}</>}
</Button>
</Grid>
<Grid item>
{allowShareWithSupport && (
{allowTimeExtn && (
<Grid item>
<Button
id={buildID(
baseId,
ids.SHARE_WITH_SUPPORT
ids.MENUITEM_EXTEND_TIME_LIMIT
)}
variant="outlined"
onClick={() =>
setHelpOpen(true)
}
size="small"
startIcon={
<ContactSupport fontSize="small" />
}
disableElevation
color="primary"
title={t("requestHelp")}
onClick={() => {
setConfirmExtendTimeLimitDlgOpen(
true
);
}}
startIcon={<HourGlassIcon />}
>
{t("requestHelp")}
{!isSmDown && (
<>{t("extendTime")}</>
)}
</Button>
)}
</Grid>
</Grid>
)}
{allowCancel && (
<Grid item>
<Button
id={buildID(
baseId,
ids.MENUITEM_CANCEL
)}
variant="outlined"
size="small"
disableElevation
color="primary"
onClick={() => {
handleTerminateSelected();
}}
startIcon={<CancelIcon />}
>
{!isSmDown && (
<>{t("terminate")}</>
)}
</Button>
</Grid>
)}
</>
)}

Expand Down
6 changes: 3 additions & 3 deletions src/components/analyses/landing/DotMenuItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function DotMenuItems(props) {
<ListItemText primary={t("refresh")} />
</MenuItem>
),
isMdDown && allowShareWithSupport && (
allowShareWithSupport && (
<MenuItem
key={buildID(baseId, ids.MENUITEM_SHARE_WITH_SUPPORT)}
id={buildID(baseId, ids.MENUITEM_SHARE_WITH_SUPPORT)}
Expand Down Expand Up @@ -166,7 +166,7 @@ export default function DotMenuItems(props) {
<ListItemText primary={t("updateComments")} />
</MenuItem>
),
allowTimeExtn && (
isMdDown && allowTimeExtn && (
<MenuItem
key={buildID(baseId, ids.MENUITEM_EXTEND_TIME_LIMIT)}
id={buildID(baseId, ids.MENUITEM_EXTEND_TIME_LIMIT)}
Expand All @@ -181,7 +181,7 @@ export default function DotMenuItems(props) {
<ListItemText primary={t("extendTime")} />
</MenuItem>
),
allowCancel && (
isMdDown && allowCancel && (
<MenuItem
key={buildID(baseId, ids.MENUITEM_CANCEL)}
id={buildID(baseId, ids.MENUITEM_CANCEL)}
Expand Down

0 comments on commit 666ae5b

Please sign in to comment.