diff --git a/pkgs/webview-ui/app/src/routes/flash/view.tsx b/pkgs/webview-ui/app/src/routes/flash/view.tsx index 608fbc7a6..bbfab0650 100644 --- a/pkgs/webview-ui/app/src/routes/flash/view.tsx +++ b/pkgs/webview-ui/app/src/routes/flash/view.tsx @@ -4,6 +4,8 @@ import { FileInput } from "@/src/components/FileInput"; import Icon from "@/src/components/icon"; import { SelectInput } from "@/src/components/SelectInput"; import { TextInput } from "@/src/components/TextInput"; +import { Typography } from "@/src/components/Typography"; +import { Header } from "@/src/layout/header"; import { createForm, required, @@ -169,292 +171,308 @@ export const Flash = () => { }; return ( -
-
-
- - {(field, props) => ( - <> - { - event.preventDefault(); // Prevent the native file dialog from opening - const input = event.target; - const files = await selectSshKeys(); + <> +
+
+ + USB Utility image. + + + This will make bootstrapping a new machine easier by providing secure + remote connection to any machine when plugged in. + + +
+ + {(field, props) => ( + <> + { + event.preventDefault(); // Prevent the native file dialog from opening + const input = event.target; + const files = await selectSshKeys(); - // Set the files - Object.defineProperty(input, "files", { - value: files, - writable: true, - }); - // Define the files property on the input element - const changeEvent = new Event("input", { - bubbles: true, - cancelable: true, - }); - input.dispatchEvent(changeEvent); - }} - value={field.value} - error={field.error} - helperText="Provide your SSH public key. For secure and passwordless SSH connections." - label="Authorized SSH Keys" - multiple - required - /> - + // Set the files + Object.defineProperty(input, "files", { + value: files, + writable: true, + }); + // Define the files property on the input element + const changeEvent = new Event("input", { + bubbles: true, + cancelable: true, + }); + input.dispatchEvent(changeEvent); + }} + value={field.value} + error={field.error} + helperText="Provide your SSH public key. For secure and passwordless SSH connections." + label="Authorized SSH Keys" + multiple + required + /> + + )} + +
+ + + {(field, props) => ( + { + e.preventDefault(); + deviceQuery.refetch(); + }} + startIcon={} + > + } + formStore={formStore} + selectProps={props} + label="Flash Disk" + value={String(field.value)} + error={field.error} + required + options={ + <> + + + + {(device) => ( + + )} + + + } + /> )} -
- - {(field, props) => ( - { - e.preventDefault(); - deviceQuery.refetch(); - }} - startIcon={} - > - } - formStore={formStore} - selectProps={props} - label="Flash Disk" - value={String(field.value)} - error={field.error} - required - options={ - <> - - - - {(device) => ( - - )} - - - } - /> - )} - - - {/* WiFi Networks */} -
-

WiFi Networks

- Add preconfigured networks - - {(network, index) => ( -
- - {(field, props) => ( - - )} - - - {(field, props) => ( -
+ {/* WiFi Networks */} +
+

WiFi Networks

+ Add preconfigured networks + + {(network, index) => ( +
+ + {(field, props) => ( togglePasswordVisibility(index())} - startIcon={ - passwordVisibility()[index()] ? ( - - ) : ( - - ) - } - > - ), - }} + class="col-span-3" required /> -
- )} - -
- + )} + + + {(field, props) => ( +
+ + togglePasswordVisibility(index()) + } + startIcon={ + passwordVisibility()[index()] ? ( + + ) : ( + + ) + } + > + ), + }} + required + /> +
+ )} +
+
+ +
+ )} +
+
+ +
+
+ +
+ + +
+ + {(field, props) => ( + <> + file_download + } + error={field.error} + required + /> + + )} + + + {(field, props) => ( + <> + devices} + error={field.error} + required + /> + + )} + +
+ Source URL: + + {getValue(formStore, "machine.flake") + + "#" + + getValue(formStore, "machine.devicePath")} +
- )} - -
+ + {(field, props) => ( + <> + + + + {(language) => ( + + )} + + + } + /> + + )} + + + + {(field, props) => ( + <> + + + + {(keymap) => ( + + )} + + + } + /> + + )} + +
+
+ +
+
-
- -
- - -
- - {(field, props) => ( - <> - file_download - } - error={field.error} - required - /> - - )} - - - {(field, props) => ( - <> - devices} - error={field.error} - required - /> - - )} - -
- Source URL: - - {getValue(formStore, "machine.flake") + - "#" + - getValue(formStore, "machine.devicePath")} - -
- - {(field, props) => ( - <> - - - - {(language) => ( - - )} - - - } - /> - - )} - - - - {(field, props) => ( - <> - - - - {(keymap) => } - - - } - /> - - )} - -
-
- -
-
- -
- -
+ +
+ ); };