Skip to content

Commit

Permalink
Improve alerts list
Browse files Browse the repository at this point in the history
  • Loading branch information
mrica-equinor committed Oct 28, 2024
1 parent f4fdf36 commit d324f95
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
20 changes: 13 additions & 7 deletions frontend/src/components/Alerts/AlertsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ const StyledListHeading = styled(outline)`
display: flex;
justify-content: space-between;
padding: 6px 5px 6px 5px;
border-radius: 3px 3px 0px 0px;
`
const StyledListItem = styled(outline)`
display: flex;
flex-direction: column;
align-items: left;
row-gap: 10px;
border-radius: 0px 0px 3px 3px;
`

const VerticalContent = styled.div`
Expand All @@ -59,6 +61,14 @@ const Right = styled.div`
display: flex;
align-items: right;
justify-content: right;
align-content: center;
`
const StyledButton = styled(Button)`
margin-top: 6px;
right: 30px;
position: absolute;
height: 30px;
width: 30px;
`

interface AlertListInfo {
Expand Down Expand Up @@ -111,13 +121,9 @@ export const AlertListItem = ({ children, dismissAlert }: AlertProps) => {
return (
<Horizontal>
{children}
<Button
variant="ghost_icon"
onClick={dismissAlert}
style={{ marginTop: '0px', right: '25px', position: 'absolute' }}
>
<Icon name={Icons.Clear}></Icon>
</Button>
<StyledButton variant="ghost_icon" onClick={dismissAlert}>
<Icon name={Icons.Clear} size={18}></Icon>
</StyledButton>
</Horizontal>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const MissionMapView = ({ mission }: MissionProps) => {

return (
<MapCard style={{ boxShadow: tokens.elevation.raised }}>
<Typography variant='h3'>{mission.map?.mapName}</Typography>
<Typography variant="h3">{mission.map?.mapName}</Typography>
<SyledContainer>
<StyledElements>
<StyledMap id="mapCanvas" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const TitleSection = styled.div`
display: flex;
align-items: center;
gap: 20px;
`
const InfoSection = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLanguageContext } from 'components/Contexts/LanguageContext'
import { Task, TaskStatus } from 'models/Task'
import { tokens } from '@equinor/eds-tokens'
import { getColorsFromTaskStatus } from 'utils/MarkerStyles'
import { StyledTableBody, StyledTableCaption, StyledTableCaptionGray, StyledTableCell } from 'components/Styles/StyledComponents'
import { StyledTableBody, StyledTableCaptionGray, StyledTableCell } from 'components/Styles/StyledComponents'

const StyledTable = styled(Table)`
display: block;
Expand Down Expand Up @@ -36,7 +36,7 @@ export const TaskTable = ({ tasks }: { tasks: Task[] | undefined }) => {
<StyledTableCaptionGray>
<StyledTypography variant="h2">{TranslateText('Tasks')}</StyledTypography>
</StyledTableCaptionGray>
<Table.Head >
<Table.Head>
<Table.Row>
<StyledTableCell>#</StyledTableCell>
<StyledTableCell>{TranslateText('Tag-ID')}</StyledTableCell>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/DeckMapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const DeckMapView = ({ deck, markedRobotPosition }: DeckProps) => {
)}
{!isLoading && (
<StyledMapLimits>
<Typography variant='h2'>
<Typography variant="h2">
{mapMetadata?.mapName ? mapMetadata.mapName : 'No map available'}
</Typography>
<StyledMapCompass>
Expand Down

0 comments on commit d324f95

Please sign in to comment.