fix more issues

This commit is contained in:
Damodar Lohani
2025-07-03 09:10:11 +00:00
parent 2456bb33eb
commit fa8bc4012e
3 changed files with 22 additions and 9 deletions
+20 -7
View File
@@ -12,13 +12,25 @@
import { filterRegions } from '$lib/helpers/regions';
import type { Snippet } from 'svelte';
let projectName = $state('');
let id = $state('');
let regions = $state<Array<Models.ConsoleRegion>>([]);
let region = $state('');
let showTitle = $state(true);
let projects = $state<number | undefined>(undefined);
let { submit }: { submit?: Snippet } = $props();
let {
projectName = $bindable(''),
id = $bindable(''),
regions = [],
region = $bindable(''),
showTitle = true,
projects = undefined,
submit,
onsubmit
}: {
projectName: string;
id: string;
regions: Array<Models.ConsoleRegion>;
region: string;
showTitle: boolean;
projects?: number;
submit?: Snippet;
onsubmit?: (event: Event) => void;
} = $props();
let showCustomId = $state(false);
let projectsLimited = $derived(
@@ -35,6 +47,7 @@
<form
onsubmit={(e) => {
e.preventDefault();
onsubmit?.(e);
}}>
<Layout.Stack direction="column" gap="xxl">
{#if showTitle}
@@ -99,7 +99,8 @@
bind:projectName
bind:id
bind:region
on:submit={createProject}>
showTitle={true}
onsubmit={createProject}>
<svelte:fragment slot="submit">
<Layout.Stack direction="row" justifyContent="flex-end">
<Button.Button type="submit" variant="primary" size="s">
@@ -63,7 +63,6 @@
onSubmit={create}
bind:error>
<CreateProject
{projects}
showTitle={false}
bind:id
bind:projectName={name}