UI: flash installer layout consistent

This commit is contained in:
Johannes Kirschbauer
2024-12-11 11:33:37 +01:00
parent 2088f92e6d
commit cad9d717e5

View File

@@ -4,6 +4,8 @@ import { FileInput } from "@/src/components/FileInput";
import Icon from "@/src/components/icon"; import Icon from "@/src/components/icon";
import { SelectInput } from "@/src/components/SelectInput"; import { SelectInput } from "@/src/components/SelectInput";
import { TextInput } from "@/src/components/TextInput"; import { TextInput } from "@/src/components/TextInput";
import { Typography } from "@/src/components/Typography";
import { Header } from "@/src/layout/header";
import { import {
createForm, createForm,
required, required,
@@ -169,7 +171,16 @@ export const Flash = () => {
}; };
return ( return (
<div class="m-4 rounded-lg bg-slate-50 p-4 pt-8 shadow-sm shadow-slate-400"> <>
<Header title="Flash installer" />
<div class="p-4">
<Typography tag="p" hierarchy="body" size="default" color="secondary">
USB Utility image.
</Typography>
<Typography tag="p" hierarchy="body" size="default" color="secondary">
This will make bootstrapping a new machine easier by providing secure
remote connection to any machine when plugged in.
</Typography>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<div class="my-4"> <div class="my-4">
<Field name="sshKeys" type="File[]"> <Field name="sshKeys" type="File[]">
@@ -217,7 +228,7 @@ export const Flash = () => {
e.preventDefault(); e.preventDefault();
deviceQuery.refetch(); deviceQuery.refetch();
}} }}
startIcon={<Icon icon="Reload" />} startIcon={<Icon icon="Update" />}
></Button> ></Button>
} }
formStore={formStore} formStore={formStore}
@@ -290,7 +301,9 @@ export const Flash = () => {
variant="light" variant="light"
type="button" type="button"
class="flex justify-center opacity-70" class="flex justify-center opacity-70"
onClick={() => togglePasswordVisibility(index())} onClick={() =>
togglePasswordVisibility(index())
}
startIcon={ startIcon={
passwordVisibility()[index()] ? ( passwordVisibility()[index()] ? (
<Icon icon="EyeClose" /> <Icon icon="EyeClose" />
@@ -333,7 +346,9 @@ export const Flash = () => {
<div class="collapse collapse-arrow" tabindex="0"> <div class="collapse collapse-arrow" tabindex="0">
<input type="checkbox" /> <input type="checkbox" />
<div class="collapse-title link font-medium ">Advanced Settings</div> <div class="collapse-title link font-medium ">
Advanced Settings
</div>
<div class="collapse-content"> <div class="collapse-content">
<Field <Field
name="machine.flake" name="machine.flake"
@@ -426,7 +441,9 @@ export const Flash = () => {
<> <>
<option value={"en"}>{"en"}</option> <option value={"en"}>{"en"}</option>
<For each={keymapQuery.data}> <For each={keymapQuery.data}>
{(keymap) => <option value={keymap}>{keymap}</option>} {(keymap) => (
<option value={keymap}>{keymap}</option>
)}
</For> </For>
</> </>
} }
@@ -456,5 +473,6 @@ export const Flash = () => {
</div> </div>
</Form> </Form>
</div> </div>
</>
); );
}; };