diff --git a/pkgs/clan-app/ui/src/components/Modal/Modal.tsx b/pkgs/clan-app/ui/src/components/Modal/Modal.tsx index 86b0af901..cdca5d8c7 100644 --- a/pkgs/clan-app/ui/src/components/Modal/Modal.tsx +++ b/pkgs/clan-app/ui/src/components/Modal/Modal.tsx @@ -13,9 +13,9 @@ import Icon from "../Icon/Icon"; import cx from "classnames"; import { Dynamic } from "solid-js/web"; -export type ModalContextType = { +export interface ModalContextType { portalRef: HTMLDivElement; -}; +} const ModalContext = createContext(); diff --git a/pkgs/clan-app/ui/src/workflows/Install/install.tsx b/pkgs/clan-app/ui/src/workflows/Install/install.tsx index fccc98c97..3d38096cd 100644 --- a/pkgs/clan-app/ui/src/workflows/Install/install.tsx +++ b/pkgs/clan-app/ui/src/workflows/Install/install.tsx @@ -12,6 +12,8 @@ import { createInstallerSteps } from "./steps/createInstaller"; import { installSteps } from "./steps/installSteps"; import { ApiCall } from "@/src/hooks/api"; +import cx from "classnames"; + interface InstallStepperProps { onDone: () => void; } @@ -82,10 +84,29 @@ export const InstallModal = (props: InstallModalProps) => { set("install", { machineName: props.machineName }); + // allows each step to adjust the size of the modal + const sizeClasses = () => { + const defaultClass = "max-w-3xl h-[30rem]"; + + const currentStep = stepper.currentStep(); + if (!currentStep) { + return defaultClass; + } + + switch (currentStep.id) { + case "create:progress": + case "create:done": + return currentStep.class; + + default: + return defaultClass; + } + }; + return ( { console.log("Install modal closed"); diff --git a/pkgs/clan-app/ui/src/workflows/Install/steps/createInstaller.tsx b/pkgs/clan-app/ui/src/workflows/Install/steps/createInstaller.tsx index 253582b67..512ca5e3d 100644 --- a/pkgs/clan-app/ui/src/workflows/Install/steps/createInstaller.tsx +++ b/pkgs/clan-app/ui/src/workflows/Install/steps/createInstaller.tsx @@ -332,27 +332,27 @@ const FlashProgress = () => { return (
usb logo -
+
- USB stick is being flashed + Removable media is being flashed