From 0a4ad62a4d374dec0594fe99f9cc297deef0235f Mon Sep 17 00:00:00 2001 From: eti Date: Wed, 23 Sep 2026 18:41:13 +0200 Subject: [PATCH] web/repo: lay out the repo creation form with fields Signed-off-by: eti --- .../components/repo/RepoCreationForm.svelte | 188 ++++++++---------- 1 file changed, 87 insertions(+), 101 deletions(-) diff --git a/web/src/lib/components/repo/RepoCreationForm.svelte b/web/src/lib/components/repo/RepoCreationForm.svelte index 5d0a99b41..237648924 100644 --- a/web/src/lib/components/repo/RepoCreationForm.svelte +++ b/web/src/lib/components/repo/RepoCreationForm.svelte @@ -49,6 +49,7 @@ import Avatar from "$lib/components/ui/Avatar.svelte"; import Button, { buttonIcon } from "$lib/components/ui/Button.svelte"; import ErrorAlert from "$lib/components/ui/Error.svelte"; + import Field from "$lib/components/ui/Field.svelte"; import FormStep from "$lib/components/ui/FormStep.svelte"; import FormStepDisclosure from "$lib/components/ui/FormStepDisclosure.svelte"; import Input from "$lib/components/ui/Input.svelte"; @@ -214,98 +215,82 @@ >
-
- -
- {#if owners.length > 1} - owner?.did ?? "", (did) => (selectedOwnerDid = did)} - label="Repository owner" - disabled={!user || action.loading} - group="repo-creation" - class="min-w-0 md:mr-xs md:max-w-[55%]" + + {#snippet children({ id })} +
+ {#if owners.length > 1} + owner?.did ?? "", (did) => (selectedOwnerDid = did) + } + label="Repository owner" + disabled={!user || action.loading} + group="repo-creation" + class="min-w-0 md:me-xs md:max-w-[55%]" + /> + {:else} + + {/if} + 1 + ? "flex-1" + : "flex-1 md:rounded-s-none md:rounded-e"} /> - {:else} - +
+ {#if ownersLoading} +

+ Loading organizations… +

{/if} + + {/snippet} +
+ + + {#snippet children({ id })} 1 - ? "flex-1" - : "flex-1 md:rounded-l-none md:rounded-r"} + {id} + name="description" + placeholder="A brief description of your project..." + maxlength={140} + bind:value={description} /> -
- {#if ownersLoading}

- Loading organizations… -

{/if} - -

- Choose a unique, descriptive name. Use letters, numbers, periods, underscores, - and hyphens. -

-
- -
- - -

- {[...description].length}/140 characters -

-
+ {/snippet} +
{#if showDefaultBranch} -
- - -

- The primary branch where development happens. Common choices are "main" or - "master". -

-
+ + {#snippet children({ id })} + + {/snippet} + {/if} -
-
- Select a knot -
+ makeKnotList(saved.knots))} @@ -314,36 +299,37 @@ bind:address={knotAddress} bind:remember={rememberKnot} /> -

+ {#snippet subtitle()} A knot hosts repository data and handles Git operations. You can also register your own knot. -

-
+ {/snippet} +
-
- Select a spindle -
- makeSpindleList(saved.spindles))} - official={page.data.publicConfig?.primarySpindleHostname ?? ""} - none="No spindle" - bind:choice={spindleChoice} - bind:address={spindleAddress} - bind:remember={rememberSpindle} - /> -

- A spindle runs your CI workflows. You can also - register your own spindle. -

+ + makeSpindleList(saved.spindles))} + official={page.data.publicConfig?.primarySpindleHostname ?? ""} + none="No spindle" + bind:choice={spindleChoice} + bind:address={spindleAddress} + bind:remember={rememberSpindle} + /> + {#snippet subtitle()} + A spindle runs your CI workflows. You can also + register your own spindle. + {/snippet} +
- -
+
+