diff --git a/frontend/src/components/BackLink.tsx b/frontend/src/components/BackLink.tsx new file mode 100644 index 0000000..f410709 --- /dev/null +++ b/frontend/src/components/BackLink.tsx @@ -0,0 +1,17 @@ +import { Link } from 'react-router-dom'; +import { ArrowLeft } from 'lucide-react'; +import type { ReactNode } from 'react'; + +interface BackLinkProps { + to: string; + children: ReactNode; +} + +export function BackLink({ to, children }: BackLinkProps): JSX.Element { + return ( + + + {children} + + ); +} diff --git a/frontend/src/pages/SimulationFormPage.tsx b/frontend/src/pages/SimulationFormPage.tsx index ae9ac3a..663234b 100644 --- a/frontend/src/pages/SimulationFormPage.tsx +++ b/frontend/src/pages/SimulationFormPage.tsx @@ -22,6 +22,8 @@ import { MitreTechniquesField } from '@/components/MitreTechniquesField'; import { ExecuteViaC2Modal } from '@/components/ExecuteViaC2Modal'; import { ImportC2HistoryModal } from '@/components/ImportC2HistoryModal'; import { C2TasksPanel } from '@/components/C2TasksPanel'; +import { AlertBanner } from '@/components/AlertBanner'; +import { BackLink } from '@/components/BackLink'; interface RedteamFormState { name: string; @@ -238,9 +240,7 @@ export function SimulationFormPage(): JSX.Element { return (
- - ← Back to engagement - + Back to engagement

New simulation

@@ -279,9 +279,7 @@ export function SimulationFormPage(): JSX.Element {
- - ← Back to engagement - + Back to engagement

{rt.name || simulation?.name}

{status ? (
@@ -298,22 +296,17 @@ export function SimulationFormPage(): JSX.Element { {/* Done banner */} {isDone && ( -
+ This simulation is done and read-only. Use Reopen to make changes. -
+ )} {/* SOC banner */} {socBlocked && ( -
- Simulation not yet ready for review — the red team must mark it as "Review required" before you can fill in the SOC section. +
+ + Simulation not yet ready for review — the red team must mark it as "Review required" before you can fill in the SOC section. +
)} diff --git a/frontend/src/pages/TemplateFormPage.tsx b/frontend/src/pages/TemplateFormPage.tsx index 8300a54..566d7b6 100644 --- a/frontend/src/pages/TemplateFormPage.tsx +++ b/frontend/src/pages/TemplateFormPage.tsx @@ -9,6 +9,7 @@ import { FormField, TextArea, TextInput } from '@/components/FormField'; import { LoadingState } from '@/components/LoadingState'; import { ErrorState } from '@/components/ErrorState'; import { ConfirmDialog } from '@/components/ConfirmDialog'; +import { BackLink } from '@/components/BackLink'; import { MitreTechniqueTag, MitreTacticTag } from '@/components/MitreTechniqueTag'; import { MitreTechniquePicker } from '@/components/MitreTechniquePicker'; import { MitreMatrixModal } from '@/components/MitreMatrixModal'; @@ -127,9 +128,7 @@ export function TemplateFormPage(): JSX.Element {
- - ← Back to templates - + Back to templates

{isNew ? 'New template' : (existing.data?.name ?? 'Edit template')}