From 7414b441d6a86191ccbffca462e34e843158d15a Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 31 Dec 2024 12:20:00 +0530 Subject: [PATCH 1/2] ui fix: repo connectivity state. --- src/lib/components/git/newRepository.svelte | 4 ++++ src/lib/elements/forms/button.svelte | 3 ++- .../templates/template-[template]/+page.svelte | 13 +++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/components/git/newRepository.svelte b/src/lib/components/git/newRepository.svelte index 5a9b888f19..85fbf71823 100644 --- a/src/lib/components/git/newRepository.svelte +++ b/src/lib/components/git/newRepository.svelte @@ -8,6 +8,7 @@ export let installations: Models.InstallationList; export let repositoryName: string; export let repositoryPrivate = true; + export let disableFields = false; @@ -15,6 +16,7 @@ { return { label: entry.organization, @@ -32,9 +34,11 @@ id="repositoryName" label="Repository name" placeholder="my-repository" + disabled={disableFields} bind:value={repositoryName} /> diff --git a/src/lib/elements/forms/button.svelte b/src/lib/elements/forms/button.svelte index cf6d8d20b5..32cc6340b2 100644 --- a/src/lib/elements/forms/button.svelte +++ b/src/lib/elements/forms/button.svelte @@ -27,6 +27,7 @@ let classes: string = ''; export { classes as class }; export let submissionLoader = false; + export let showLoaderAnyway = false; const isSubmitting = hasContext('form') ? getContext('form').isSubmitting @@ -85,7 +86,7 @@ aria-label={ariaLabel} type={submit ? 'submit' : 'button'} --button-width={fullWidth ? '100%' : undefined}> - {#if $isSubmitting && submissionLoader} + {#if ($isSubmitting && submissionLoader) || (showLoaderAnyway && submissionLoader)} {#if connectBehaviour === 'now'} {#if hasInstallations} -
+
{#if repositoryBehaviour === 'new'} @@ -231,7 +236,11 @@ From 819a829f41a296db13cb405ccea7dd3d71d7963b Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 2 Jan 2025 13:57:54 +0530 Subject: [PATCH 2/2] address comment. --- src/lib/elements/forms/button.svelte | 4 ++-- .../create-site/templates/template-[template]/+page.svelte | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elements/forms/button.svelte b/src/lib/elements/forms/button.svelte index 32cc6340b2..6b13f47c6d 100644 --- a/src/lib/elements/forms/button.svelte +++ b/src/lib/elements/forms/button.svelte @@ -27,7 +27,7 @@ let classes: string = ''; export { classes as class }; export let submissionLoader = false; - export let showLoaderAnyway = false; + export let forceShowLoader = false; const isSubmitting = hasContext('form') ? getContext('form').isSubmitting @@ -86,7 +86,7 @@ aria-label={ariaLabel} type={submit ? 'submit' : 'button'} --button-width={fullWidth ? '100%' : undefined}> - {#if ($isSubmitting && submissionLoader) || (showLoaderAnyway && submissionLoader)} + {#if ($isSubmitting && submissionLoader) || (forceShowLoader && submissionLoader)}