ui/install: set fixed dimensions for modal
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
.modal_content {
|
||||
@apply min-w-[320px] max-w-[512px];
|
||||
@apply min-w-[320px] flex flex-col;
|
||||
@apply rounded-md overflow-hidden;
|
||||
|
||||
max-height: calc(100vh - 2rem);
|
||||
|
||||
/* todo replace with a theme() color */
|
||||
box-shadow: 0.1875rem 0.1875rem 0 0 rgba(145, 172, 175, 0.32);
|
||||
@apply border border-def-3 rounded-bl-md rounded-br-md;
|
||||
@@ -22,7 +24,8 @@
|
||||
}
|
||||
|
||||
.modal_body {
|
||||
@apply rounded-b-md p-6 pt-4 bg-def-1;
|
||||
overflow-y: auto;
|
||||
@apply rounded-b-md p-6 pt-4 bg-def-1 flex-grow;
|
||||
|
||||
&[data-no-padding] {
|
||||
@apply p-0;
|
||||
|
||||
@@ -5,8 +5,7 @@ import {
|
||||
StepperProvider,
|
||||
useStepper,
|
||||
} from "@/src/hooks/stepper";
|
||||
import { createForm, FieldValues, SubmitHandler } from "@modular-forms/solid";
|
||||
import { onMount, Show } from "solid-js";
|
||||
import { Show } from "solid-js";
|
||||
import { Dynamic } from "solid-js/web";
|
||||
import { initialSteps } from "./steps/Initial";
|
||||
import { createInstallerSteps } from "./steps/createInstaller";
|
||||
@@ -85,6 +84,7 @@ export const InstallModal = (props: InstallModalProps) => {
|
||||
return (
|
||||
<StepperProvider stepper={stepper}>
|
||||
<Modal
|
||||
class="h-[30rem] w-screen max-w-3xl"
|
||||
mount={props.mount}
|
||||
title="Install machine"
|
||||
onClose={() => {
|
||||
|
||||
@@ -12,8 +12,8 @@ const ChoiceLocalOrRemote = () => {
|
||||
<div class="flex justify-between gap-2">
|
||||
<div class="flex flex-col justify-center gap-1 px-1">
|
||||
<Typography
|
||||
hierarchy="label"
|
||||
size="xs"
|
||||
hierarchy="body"
|
||||
size="default"
|
||||
weight="bold"
|
||||
color="primary"
|
||||
>
|
||||
@@ -33,8 +33,8 @@ const ChoiceLocalOrRemote = () => {
|
||||
<div class="flex justify-between gap-2">
|
||||
<div class="flex flex-col justify-center gap-1 px-1">
|
||||
<Typography
|
||||
hierarchy="label"
|
||||
size="xs"
|
||||
hierarchy="body"
|
||||
size="default"
|
||||
weight="bold"
|
||||
color="primary"
|
||||
>
|
||||
@@ -64,8 +64,8 @@ const ChoiceLocalInstaller = () => {
|
||||
<div class="flex justify-between gap-2">
|
||||
<div class="flex flex-col justify-center gap-1 px-1">
|
||||
<Typography
|
||||
hierarchy="label"
|
||||
size="xs"
|
||||
hierarchy="body"
|
||||
size="default"
|
||||
weight="bold"
|
||||
color="primary"
|
||||
>
|
||||
@@ -85,8 +85,8 @@ const ChoiceLocalInstaller = () => {
|
||||
<div class="flex justify-between gap-2">
|
||||
<div class="flex flex-col justify-center gap-1 px-1">
|
||||
<Typography
|
||||
hierarchy="label"
|
||||
size="xs"
|
||||
hierarchy="body"
|
||||
size="default"
|
||||
weight="bold"
|
||||
color="primary"
|
||||
>
|
||||
|
||||
@@ -149,7 +149,7 @@ const ConfigureImage = () => {
|
||||
let content: Node;
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Form onSubmit={handleSubmit} class="h-full">
|
||||
<StepLayout
|
||||
body={
|
||||
<div
|
||||
@@ -241,7 +241,7 @@ const ChooseDisk = () => {
|
||||
|
||||
const stripId = (s: string) => s.split("-")[1] ?? s;
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Form onSubmit={handleSubmit} class="h-full">
|
||||
<StepLayout
|
||||
body={
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -317,7 +317,7 @@ const FlashProgress = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div class="flex h-60 w-full flex-col items-center justify-end bg-inv-4">
|
||||
<div class="flex size-full h-60 flex-col items-center justify-end bg-inv-4">
|
||||
<div class="mb-6 flex w-full max-w-md flex-col items-center gap-3 fg-inv-1">
|
||||
<Typography
|
||||
hierarchy="title"
|
||||
@@ -343,7 +343,7 @@ const FlashProgress = () => {
|
||||
const FlashDone = () => {
|
||||
const stepSignal = useStepper<InstallSteps>();
|
||||
return (
|
||||
<div class="flex w-full flex-col items-center bg-inv-4">
|
||||
<div class="flex size-full flex-col items-center justify-between bg-inv-4">
|
||||
<div class="flex w-full max-w-md flex-col items-center gap-3 py-6 fg-inv-1">
|
||||
<div class="rounded-full bg-semantic-success-4">
|
||||
<Icon icon="Checkmark" class="size-9" />
|
||||
@@ -361,15 +361,15 @@ const FlashDone = () => {
|
||||
title="Remove it and plug it into the machine that you want to install."
|
||||
description=""
|
||||
/>
|
||||
<div class="mt-3 flex w-full justify-end">
|
||||
<Button
|
||||
hierarchy="primary"
|
||||
endIcon="ArrowRight"
|
||||
onClick={() => stepSignal.next()}
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex w-full justify-end p-6">
|
||||
<Button
|
||||
hierarchy="primary"
|
||||
endIcon="ArrowRight"
|
||||
onClick={() => stepSignal.next()}
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -74,7 +74,7 @@ const ConfigureAddress = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Form onSubmit={handleSubmit} class="h-full">
|
||||
<StepLayout
|
||||
body={
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -232,7 +232,7 @@ const ConfigureDisk = () => {
|
||||
);
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Form onSubmit={handleSubmit} class="h-full">
|
||||
<StepLayout
|
||||
body={
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -367,7 +367,7 @@ const PromptsFields = (props: PromptsFieldsProps) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Form onSubmit={handleSubmit} class="h-full">
|
||||
<StepLayout
|
||||
body={
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -563,7 +563,7 @@ const InstallProgress = () => {
|
||||
);
|
||||
|
||||
return (
|
||||
<div class="flex h-60 w-full flex-col items-center justify-end bg-inv-4">
|
||||
<div class="flex size-full h-60 flex-col items-center justify-end bg-inv-4">
|
||||
<div class="mb-6 flex w-full max-w-md flex-col items-center gap-3 fg-inv-1">
|
||||
<Typography
|
||||
hierarchy="title"
|
||||
@@ -617,7 +617,10 @@ const InstallProgress = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const FlashDone = () => {
|
||||
interface InstallDoneProps {
|
||||
onDone: () => void;
|
||||
}
|
||||
const InstallDone = (props: InstallDoneProps) => {
|
||||
const stepSignal = useStepper<InstallSteps>();
|
||||
const [store, get] = getStepStore<InstallStoreType>(stepSignal);
|
||||
|
||||
@@ -687,7 +690,7 @@ export const installSteps = [
|
||||
},
|
||||
{
|
||||
id: "install:done",
|
||||
content: FlashDone,
|
||||
content: InstallDone,
|
||||
isSplash: true,
|
||||
},
|
||||
] as const;
|
||||
|
||||
@@ -9,7 +9,7 @@ interface StepLayoutProps {
|
||||
}
|
||||
export const StepLayout = (props: StepLayoutProps) => {
|
||||
return (
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex size-full grow flex-col justify-between gap-6">
|
||||
{props.body}
|
||||
{props.footer}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user