diff --git a/packages/web/src/buttons/ToolStripContainer.svelte b/packages/web/src/buttons/ToolStripContainer.svelte index 3d354922..12bf447c 100644 --- a/packages/web/src/buttons/ToolStripContainer.svelte +++ b/packages/web/src/buttons/ToolStripContainer.svelte @@ -10,7 +10,8 @@ .content { position: absolute; left: 0; - top: var(--dim-toolbar-height); + top: var(--dim-toolstrip-height); + border-top: 1px solid var(--theme-border); right: 0; bottom: 0; display: flex; @@ -19,9 +20,9 @@ .toolstrip { position: absolute; left: 0; - height: var(--dim-toolbar-height); + height: var(--dim-toolstrip-height); right: 0; display: flex; - background: var(--theme-bg-0); + background: var(--theme-bg-1); } diff --git a/packages/web/src/buttons/ToolStripExportButton.svelte b/packages/web/src/buttons/ToolStripExportButton.svelte index e69de29b..f69e9092 100644 --- a/packages/web/src/buttons/ToolStripExportButton.svelte +++ b/packages/web/src/buttons/ToolStripExportButton.svelte @@ -0,0 +1,44 @@ + + + + +{#if electron} + +{:else} + +{/if} diff --git a/packages/web/src/datagrid/SqlDataGridCore.svelte b/packages/web/src/datagrid/SqlDataGridCore.svelte index ecfdefe2..b5d56843 100644 --- a/packages/web/src/datagrid/SqlDataGridCore.svelte +++ b/packages/web/src/datagrid/SqlDataGridCore.svelte @@ -66,6 +66,7 @@ - - - {#if driver?.dialect?.nosql} - setEditorData(e.detail)} - on:focus={() => { - activator.activate(); - invalidateCommands(); - }} - bind:this={domEditor} - /> - {:else} - setEditorData(e.detail)} - on:focus={() => { - activator.activate(); - invalidateCommands(); - }} - bind:this={domEditor} - /> - {/if} - - - - - + + + {#if driver?.dialect?.nosql} + setEditorData(e.detail)} + on:focus={() => { + activator.activate(); + invalidateCommands(); + }} + bind:this={domEditor} /> - - + {:else} + setEditorData(e.detail)} + on:focus={() => { + activator.activate(); + invalidateCommands(); + }} + bind:this={domEditor} + /> + {/if} + + + + + + + + + + + + + + - + {#if sessionId} diff --git a/packages/web/src/tabs/TableDataTab.svelte b/packages/web/src/tabs/TableDataTab.svelte index cd9b3658..93040a56 100644 --- a/packages/web/src/tabs/TableDataTab.svelte +++ b/packages/web/src/tabs/TableDataTab.svelte @@ -58,6 +58,7 @@ import ToolStripCommandButton from '../buttons/ToolStripCommandButton.svelte'; import ToolStripDropDownButton from '../buttons/ToolStripDropDownButton.svelte'; import { createQuickExportMenuItems } from '../utility/createQuickExportMenu'; + import ToolStripExportButton, { createQuickExportHandlerRef } from '../buttons/ToolStripExportButton.svelte'; export let tabid; export let conid; @@ -119,18 +120,7 @@ setContext('collapsedLeftColumnStore', collapsedLeftColumnStore); $: setLocalStorage('dataGrid_collapsedLeftColumn', $collapsedLeftColumnStore); - let quickExportHandler = null; - function setQuickExportHandler(value) { - quickExportHandler = value; - } - setContext('setQuickExportHandler', setQuickExportHandler); - function getExportMenu() { - return [ - quickExportHandler ? createQuickExportMenuItems($extensions, quickExportHandler) : null, - { divider: true }, - { command: 'sqlDataGrid.export', text: 'Advanced settings' }, - ]; - } + const quickExportHandlerRef = createQuickExportHandlerRef(); @@ -151,7 +141,7 @@ - + diff --git a/packages/web/src/tabs/ViewDataTab.svelte b/packages/web/src/tabs/ViewDataTab.svelte index fb38195d..43eab9ac 100644 --- a/packages/web/src/tabs/ViewDataTab.svelte +++ b/packages/web/src/tabs/ViewDataTab.svelte @@ -10,6 +10,7 @@ import { writable } from 'svelte/store'; import ToolStripCommandButton from '../buttons/ToolStripCommandButton.svelte'; import ToolStripContainer from '../buttons/ToolStripContainer.svelte'; +import ToolStripExportButton, { createQuickExportHandlerRef } from '../buttons/ToolStripExportButton.svelte'; import DataGrid from '../datagrid/DataGrid.svelte'; import SqlDataGridCore from '../datagrid/SqlDataGridCore.svelte'; @@ -50,6 +51,8 @@ import ToolStripContainer from '../buttons/ToolStripContainer.svelte'; const collapsedLeftColumnStore = writable(getLocalStorage('dataGrid_collapsedLeftColumn', false)); setContext('collapsedLeftColumnStore', collapsedLeftColumnStore); $: setLocalStorage('dataGrid_collapsedLeftColumn', $collapsedLeftColumnStore); + + const quickExportHandlerRef = createQuickExportHandlerRef(); {#if display} @@ -66,7 +69,7 @@ import ToolStripContainer from '../buttons/ToolStripContainer.svelte'; /> - + {/if}