fix workspace settings save buttons (#7492)

This commit is contained in:
Guilhem
2026-01-05 22:24:28 +00:00
committed by GitHub
parent ca285a189f
commit 711b744b2b
4 changed files with 21 additions and 18 deletions
@@ -81,7 +81,7 @@
<div
onclick={stopPropagation(bubble('click'))}
class={twMerge(
'relative transform overflow-hidden rounded-lg bg-surface px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6',
'relative transform overflow-hidden rounded-md bg-surface px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6',
c,
open
? 'ease-out duration-300 opacity-100 translate-y-0 sm:scale-100'
@@ -96,7 +96,7 @@
<div class="flex">
<div class="ml-4 text-left flex-1">
<div class="flex flex-row items-center justify-between">
<h3>{title}</h3>
<h3 class="text-emphasis text-lg font-semibold">{title}</h3>
{@render settings?.()}
</div>
@@ -80,7 +80,7 @@
</p>
</div>
<Modal bind:open title="Change Workspace Color">
<Modal bind:open title="Change workspace color">
<div class="flex flex-col gap-4">
<label class="block">
<span class="text-secondary text-sm">Workspace color</span>
@@ -100,14 +100,15 @@
</label>
</div>
<svelte:fragment slot="actions">
{#snippet actions()}
<Button
size="sm"
variant="accent"
on:click={() => {
changeWorkspaceColor()
}}
>
Save
</Button>
</svelte:fragment>
{/snippet}
</Modal>
@@ -84,15 +84,15 @@
Renaming the workspace may take a few minutes to complete. Once finished, please update your
webhook calls and adjust your CLI sync configuration accordingly.
</Alert>
<p class="text-secondary text-sm"
>Current ID <br /> <span class="font-bold">{$workspaceStore ?? ''}</span></p
<p class="text-secondary text-xs"
>Current ID <br /> <span class="text-emphasis">{$workspaceStore ?? ''}</span></p
>
<label class="block">
<span class="text-secondary text-sm">New name</span>
<label class="flex flex-col gap-1">
<span class="text-emphasis text-xs">New name</span>
<input type="text" bind:value={newName} />
</label>
<label class="block">
<span class="text-secondary text-sm">New ID</span>
<span class="text-emphasis text-xs">New ID</span>
<input type="text" bind:value={newId} />
{#if errorId}
<div class="text-red-500 text-xs mt-1">{errorId}</div>
@@ -100,9 +100,10 @@
</label>
</div>
<svelte:fragment slot="actions">
{#snippet actions()}
<Button
size="sm"
variant="accent"
disabled={checking || errorId.length > 0 || !newName || !newId}
{loading}
on:click={() => {
@@ -111,5 +112,5 @@
>
Save
</Button>
</svelte:fragment>
{/snippet}
</Modal>
@@ -61,19 +61,20 @@
<Modal bind:open title="Change workspace name">
<div class="flex flex-col gap-4 mt-4">
{#if currentName}
<p class="text-secondary text-sm"
>Current name <br /> <span class="font-bold">{currentName}</span></p
<p class="text-secondary text-xs"
>Current name <br /> <span class="text-emphasis">{currentName}</span></p
>
{/if}
<label class="block">
<span class="text-secondary text-sm">New name</span>
<label class="flex flex-col gap-1">
<span class="text-emphasis text-xs">New name</span>
<input type="text" bind:value={newName} />
</label>
</div>
<svelte:fragment slot="actions">
{#snippet actions()}
<Button
size="sm"
variant="accent"
disabled={!newName}
on:click={() => {
renameWorkspace()
@@ -81,5 +82,5 @@
>
Save
</Button>
</svelte:fragment>
{/snippet}
</Modal>