Skip to content

Commit

Permalink
Change design of deck inspection placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Oct 4, 2023
1 parent 2c65f16 commit 1f40907
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
14 changes: 12 additions & 2 deletions frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const StyledDeckCards = styled.div`
gap: 1rem;
`

const StyledPlaceholder = styled.div`
padding: 24px;
border: 1px solid #dcdcdc;
border-radius: 4px;
`

const StyledContent = styled.div`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -154,8 +160,8 @@ export function InspectionSection({ refreshInterval }: RefreshProps) {

return (
<>
<Typography variant="h1">{TranslateText('Deck Inspections')}</Typography>
<StyledContent>
<Typography variant="h1">{TranslateText('Deck Inspections')}</Typography>
<StyledDeckCards>
{Object.keys(deckMissions).length > 0 ? (
Object.keys(deckMissions).map((deckId) => (
Expand Down Expand Up @@ -186,7 +192,11 @@ export function InspectionSection({ refreshInterval }: RefreshProps) {
</StyledCard>
))
) : (
<Typography variant="h1">{TranslateText('No Deck Inspections Available')}</Typography>
<StyledPlaceholder>
<Typography variant="h4" color="disabled">
{TranslateText('No deck inspections available')}
</Typography>
</StyledPlaceholder>
)}
</StyledDeckCards>
{selectedDeck && (
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
"Past deadline": "Past deadline",
"Up to date": "Up to date",
"Due within two weeks": "Due within two weeks",
"No Area Inspections Available": "No Area Inspections Available",
"No Deck Inspections Available": "No Deck Inspections Available",
"No deck inspections available": "No deck inspections available",
"Queue mission": "Queue mission",
"This installation has no missions": "This installation has no missions",
"Inspection Missions": "Inspection Missions",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/language/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
"Past deadline": "Frist utløpt",
"Due within two weeks": "Frist innen to uker",
"Up to date": "Oppdatert",
"No Area Inspections Available": "Ingen tilgjengelige områdeinspeksjoner",
"No Deck Inspections Available": "Ingen tilgjengelige dekkinspeksjoner",
"No deck inspections available": "Ingen tilgjengelige dekkinspeksjoner",
"Queue mission": "Legg til oppdrag i køen",
"This installation has no missions": "Denne installasjonen har ingen oppdrag",
"Inspection Missions": "Inspeksjonsoppdrag",
Expand Down

0 comments on commit 1f40907

Please sign in to comment.