Skip to content

Commit ae4ed9c

Browse files
committed
Review fixes
1 parent f230946 commit ae4ed9c

File tree

1 file changed

+26
-20
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]

1 file changed

+26
-20
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/+page.svelte

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@
189189
alignItems="center"
190190
justifyContent="flex-end"
191191
style="padding-right: 40px;">
192-
<Layout.Stack direction="row" alignItems="center" justifyContent="flex-end">
192+
<Layout.Stack
193+
direction="row"
194+
alignItems="center"
195+
justifyContent="flex-end"
196+
gap="s">
193197
{#if !$isSmallViewport}
194198
<Button
195199
secondary
@@ -206,6 +210,7 @@
206210
size="s"
207211
secondary
208212
class="small-button-dimensions"
213+
disabled={!(hasColumns && hasValidColumns) || disableButton}
209214
on:click={() => (showImportCSV = true)}>
210215
<Icon icon={IconUpload} size="s" />
211216
</Button>
@@ -219,6 +224,7 @@
219224
size="s"
220225
secondary
221226
class="small-button-dimensions"
227+
disabled={!(hasColumns && hasValidColumns) || disableButton}
222228
on:click={() => {
223229
trackEvent(Click.DatabaseExportCsv);
224230
goto(getTableExportUrl());
@@ -229,25 +235,6 @@
229235
<svelte:fragment slot="tooltip">Export CSV</svelte:fragment>
230236
</Tooltip>
231237

232-
<Tooltip placement="top">
233-
<Button
234-
icon
235-
size="s"
236-
secondary
237-
class="small-button-dimensions"
238-
on:click={() => {
239-
$expandTabs = !$expandTabs;
240-
preferences.setKey('tableHeaderExpanded', $expandTabs);
241-
}}>
242-
<Icon
243-
icon={!$expandTabs ? IconChevronDown : IconChevronUp}
244-
size="s" />
245-
</Button>
246-
247-
<svelte:fragment slot="tooltip"
248-
>{!$expandTabs ? 'Expand' : 'Collapse'}</svelte:fragment>
249-
</Tooltip>
250-
251238
<Tooltip disabled={isRefreshing || !data.rows.total} placement="top">
252239
<Button
253240
icon
@@ -270,6 +257,25 @@
270257

271258
<svelte:fragment slot="tooltip">Refresh</svelte:fragment>
272259
</Tooltip>
260+
261+
<Tooltip placement="top">
262+
<Button
263+
icon
264+
size="s"
265+
secondary
266+
class="small-button-dimensions"
267+
on:click={() => {
268+
$expandTabs = !$expandTabs;
269+
preferences.setKey('tableHeaderExpanded', $expandTabs);
270+
}}>
271+
<Icon
272+
icon={!$expandTabs ? IconChevronDown : IconChevronUp}
273+
size="s" />
274+
</Button>
275+
276+
<svelte:fragment slot="tooltip"
277+
>{!$expandTabs ? 'Expand' : 'Collapse'}</svelte:fragment>
278+
</Tooltip>
273279
{/if}
274280
</Layout.Stack>
275281
</Layout.Stack>

0 commit comments

Comments
 (0)