mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 08:43:57 +00:00
Merge branch 'master' of https://github.com/dbgate/dbgate
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
export let value;
|
||||
export let jsonParsedValue = undefined;
|
||||
export let editorTypes;
|
||||
export let rightMargin = false;
|
||||
|
||||
$: stringified = stringifyCellValue(
|
||||
value,
|
||||
@@ -20,7 +21,7 @@
|
||||
{#if rowData == null}
|
||||
<span class="null">(No row)</span>
|
||||
{:else}
|
||||
<span class={stringified.gridStyle} title={stringified.gridTitle}>{stringified.value}</span>
|
||||
<span class={stringified.gridStyle} title={stringified.gridTitle} class:rightMargin>{stringified.value}</span>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
@@ -31,4 +32,8 @@
|
||||
.valueCellStyle {
|
||||
color: var(--theme-icon-green);
|
||||
}
|
||||
|
||||
.rightMargin {
|
||||
margin-right: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -73,7 +73,13 @@
|
||||
class:alignRight={_.isNumber(value) && !showHint}
|
||||
{style}
|
||||
>
|
||||
<CellValue {rowData} {value} {jsonParsedValue} {editorTypes} />
|
||||
<CellValue
|
||||
{rowData}
|
||||
{value}
|
||||
{jsonParsedValue}
|
||||
{editorTypes}
|
||||
rightMargin={_.isNumber(value) && !showHint && (editorTypes?.explicitDataType || col.foreignKey)}
|
||||
/>
|
||||
|
||||
{#if showHint}
|
||||
<span class="hint"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if (e.detail == '@create') {
|
||||
showModal(InputTextModal, {
|
||||
header: 'Archive',
|
||||
label: 'Name of new folder',
|
||||
label: 'Name of new archive folder',
|
||||
onConfirm: createOption,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
import { findEngineDriver } from 'dbgate-tools';
|
||||
import AceEditor from '../query/AceEditor.svelte';
|
||||
import { _t } from '../translations';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||
|
||||
export let direction;
|
||||
export let storageTypeField;
|
||||
@@ -54,7 +56,7 @@
|
||||
{ value: 'query', label: _t('common.query', { defaultMessage: 'Query' }), directions: ['source'] },
|
||||
{
|
||||
value: 'archive',
|
||||
label: _t('common.archive', { defaultMessage: 'Archive' }),
|
||||
label: _t('common.archive', { defaultMessage: 'Archive (JSONL)' }),
|
||||
directions: ['source', 'target'],
|
||||
},
|
||||
];
|
||||
@@ -108,11 +110,18 @@
|
||||
<FormStyledButton
|
||||
value="New archive"
|
||||
on:click={() => {
|
||||
values.update(x => ({
|
||||
...x,
|
||||
[storageTypeField]: 'archive',
|
||||
[archiveFolderField]: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
|
||||
}));
|
||||
showModal(InputTextModal, {
|
||||
header: 'Archive',
|
||||
label: 'Name of new archive folder',
|
||||
value: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
|
||||
onConfirm: value => {
|
||||
values.update(x => ({
|
||||
...x,
|
||||
[storageTypeField]: 'archive',
|
||||
[archiveFolderField]: value,
|
||||
}));
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -433,7 +433,7 @@ ORDER BY
|
||||
|
||||
<FormCheckboxField
|
||||
name="behaviour.jsonPreviewWrap"
|
||||
label={_t('settings.behaviour.jsonPreviewWrap', { defaultMessage: 'Wrap json in preview' })}
|
||||
label={_t('settings.behaviour.jsonPreviewWrap', { defaultMessage: 'Wrap JSON in preview' })}
|
||||
defaultValue={false}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user