mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
parent
a2c8e80345
commit
d089e771da
@ -1,6 +1,5 @@
|
|||||||
import { styled } from '@mui/material';
|
import { styled } from '@mui/material';
|
||||||
import HourglassEmptyOutlinedIcon from '@mui/icons-material/HourglassEmptyOutlined';
|
import HourglassEmptyOutlinedIcon from '@mui/icons-material/HourglassEmptyOutlined';
|
||||||
import PlayCircleIcon from '@mui/icons-material/PlayCircle';
|
|
||||||
import type { IReleasePlanMilestone } from 'interfaces/releasePlans';
|
import type { IReleasePlanMilestone } from 'interfaces/releasePlans';
|
||||||
import { isToday, isTomorrow, format, addMinutes } from 'date-fns';
|
import { isToday, isTomorrow, format, addMinutes } from 'date-fns';
|
||||||
import { calculateMilestoneStartTime } from '../utils/calculateMilestoneStartTime.ts';
|
import { calculateMilestoneStartTime } from '../utils/calculateMilestoneStartTime.ts';
|
||||||
@ -35,20 +34,11 @@ const StyledTimeContainer = styled('span')(({ theme }) => ({
|
|||||||
borderRadius: theme.shape.borderRadiusLarge,
|
borderRadius: theme.shape.borderRadiusLarge,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledHourglassIcon = styled(HourglassEmptyOutlinedIcon)(({ theme }) => ({
|
const StyledIcon = styled(HourglassEmptyOutlinedIcon)(({ theme }) => ({
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.primary.main,
|
color: theme.palette.primary.main,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledPlayIcon = styled(PlayCircleIcon)(({ theme }) => ({
|
|
||||||
fontSize: 18,
|
|
||||||
color: theme.palette.primary.main,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const PrimaryText = styled('span')(({ theme }) => ({
|
|
||||||
color: theme.palette.primary.main,
|
|
||||||
}));
|
|
||||||
|
|
||||||
interface IMilestoneNextStartTimeProps {
|
interface IMilestoneNextStartTimeProps {
|
||||||
milestone: IReleasePlanMilestone;
|
milestone: IReleasePlanMilestone;
|
||||||
allMilestones: IReleasePlanMilestone[];
|
allMilestones: IReleasePlanMilestone[];
|
||||||
@ -85,15 +75,13 @@ export const MilestoneNextStartTime = ({
|
|||||||
activeMilestoneId,
|
activeMilestoneId,
|
||||||
);
|
);
|
||||||
|
|
||||||
const text = projectedStartTime ? (
|
const text = projectedStartTime
|
||||||
`Starting ${formatSmartDate(projectedStartTime)}`
|
? `Starting ${formatSmartDate(projectedStartTime)}`
|
||||||
) : (
|
: 'Waiting to start';
|
||||||
<PrimaryText>Start manually</PrimaryText>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledTimeContainer>
|
<StyledTimeContainer>
|
||||||
{projectedStartTime ? <StyledHourglassIcon /> : <StyledPlayIcon />}
|
<StyledIcon />
|
||||||
{text}
|
{text}
|
||||||
</StyledTimeContainer>
|
</StyledTimeContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user