diff --git a/web/src/lib/components/import/ConnectAccount.svelte b/web/src/lib/components/import/ConnectAccount.svelte index 76e10d02d..76bf7193b 100644 --- a/web/src/lib/components/import/ConnectAccount.svelte +++ b/web/src/lib/components/import/ConnectAccount.svelte @@ -15,8 +15,8 @@ let { connected, connectHref, onDisconnect, pending = false }: Props = $props(); -
-
+
+
{#if connected} - + {/if}
diff --git a/web/src/lib/components/import/GitHubAuthorizeStep.svelte b/web/src/lib/components/import/GitHubAuthorizeStep.svelte index 303af9494..6ebb387ad 100644 --- a/web/src/lib/components/import/GitHubAuthorizeStep.svelte +++ b/web/src/lib/components/import/GitHubAuthorizeStep.svelte @@ -2,7 +2,7 @@ import Check from "$icon/check"; import UserKey from "$icon/user-key"; import Button from "$lib/components/ui/Button.svelte"; - import Step from "./Step.svelte"; + import FormStep from "$lib/components/ui/FormStep.svelte"; interface Props { number: number; @@ -14,21 +14,23 @@ let { number, authorized, disabled = false, onAuthorize }: Props = $props(); - -

- The migrator needs your permission to create the imported repositories in your account. -

-
+ +
+ {#if authorized} {/if} -
- +
diff --git a/web/src/lib/components/import/GitHubConnectStep.svelte b/web/src/lib/components/import/GitHubConnectStep.svelte index 3ded6d063..4d1bffd90 100644 --- a/web/src/lib/components/import/GitHubConnectStep.svelte +++ b/web/src/lib/components/import/GitHubConnectStep.svelte @@ -1,7 +1,7 @@ - + - + diff --git a/web/src/lib/components/import/GitHubImporter.svelte b/web/src/lib/components/import/GitHubImporter.svelte index d37de243b..c0c71de46 100644 --- a/web/src/lib/components/import/GitHubImporter.svelte +++ b/web/src/lib/components/import/GitHubImporter.svelte @@ -1,8 +1,6 @@ - - {#snippet action()} - {#if repos.length} - - {/if} - {/snippet} + {#if account && repos.length} + + {/if} {#if account}
{#each repos as repo (repo.id)} @@ -112,7 +111,7 @@ {/snippet} {:else} -

+

No public repositories found.

{/each} @@ -123,17 +122,17 @@

{/if} {#if knotOptions.length === 0} -

+

No knots are available yet. Manage your knots.

{/if} -
+
- + diff --git a/web/src/lib/components/import/MethodPicker.svelte b/web/src/lib/components/import/MethodPicker.svelte index 953162c7d..4243ef1e1 100644 --- a/web/src/lib/components/import/MethodPicker.svelte +++ b/web/src/lib/components/import/MethodPicker.svelte @@ -26,7 +26,7 @@
{#each methods as method (method.value)} {@const Icon = method.icon} @@ -35,15 +35,15 @@ type="button" aria-pressed={selected} onclick={() => onSelect(method.value)} - class="cursor-pointer rounded-md border border-border-default p-4 text-left transition-colors {selected + class="cursor-pointer rounded-md border border-border-default p-md text-left transition-colors {selected ? 'bg-background-default shadow-xs' : 'bg-background-subtle hover:bg-background-inset'}" > - + - + {method.description} diff --git a/web/src/lib/components/import/MigrationStep.svelte b/web/src/lib/components/import/MigrationStep.svelte index 948f40727..7d110ac55 100644 --- a/web/src/lib/components/import/MigrationStep.svelte +++ b/web/src/lib/components/import/MigrationStep.svelte @@ -20,9 +20,9 @@ import CircleUserRound from "$icon/circle-user-round"; import { migrationRunning } from "$lib/api/migrator"; import Button from "$lib/components/ui/Button.svelte"; + import FormStep from "$lib/components/ui/FormStep.svelte"; import MigrationRow, { stageLabel } from "./MigrationRow.svelte"; import StartedBanner from "./StartedBanner.svelte"; - import Step from "./Step.svelte"; interface Props { number: number; @@ -30,10 +30,8 @@ disabled?: boolean; items: MigrationItem[]; running?: boolean; - failed?: boolean; userHandle?: string; bannerNote?: string; - id?: string; } let { @@ -42,10 +40,8 @@ disabled = false, items, running, - failed, userHandle, - bannerNote, - id + bannerNote }: Props = $props(); let bannerVisible = $state(true); @@ -62,28 +58,25 @@ ); }) ); - - const isFailed = $derived( - failed ?? - items.some((item) => { - const m = item.migration; - return ( - m.status === "error" || (m.status === "success" && m.jobStatus !== "completed") - ); - }) - ); - + {#if !items.length}

No migrations started yet.

{:else} {#if bannerVisible} -
+
(bannerVisible = false)} note={bannerNote} />
{/if} -
+
{#each items as item (item.id)} {@const m = item.migration} {@const itemFailed = @@ -112,13 +105,13 @@ /> {#if itemFailed && m.status === "error"}

{m.error}

{:else if itemFailed && m.status === "success"}

{m.jobStatus === "authorization_required" ? "The source rejected its saved credential. Reconnect GitHub and start the import again." @@ -129,12 +122,11 @@ {/each}

{#if !isRunning} -
+
{/if} {/if} - + diff --git a/web/src/lib/components/import/RepoConfig.svelte b/web/src/lib/components/import/RepoConfig.svelte index b3f5760e3..a1a310675 100644 --- a/web/src/lib/components/import/RepoConfig.svelte +++ b/web/src/lib/components/import/RepoConfig.svelte @@ -38,7 +38,7 @@
-
+
{#each knots as option (option)} {option}
-
+

Repository migration has successfully started. You can now close this page.

{note}

diff --git a/web/src/lib/components/import/Step.svelte b/web/src/lib/components/import/Step.svelte deleted file mode 100644 index c1f0ba367..000000000 --- a/web/src/lib/components/import/Step.svelte +++ /dev/null @@ -1,41 +0,0 @@ - - -
- - {number} - -
-
-

- {title} -

- {#if action} - {@render action()} - {/if} -
-
- {@render children()} -
-
-
diff --git a/web/src/lib/components/import/StepFlow.svelte b/web/src/lib/components/import/StepFlow.svelte deleted file mode 100644 index 469f01e2f..000000000 --- a/web/src/lib/components/import/StepFlow.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
- - {@render children()} -
diff --git a/web/src/lib/components/import/UrlRepoImporter.svelte b/web/src/lib/components/import/UrlRepoImporter.svelte index 572285269..4fbfaeb06 100644 --- a/web/src/lib/components/import/UrlRepoImporter.svelte +++ b/web/src/lib/components/import/UrlRepoImporter.svelte @@ -276,8 +276,8 @@ }; -
- +
+ {#snippet children({ id })}
-

+

Use a publicly reachable HTTPS clone URL without credentials. {#if fetched && defaultBranch} Default branch on the remote: {/if}

- + {#if needsSignIn} -
+
Fetching details needs the migrator's grant, which this session does not carry yet.
{/if} -
+
(urlKnot = v)} disabled={!fetched || running || migration.status === "success"} /> -
+