Skip to content

Commit 01daaa1

Browse files
committed
fix: over width of the fab.
1 parent ae9ac4e commit 01daaa1

1 file changed

Lines changed: 29 additions & 30 deletions

File tree

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)

src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,8 @@
10941094
10951095
// scroll to view if needed and select!
10961096
function selectColumnWithId(column: Column) {
1097+
if (creatingColumns) return;
1098+
10971099
const columnId = column.id;
10981100
selectedColumnName = column.title;
10991101
if (!isColumnVisible(columnId)) {
@@ -1647,7 +1649,7 @@
16471649
class:has-selection={hasSelection}>
16481650
<FloatingActionBar>
16491651
<svelte:fragment slot="start">
1650-
<Layout.Stack gap="xl" direction="row" alignItems="center">
1652+
<Layout.Stack gap="xs" direction="row" alignItems="center">
16511653
{#if creatingColumns}
16521654
<Spinner size="s" />
16531655
{/if}
@@ -1657,7 +1659,7 @@
16571659
color="--fgcolor-neutral-secondary"
16581660
style="white-space: nowrap">
16591661
{creatingColumns
1660-
? 'Creating columns'
1662+
? 'Creating columns...'
16611663
: $isSmallViewport
16621664
? 'Click headers or cells to edit columns'
16631665
: 'Click headers or cells to edit columns before applying'}
@@ -1666,27 +1668,29 @@
16661668
</svelte:fragment>
16671669

16681670
<svelte:fragment slot="end">
1669-
<Layout.Stack direction="row" gap="xs" alignItems="center" inline>
1670-
<Button.Button
1671-
size="xs"
1672-
variant="text"
1673-
disabled={creatingColumns}
1674-
on:click={() => {
1675-
customColumns = [];
1676-
resetSuggestionsStore();
1677-
}}
1678-
style="opacity: {creatingColumns ? '0' : '1'}"
1679-
>Dismiss
1680-
</Button.Button>
1681-
<Button.Button
1682-
size="xs"
1683-
variant="primary"
1684-
disabled={creatingColumns}
1685-
on:click={createColumns}
1686-
style="opacity: {creatingColumns ? '0' : '1'}"
1687-
>Apply
1688-
</Button.Button>
1689-
</Layout.Stack>
1671+
{#if !creatingColumns}
1672+
<Layout.Stack direction="row" gap="xs" alignItems="center" inline>
1673+
<Button.Button
1674+
size="xs"
1675+
variant="text"
1676+
disabled={creatingColumns}
1677+
on:click={() => {
1678+
customColumns = [];
1679+
resetSuggestionsStore();
1680+
}}
1681+
style="opacity: {creatingColumns ? '0' : '1'}"
1682+
>Dismiss
1683+
</Button.Button>
1684+
<Button.Button
1685+
size="xs"
1686+
variant="primary"
1687+
disabled={creatingColumns}
1688+
on:click={createColumns}
1689+
style="opacity: {creatingColumns ? '0' : '1'}"
1690+
>Apply
1691+
</Button.Button>
1692+
</Layout.Stack>
1693+
{/if}
16901694
</svelte:fragment>
16911695
</FloatingActionBar>
16921696
</div>
@@ -2000,15 +2004,10 @@
20002004
20012005
&.creating-columns :global(:first-child) {
20022006
left: calc(67.5% - 480px / 2);
2003-
max-width: 300px !important;
2007+
max-width: 157px !important;
20042008
20052009
@media (max-width: 1024px) {
2006-
left: calc(60% - 300px / 2);
2007-
}
2008-
2009-
@media (max-width: 768px) {
2010-
left: calc(50% - 400px / 2);
2011-
max-width: 400px !important;
2010+
left: calc(50% - 157px / 2);
20122011
}
20132012
}
20142013
}

0 commit comments

Comments
 (0)