mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 11:45:59 +00:00
option to skip table save confirmation #329
This commit is contained in:
@@ -2,15 +2,19 @@
|
||||
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
||||
import FormProvider from '../forms/FormProvider.svelte';
|
||||
import FormSubmit from '../forms/FormSubmit.svelte';
|
||||
import JSONTree from '../jsontree/JSONTree.svelte';
|
||||
import TemplatedCheckboxField from '../forms/TemplatedCheckboxField.svelte';
|
||||
import AceEditor from '../query/AceEditor.svelte';
|
||||
import newQuery from '../query/newQuery';
|
||||
import newQuery from '../query/newQuery';
|
||||
import { apiCall } from '../utility/api';
|
||||
|
||||
import ModalBase from './ModalBase.svelte';
|
||||
import { closeCurrentModal } from './modalTools';
|
||||
|
||||
export let script;
|
||||
export let onConfirm;
|
||||
export let skipConfirmSettingKey = null;
|
||||
|
||||
let dontAskAgain;
|
||||
</script>
|
||||
|
||||
<FormProvider>
|
||||
@@ -21,6 +25,20 @@ import newQuery from '../query/newQuery';
|
||||
<AceEditor mode="javascript" readOnly value={script} />
|
||||
</div>
|
||||
|
||||
{#if skipConfirmSettingKey}
|
||||
<div class="mt-2">
|
||||
<TemplatedCheckboxField
|
||||
label="Don't ask again"
|
||||
templateProps={{ noMargin: true }}
|
||||
checked={dontAskAgain}
|
||||
on:change={e => {
|
||||
dontAskAgain = e.detail;
|
||||
apiCall('config/update-settings', { [skipConfirmSettingKey]: e.detail });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div slot="footer">
|
||||
<FormSubmit
|
||||
value="OK"
|
||||
|
||||
Reference in New Issue
Block a user