diff --git a/frontend/src/organisms/connection/collection/find.svelte b/frontend/src/organisms/connection/collection/find.svelte index 4e8e37b..045235b 100644 --- a/frontend/src/organisms/connection/collection/find.svelte +++ b/frontend/src/organisms/connection/collection/find.svelte @@ -160,7 +160,7 @@ -
+
+ @@ -276,10 +279,10 @@ .form-row.two { grid-template: 1fr / 5fr 1fr 1fr; } - .form-row.three { + .form-row.actions { margin-bottom: 0rem; - grid-template: 1fr / repeat(3, auto); - justify-content: end; + grid-template: 1fr / repeat(4, auto); + justify-content: start; } .result { diff --git a/frontend/src/organisms/connection/export/export.svelte b/frontend/src/organisms/connection/dump.svelte similarity index 72% rename from frontend/src/organisms/connection/export/export.svelte rename to frontend/src/organisms/connection/dump.svelte index 7b96bf2..c13e67a 100644 --- a/frontend/src/organisms/connection/export/export.svelte +++ b/frontend/src/organisms/connection/dump.svelte @@ -5,26 +5,14 @@ import busy from '$lib/stores/busy'; import { connections } from '$lib/stores/connections'; import applicationSettings from '$lib/stores/settings'; - import { OpenConnection, OpenDatabase, PerformExport } from '$wails/go/app/App'; + import { OpenConnection, OpenDatabase, PerformDump } from '$wails/go/app/App'; export let info; export let hosts = {}; - const actionLabel = { - export: 'Perform export', - dump: 'Perform dump', - }; - $: if (info) { info.outdir = info.outdir || $applicationSettings.defaultExportDirectory; - info.filename = info.filename || `Export ${new Date().getTime()}`; - - if (info.filetype === 'bson') { - info.type = 'dump'; - } - else { - info.type = 'export'; - } + info.filename = info.filename || `Dump ${new Date().getTime()}`; } async function selectHost(hostKey) { @@ -63,8 +51,11 @@ } } - async function performExport() { - await PerformExport(JSON.stringify(info)); + async function performDump() { + const ok = await PerformDump(JSON.stringify(info)); + if (ok) { + info = undefined; + } } function selectCollection(collKey) { @@ -72,38 +63,16 @@ } - -
+ + -
- {#if info.filetype === 'json'} - - {/if} -
-
- +
@@ -164,7 +133,7 @@ diff --git a/frontend/src/organisms/connection/index.svelte b/frontend/src/organisms/connection/index.svelte index b393875..2c924dd 100644 --- a/frontend/src/organisms/connection/index.svelte +++ b/frontend/src/organisms/connection/index.svelte @@ -6,7 +6,7 @@ import { EventsOn } from '$wails/runtime/runtime'; import { onMount } from 'svelte'; import CollectionDetail from './collection/index.svelte'; - import Export from './export/export.svelte'; + import DumpInfo from './dump.svelte'; import HostDetail from './hostdetail.svelte'; import HostTree from './hosttree.svelte'; @@ -119,7 +119,7 @@ {hosts} /> - +