forked from equinor/flotilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
183 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
frontend/src/components/MissionOverview/MissionStatusDisplay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Icon, Typography } from '@equinor/eds-core-react' | ||
import { check_circle_outlined, error_outlined, time, warning_outlined } from '@equinor/eds-icons' | ||
import { tokens } from '@equinor/eds-tokens' | ||
import { MissionStatus } from 'models/mission' | ||
import styled from 'styled-components' | ||
|
||
Icon.add({ check_circle_outlined, error_outlined, warning_outlined, time }) | ||
|
||
interface StatusProps { | ||
status: MissionStatus | ||
} | ||
|
||
const StyledStatusDisplay = styled.div` | ||
display: flex; | ||
gap: 0.3em; | ||
align-items: flex-end; | ||
` | ||
|
||
function displayIcon(status: MissionStatus) { | ||
switch (status) { | ||
case MissionStatus.Pending: { | ||
return <Icon name="time" style={{ color: tokens.colors.text.static_icons__secondary.rgba }} /> | ||
} | ||
case MissionStatus.Started: { | ||
return <Icon name="time" style={{ color: tokens.colors.text.static_icons__secondary.rgba }} /> | ||
} | ||
case MissionStatus.Warning: { | ||
return <Icon name="warning_outlined" style={{ color: tokens.colors.interactive.warning__resting.rgba }} /> | ||
} | ||
case MissionStatus.Successful: { | ||
return ( | ||
<Icon name="check_circle_outlined" style={{ color: tokens.colors.interactive.success__resting.rgba }} /> | ||
) | ||
} | ||
} | ||
return <Icon name="error_outlined" style={{ color: tokens.colors.interactive.danger__resting.rgba }} /> | ||
} | ||
|
||
export function MissionStatusDisplay({ status }: StatusProps) { | ||
return ( | ||
<StyledStatusDisplay> | ||
{displayIcon(status)} | ||
<Typography>{status}</Typography> | ||
</StyledStatusDisplay> | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend/src/components/MissionOverview/MissionTagDisplay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Typography } from '@equinor/eds-core-react' | ||
import styled from 'styled-components' | ||
|
||
const StyledTagCount = styled.div` | ||
display: flex; | ||
` | ||
|
||
export function MissionProgressDisplay() { | ||
return ( | ||
<StyledTagCount> | ||
<Typography>Tag ?/?</Typography> | ||
</StyledTagCount> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
import { Button } from "@equinor/eds-core-react" | ||
import { useApi } from "api/ApiCaller" | ||
import { VideoStreamWindow } from "components/VideoStream/VideoStreamWindow" | ||
import styled from "styled-components" | ||
import { Button } from '@equinor/eds-core-react' | ||
import { useApi } from 'api/ApiCaller' | ||
import { VideoStreamWindow } from 'components/VideoStream/VideoStreamWindow' | ||
import styled from 'styled-components' | ||
|
||
const VideoStreamSection = styled.div` | ||
display: flex; | ||
` | ||
|
||
|
||
export function MissionPage() { | ||
const apiCaller = useApi() | ||
return ( | ||
<div> | ||
<VideoStreamSection> | ||
<VideoStreamWindow /> | ||
</VideoStreamSection> | ||
<Button href="..">FrontPage</Button> | ||
<VideoStreamSection> | ||
<VideoStreamWindow /> | ||
</VideoStreamSection> | ||
<Button href="..">FrontPage</Button> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { Card } from "@equinor/eds-core-react"; | ||
import { tokens } from "@equinor/eds-tokens"; | ||
import styled from "styled-components"; | ||
import { Card } from '@equinor/eds-core-react' | ||
import { tokens } from '@equinor/eds-tokens' | ||
import styled from 'styled-components' | ||
|
||
const VideoCard = styled(Card)` | ||
width: 400px; | ||
height: 400px; | ||
` | ||
|
||
|
||
export function VideoStreamWindow() { | ||
return( | ||
<VideoCard variant="default" style={{ boxShadow: tokens.elevation.sticky }}> | ||
Hello | ||
</VideoCard> | ||
)} | ||
return ( | ||
<VideoCard variant="default" style={{ boxShadow: tokens.elevation.sticky }}> | ||
Hello | ||
</VideoCard> | ||
) | ||
} |
Oops, something went wrong.