diff --git a/frontend/src/components/Displays/MissionButtons/MissionControlButtons.tsx b/frontend/src/components/Displays/MissionButtons/MissionControlButtons.tsx index 43fdc46d..e24c6eb6 100644 --- a/frontend/src/components/Displays/MissionButtons/MissionControlButtons.tsx +++ b/frontend/src/components/Displays/MissionButtons/MissionControlButtons.tsx @@ -1,12 +1,11 @@ import { MissionStatus } from 'models/Mission' import { Button, CircularProgress, Icon } from '@equinor/eds-core-react' import { Icons } from 'utils/icons' -import { tokens } from '@equinor/eds-tokens' import styled from 'styled-components' import { Typography } from '@equinor/eds-core-react' import { useLanguageContext } from 'components/Contexts/LanguageContext' import { useMissionControlContext } from 'components/Contexts/MissionControlContext' -import { StopMissionDialog, MissionStatusRequest } from 'components/Pages/FrontPage/MissionOverview/StopDialogs' +import { SkipMissionDialog, MissionStatusRequest } from 'components/Pages/FrontPage/MissionOverview/StopDialogs' import { TaskType } from 'models/Task' import { useState } from 'react' @@ -24,15 +23,24 @@ interface MissionProps { } const ButtonStyle = styled.div` - display: grid; - grid-template-columns: 45px 45px; - margin-end: 20px; + display: flex; + height: 56px; + align-items: flex-start; + gap: 16px; ` const ButtonText = styled.div` display: flex; flex-direction: column; align-items: center; ` +const ButtonIcon = styled(Button)` + display: flex; + width: 35px; + height: 35px; + justify-content: center; + align-items: center; + gap: 8px; +` export const MissionControlButtons = ({ missionName, @@ -72,42 +80,34 @@ const OngoingMissionButton = ({ missionName, robotId, missionTaskType }: Mission const { TranslateText } = useLanguageContext() const { updateRobotMissionState } = useMissionControlContext() const [isDialogOpen, setIsDialogOpen] = useState(false) - const toggleStopMissionDialog = () => { + const toggleSkipMissionDialog = () => { setIsDialogOpen(!isDialogOpen) } return ( - + updateRobotMissionState(MissionStatusRequest.Pause, robotId)} + > + + + {TranslateText('Pause')} + + + + + {TranslateText('Stop')} - - - - {TranslateText('Pause')} - ) } @@ -116,42 +116,34 @@ const PausedMissionButton = ({ missionName, robotId, missionTaskType }: MissionP const { TranslateText } = useLanguageContext() const { updateRobotMissionState } = useMissionControlContext() const [isDialogOpen, setIsDialogOpen] = useState(false) - const toggleStopMissionDialog = () => { + const toggleSkipMissionDialog = () => { setIsDialogOpen(!isDialogOpen) } return ( - + updateRobotMissionState(MissionStatusRequest.Resume, robotId)} + > + + + {TranslateText('Start')} + + + + + {TranslateText('Stop')} - - - - {TranslateText('Start')} - ) } diff --git a/frontend/src/components/Pages/FrontPage/MissionOverview/StopDialogs.tsx b/frontend/src/components/Pages/FrontPage/MissionOverview/StopDialogs.tsx index 3bbd72f2..9b657a96 100644 --- a/frontend/src/components/Pages/FrontPage/MissionOverview/StopDialogs.tsx +++ b/frontend/src/components/Pages/FrontPage/MissionOverview/StopDialogs.tsx @@ -56,10 +56,10 @@ const DialogContent = ({ missionTaskType }: { missionTaskType: TaskType | undefi return ( - {TranslateText('Stop button pressed during localization warning text')} + {TranslateText('Skip button pressed during localization warning text')} - {TranslateText('Stop button pressed confirmation text')} + {TranslateText('Skip button pressed confirmation text')} ) @@ -67,19 +67,19 @@ const DialogContent = ({ missionTaskType }: { missionTaskType: TaskType | undefi return ( - {TranslateText('Stop button pressed during return home warning text')} + {TranslateText('Skip button pressed during return home warning text')} - {TranslateText('Stop button pressed confirmation text')} + {TranslateText('Skip button pressed confirmation text')} ) case TaskType.Inspection: return ( - {TranslateText('Stop button pressed warning text')} + {TranslateText('Skip button pressed warning text')} - {TranslateText('Stop button pressed confirmation text')} + {TranslateText('Skip button pressed confirmation text')} ) @@ -87,32 +87,32 @@ const DialogContent = ({ missionTaskType }: { missionTaskType: TaskType | undefi return ( - {TranslateText('Stop button pressed with no tasktype warning text')} + {TranslateText('Skip button pressed with no tasktype warning text')} - {TranslateText('Stop button pressed with no mission confirmation text')} + {TranslateText('Skip button pressed with no mission confirmation text')} ) } } -export const StopMissionDialog = ({ +export const SkipMissionDialog = ({ missionName, robotId, missionTaskType, - isStopMissionDialogOpen, + isSkipMissionDialogOpen, toggleDialog, -}: MissionProps & { isStopMissionDialogOpen: boolean; toggleDialog: () => void }): JSX.Element => { +}: MissionProps & { isSkipMissionDialogOpen: boolean; toggleDialog: () => void }): JSX.Element => { const { TranslateText } = useLanguageContext() const { updateRobotMissionState } = useMissionControlContext() return ( - + - {missionName ? TranslateText('Stop mission:') : TranslateText('No mission running')}{' '} + {missionName ? TranslateText('Skip mission:') : TranslateText('No mission running')}{' '} {missionName} @@ -130,7 +130,7 @@ export const StopMissionDialog = ({ color="danger" onClick={() => updateRobotMissionState(MissionStatusRequest.Stop, robotId)} > - {TranslateText('Stop mission')} + {TranslateText('Skip mission')} diff --git a/frontend/src/components/Pages/RobotPage/RobotPage.tsx b/frontend/src/components/Pages/RobotPage/RobotPage.tsx index 54b75dfe..24ae2b57 100644 --- a/frontend/src/components/Pages/RobotPage/RobotPage.tsx +++ b/frontend/src/components/Pages/RobotPage/RobotPage.tsx @@ -21,7 +21,7 @@ import { VideoStreamWindow } from '../MissionPage/VideoStream/VideoStreamWindow' import { MoveRobotArmSection } from './RobotArmMovement' import { Icons } from 'utils/icons' import { tokens } from '@equinor/eds-tokens' -import { StopMissionDialog } from '../FrontPage/MissionOverview/StopDialogs' +import { SkipMissionDialog } from '../FrontPage/MissionOverview/StopDialogs' import { TaskType } from 'models/Task' import { useMissionsContext } from 'components/Contexts/MissionRunsContext' import { ReturnHomeButton } from './ReturnHomeButton' @@ -67,7 +67,7 @@ export const RobotPage = () => { const selectedRobot = enabledRobots.find((robot) => robot.id === robotId) const [isDialogOpen, setIsDialogOpen] = useState(false) - const toggleStopMissionDialog = () => { + const toggleSkipMissionDialog = () => { setIsDialogOpen(!isDialogOpen) } @@ -137,7 +137,7 @@ export const RobotPage = () => { { - toggleStopMissionDialog() + toggleSkipMissionDialog() }} > { size={24} /> {TranslateText('Stop')} {selectedRobot.name} - + {selectedRobot && } {selectedRobot.model.type === RobotType.TaurobInspector && ( diff --git a/frontend/src/language/en.json b/frontend/src/language/en.json index 50f5d841..dbbe6015 100644 --- a/frontend/src/language/en.json +++ b/frontend/src/language/en.json @@ -81,10 +81,10 @@ "East": "East", "South": "South", "West": "West", - "Stop button pressed warning text": "You are about to stop the entire mission. If there are no more missions in the queue, the robot will return to the start position.", - "Stop button pressed confirmation text": "Are you sure you want to stop the mission?", - "Stop mission": "Stop mission", - "Stop mission:": "Stop mission: ", + "Skip button pressed warning text": "You are about to skip the entire mission. If there are no more missions in the queue, the robot will return to the start position.", + "Skip button pressed confirmation text": "Are you sure you want to skip the mission?", + "Skip mission": "Skip mission", + "Skip mission:": "Skip mission: ", "Search for missions": "Search for missions", "Search for a tag": "Search for a tag", "Search for a robot name": "Search for a robot name", @@ -219,9 +219,9 @@ "Dock": "Dock", "Dock successful text": "The robots are docked and will not run missions. To continue the mission press the 'Dismiss from dock' button.", "Connection Issues": "Connection Issues", - "Stop button pressed during return home warning text": "You are about to stop a mission that will send the robot back to the start position. You must manually drive the robot to the start position to start a new mission.", + "Skip button pressed during return home warning text": "You are about to skip a mission that will send the robot back to the start position. You must manually drive the robot to the start position to start a new mission.", "Failed Telemetry": "Failed Telemetry", - "Stop button pressed during localization warning text": "You are about to stop a mission that localizes the robot. You will not be able to run an inspection mission until you have successfully localized the robot.", + "Skip button pressed during localization warning text": "You are about to skip a mission that localizes the robot. You will not be able to run an inspection mission until you have successfully localized the robot.", "HighHigh": "HighHigh", "High": "High", "Ok": "Ok", @@ -264,9 +264,9 @@ "Open mission": "Open mission", "Open robot information": "Open robot information", "Not available": "Not available", - "Stop button pressed with no tasktype warning text": "A stop command was recieved with no ongoing tasks.", + "Skip button pressed with no tasktype warning text": "A skip command was recieved with no ongoing tasks.", "No mission running": "No Flotilla mission is running", - "Stop button pressed with no mission confirmation text": "Do you want to send the stop command to the robot regardless?", + "Skip button pressed with no mission confirmation text": "Do you want to send the command to stop current mission to the robot regardless?", "Tag": "Tag", "Timestamp": "Timestamp", "Last completed inspection": "Last completed inspection", diff --git a/frontend/src/language/no.json b/frontend/src/language/no.json index 569cca2c..8d468e93 100644 --- a/frontend/src/language/no.json +++ b/frontend/src/language/no.json @@ -81,10 +81,10 @@ "East": "Øst", "South": "Sør", "West": "Vest", - "Stop button pressed warning text": "Du er i ferd med å stoppe hele oppdraget. Hvis det ikke er flere oppdrag i kø vil roboten bli sendt tilbake til startposisjonen sin.", - "Stop button pressed confirmation text": "Er du sikker på at du vil stoppe oppdraget?", - "Stop mission": "Stopp oppdraget", - "Stop mission:": "Stopp oppdrag: ", + "Skip button pressed warning text": "Du er i ferd med å hoppe over hele oppdraget. Hvis det ikke er flere oppdrag i kø vil roboten bli sendt tilbake til startposisjonen sin.", + "Skip button pressed confirmation text": "Er du sikker på at du vil hoppe over oppdraget?", + "Skip mission": "Hopp over oppdraget", + "Skip mission:": "Hopp over oppdrag: ", "Search for missions": "Søk etter oppdrag", "Search for a tag": "Søk etter tag", "Search for a robot name": "Søk etter robotnavn", @@ -219,9 +219,9 @@ "Dock": "Ladestasjon", "Dock successful text": "Robotene er i ladestasjonen og vil ikke kjøre oppdrag. For å fortsette oppdrag trykk på knappen 'Slipp robotene ut fra ladestasjon'.", "Connection Issues": "Tilkoblings\u00adproblemer", - "Stop button pressed during return home warning text": "Du er i ferd med å stoppe et oppdrag som sender roboten tilbake til startposisjonen. Du må kjøre roboten manuelt til startposisjonen for å starte et nytt oppdrag.", + "Skip button pressed during return home warning text": "Du er i ferd med å hoppe over et oppdrag som sender roboten tilbake til startposisjonen. Du må kjøre roboten manuelt til startposisjonen for å starte et nytt oppdrag.", "Failed Telemetry": "Mislykket telemetri", - "Stop button pressed during localization warning text": "Du er i ferd med å stoppe et oppdrag som lokaliserer roboten. Du vil ikke kunne kjøre et inspeksjonsoppdrag før du har lokalisert roboten.", + "Skip button pressed during localization warning text": "Du er i ferd med å hoppe over et oppdrag som lokaliserer roboten. Du vil ikke kunne kjøre et inspeksjonsoppdrag før du har lokalisert roboten.", "HighHigh": "HøyHøy", "High": "Høy", "Ok": "Ok", @@ -265,8 +265,8 @@ "Open robot information": "Åpne robotinformasjon", "Not available": "Ikke tilgjengelig", "No mission running": "Ingen pågående Flotilla oppdrag", - "Stop button pressed with no tasktype warning text": "Et stopp signal ble mottat uten noen pågående oppdrag.", - "Stop button pressed with no mission confirmation text": "Ønsker du å sende stopp signalet til roboten likevel?", + "Skip button pressed with no tasktype warning text": "Et signal om å hoppe over oppdraget ble mottat uten noen pågående oppdrag.", + "Skip button pressed with no mission confirmation text": "Ønsker du å sende signalet om å stoppe nåværende oppdrag til roboten likevel?", "Tag": "Tag", "Timestamp": "Tidspunkt", "Last completed inspection": "Siste gjennomførte inspeksjon", diff --git a/frontend/src/utils/icons.tsx b/frontend/src/utils/icons.tsx index 3cd280af..b1d71c5b 100644 --- a/frontend/src/utils/icons.tsx +++ b/frontend/src/utils/icons.tsx @@ -43,6 +43,8 @@ import { blocked, close_circle_outlined, file_description, + skip_next, + pause, } from '@equinor/eds-icons' Icon.add({ @@ -89,6 +91,8 @@ Icon.add({ blocked, close_circle_outlined, file_description, + skip_next, + pause, }) export enum Icons { @@ -129,10 +133,12 @@ export enum Icons { Settings = 'settings', Platform = 'platform', LibraryAdd = 'library_add', - PlayTriangle = 'play', + PlayStandard = 'play', Edit = 'edit', Info = 'info_circle', Blocked = 'blocked', ClosedCircleOutlined = 'close_circle_outlined', FileDescription = 'file_description', + Next = 'skip_next', + PauseStandard = 'pause', }