feat(ui): use NavSection in installer workflow

This commit is contained in:
Brian McGee
2025-08-22 12:15:16 +01:00
parent 878789cf38
commit 1897b7bb06

View File

@@ -3,54 +3,21 @@ import { InstallSteps } from "../install";
import { Typography } from "@/src/components/Typography/Typography";
import { Button } from "@/src/components/Button/Button";
import { StepLayout } from "../../Steps";
import { NavSection } from "@/src/components/NavSection/NavSection";
const ChoiceLocalOrRemote = () => {
const stepSignal = useStepper<InstallSteps>();
return (
<div class="flex size-full flex-col gap-3">
<div class="flex flex-col gap-6 rounded-md px-4 py-6 text-fg-def-1 bg-def-2">
<div class="flex justify-between gap-2">
<div class="flex flex-col justify-center gap-1 px-1">
<Typography
hierarchy="body"
size="default"
weight="bold"
color="primary"
>
I have physical access to the machine.
</Typography>
</div>
<Button
type="button"
ghost
hierarchy="secondary"
icon="CaretRight"
<NavSection
label="I have physical access to the machine"
onClick={() => stepSignal.setActiveStep("local:choice")}
/>
</div>
</div>
<div class="flex flex-col gap-6 rounded-md px-4 py-6 text-fg-def-1 bg-def-2">
<div class="flex justify-between gap-2">
<div class="flex flex-col justify-center gap-1 px-1">
<Typography
hierarchy="body"
size="default"
weight="bold"
color="primary"
>
The Machine is remote and i have ssh access to it.
</Typography>
</div>
<Button
type="button"
ghost
hierarchy="secondary"
icon="CaretRight"
<NavSection
label="The Machine is remote and i have ssh access to it"
onClick={() => stepSignal.setActiveStep("install:address")}
/>
</div>
</div>
</div>
);
};
@@ -60,49 +27,15 @@ const ChoiceLocalInstaller = () => {
<StepLayout
body={
<div class="flex flex-col gap-3">
<div class="flex flex-col gap-6 rounded-md px-4 py-6 text-fg-def-1 bg-def-2">
<div class="flex justify-between gap-2">
<div class="flex flex-col justify-center gap-1 px-1">
<Typography
hierarchy="body"
size="default"
weight="bold"
color="primary"
>
I have an installer
</Typography>
</div>
<Button
type="button"
ghost
hierarchy="secondary"
icon="CaretRight"
<NavSection
label="I have an installer"
onClick={() => stepSignal.setActiveStep("install:address")}
/>
</div>
</div>
<div class="flex flex-col gap-6 rounded-md px-4 py-6 text-fg-def-1 bg-def-2">
<div class="flex justify-between gap-2">
<div class="flex flex-col justify-center gap-1 px-1">
<Typography
hierarchy="body"
size="default"
weight="bold"
color="primary"
>
I don't have an installer, yet
</Typography>
</div>
<Button
type="button"
ghost
hierarchy="secondary"
icon="CaretRight"
<NavSection
label="I don't have an installer, yet"
onClick={() => stepSignal.setActiveStep("create:prose")}
/>
</div>
</div>
</div>
}
footer={
<div class="flex justify-start">