mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 18:43:58 +00:00
SYNC: archive UX
This commit is contained in:
committed by
Diflow
parent
544b75bcd5
commit
9380608781
@@ -43,7 +43,7 @@
|
|||||||
if (e.detail == '@create') {
|
if (e.detail == '@create') {
|
||||||
showModal(InputTextModal, {
|
showModal(InputTextModal, {
|
||||||
header: 'Archive',
|
header: 'Archive',
|
||||||
label: 'Name of new folder',
|
label: 'Name of new archive folder',
|
||||||
onConfirm: createOption,
|
onConfirm: createOption,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
import { findEngineDriver } from 'dbgate-tools';
|
import { findEngineDriver } from 'dbgate-tools';
|
||||||
import AceEditor from '../query/AceEditor.svelte';
|
import AceEditor from '../query/AceEditor.svelte';
|
||||||
import { _t } from '../translations';
|
import { _t } from '../translations';
|
||||||
|
import { showModal } from '../modals/modalTools';
|
||||||
|
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||||
|
|
||||||
export let direction;
|
export let direction;
|
||||||
export let storageTypeField;
|
export let storageTypeField;
|
||||||
@@ -54,7 +56,7 @@
|
|||||||
{ value: 'query', label: _t('common.query', { defaultMessage: 'Query' }), directions: ['source'] },
|
{ value: 'query', label: _t('common.query', { defaultMessage: 'Query' }), directions: ['source'] },
|
||||||
{
|
{
|
||||||
value: 'archive',
|
value: 'archive',
|
||||||
label: _t('common.archive', { defaultMessage: 'Archive' }),
|
label: _t('common.archive', { defaultMessage: 'Archive (JSONL)' }),
|
||||||
directions: ['source', 'target'],
|
directions: ['source', 'target'],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -108,11 +110,18 @@
|
|||||||
<FormStyledButton
|
<FormStyledButton
|
||||||
value="New archive"
|
value="New archive"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
values.update(x => ({
|
showModal(InputTextModal, {
|
||||||
...x,
|
header: 'Archive',
|
||||||
[storageTypeField]: 'archive',
|
label: 'Name of new archive folder',
|
||||||
[archiveFolderField]: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
|
value: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
|
||||||
}));
|
onConfirm: value => {
|
||||||
|
values.update(x => ({
|
||||||
|
...x,
|
||||||
|
[storageTypeField]: 'archive',
|
||||||
|
[archiveFolderField]: value,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user