Skip to content

Commit

Permalink
Merge pull request #595 from ianmcorvidae/analysis-page-tweaks
Browse files Browse the repository at this point in the history
Amend analysis page icons
  • Loading branch information
ianmcorvidae authored Oct 4, 2024
2 parents 972c0f4 + e331e5d commit 9528645
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
53 changes: 40 additions & 13 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,54 @@ 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"
disableElevation
color="primary"
onClick={() => {
setConfirmExtendTimeLimitDlgOpen(
true
);
}}
startIcon={<HourGlassIcon />}
>
{!isSmDown && (
<>{t("extendTime")}</>
)}
</Button>
</Grid>
)}
{allowCancel && (
<Grid item>
<Button
id={buildID(
baseId,
ids.MENUITEM_CANCEL
)}
variant="outlined"
size="small"
disableElevation
color="primary"
onClick={() => {
handleTerminateSelected();
}}
startIcon={
<ContactSupport fontSize="small" />
<CancelIcon color="error" />
}
color="primary"
title={t("requestHelp")}
>
{t("requestHelp")}
{!isSmDown && (
<>{t("terminate")}</>
)}
</Button>
)}
</Grid>
</Grid>
)}
</>
)}

Expand Down
8 changes: 4 additions & 4 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 All @@ -191,7 +191,7 @@ export default function DotMenuItems(props) {
}}
>
<ListItemIcon>
<CancelIcon fontSize="small" />
<CancelIcon color="error" fontSize="small" />
</ListItemIcon>
<ListItemText primary={t("terminate")} />
</MenuItem>
Expand Down

0 comments on commit 9528645

Please sign in to comment.