diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index b69e93116..938d56bff 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -16,7 +16,6 @@ import { import registerCommand from './registerCommand'; import { get } from 'svelte/store'; import AboutModal from '../modals/AboutModal.svelte'; -import SettingsModal from '../settings/SettingsModal.svelte'; import SqlGeneratorModal from '../modals/SqlGeneratorModal.svelte'; import { showModal } from '../modals/modalTools'; import newQuery, { newDiagram, newPerspective, newQueryDesign } from '../query/newQuery'; diff --git a/packages/web/src/settings/SettingsModal.svelte b/packages/web/src/settings/SettingsModal.svelte deleted file mode 100644 index cc4706c37..000000000 --- a/packages/web/src/settings/SettingsModal.svelte +++ /dev/null @@ -1,850 +0,0 @@ - - - - -
{_t('settings.title', { defaultMessage: 'Settings' })}
- - - - - {#if electron} -
{_t('settings.appearance', { defaultMessage: 'Appearance' })}
- { - restartWarning = true; - }} - /> - {#if restartWarning} -
- - {_t('settings.nativeMenuRestartWarning', { - defaultMessage: 'Native menu settings will be applied after app restart', - })} -
- {/if} - {/if} - - -
{_t('settings.localization', { defaultMessage: 'Localization' })}
- - - { - setSelectedLanguage(e.detail); - showModal(ConfirmModal, { - message: _t('settings.localization.reloadWarning', { - defaultMessage: 'Application will be reloaded to apply new language settings', - }), - onConfirm: () => { - setTimeout(() => { - internalRedirectTo(electron ? '/index.html' : '/'); - }, 100); - }, - }); - }} - /> - - -
{_t('settings.dataGrid.title', { defaultMessage: 'Data grid' })}
- - {#if isProApp()} - - {/if} - - - - - - - - - - - - - - -
{_t('settings.sqlEditor', { defaultMessage: 'SQL editor' })}
- -
-
- -
-
- - ({ label: mode.label, value: mode.value }))} - value={$currentEditorKeybindigMode} - on:change={e => ($currentEditorKeybindigMode = e.detail)} - /> - -
-
- - ($currentEditorWrapEnabled = e.target.checked)} - /> - -
-
- - - - - - - - - - - -
- -
{_t('settings.connection', { defaultMessage: 'Connection' })}
- - { - $lockedDatabaseMode = !$lockedDatabaseMode; - }, - }} - > - ($lockedDatabaseMode = e.target.checked)} /> - - - - - - -
{_t('settings.session', { defaultMessage: 'Query sessions' })}
- - -
- - -
{_t('settings.appearance', { defaultMessage: 'Application theme' })}
- - { - if ($currentTheme) { - $currentTheme = null; - } else { - $currentTheme = getSystemTheme(); - } - }, - }} - > - { - if (e.target['checked']) { - $currentTheme = null; - } else { - $currentTheme = getSystemTheme(); - } - }} - /> - - -
- {#each $extensions.themes as theme} - - {/each} -
- -
- {_t('settings.appearance.moreThemes', { defaultMessage: 'More themes are available as' })} - plugins -
- {_t('settings.appearance.afterInstalling', { - defaultMessage: - 'After installing theme plugin (try search "theme" in available extensions) new themes will be available here.', - })} -
- -
{_t('settings.appearance.editorTheme', { defaultMessage: 'Editor theme' })}
- -
-
- - ({ label: theme, value: theme }))} - value={$currentEditorTheme} - on:change={e => ($currentEditorTheme = e.detail)} - /> - -
- -
- - x.value == $currentEditorFontSize) ? $currentEditorFontSize : 'custom'} - on:change={e => ($currentEditorFontSize = e.detail)} - /> - -
- -
- - ($currentEditorFontSize = e.target['value'])} - disabled={!!FONT_SIZES.find(x => x.value == $currentEditorFontSize) && - $currentEditorFontSize != 'custom'} - /> - -
- -
- -
-
- -
- -
-
- -
{_t('settings.defaultActions', { defaultMessage: 'Default actions' })}
- - - - - - - - - - - - - -
- -
{_t('settings.behaviour', { defaultMessage: 'Behaviour' })}
- - - - - -
- - {_t('settings.behaviour.singleClickPreview', { - defaultMessage: - 'When you single-click or select a file in the "Tables, Views, Functions" view, it is shown in a preview mode and reuses an existing tab (preview tab). This is useful if you are quickly browsing tables and don\'t want every visited table to have its own tab. When you start editing the table or use double-click to open the table from the "Tables" view, a new tab is dedicated to that table.', - })} -
- - - -
{_t('settings.confirmations', { defaultMessage: 'Confirmations' })}
- - - -
- -
{_t('settings.other', { defaultMessage: 'Other' })}
- - - - - - {#if isProApp()} - - {/if} -
- - -
{_t('settings.other.license', { defaultMessage: 'License' })}
- { - licenseKeyCheckResult = await apiCall('config/check-license', { licenseKey: value }); - }} - /> - {#if licenseKeyCheckResult} -
- {#if licenseKeyCheckResult.status == 'ok'} -
- - {_t('settings.other.licenseKey.valid', { defaultMessage: 'License key is valid' })} -
- {#if licenseKeyCheckResult.validTo} -
- {_t('settings.other.licenseKey.validTo', { defaultMessage: 'License valid to:' })} - {licenseKeyCheckResult.validTo} -
- {/if} - {#if licenseKeyCheckResult.expiration} -
- {_t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' })} - {safeFormatDate(licenseKeyCheckResult.expiration)} -
- {/if} - {:else if licenseKeyCheckResult.status == 'error'} -
- - {licenseKeyCheckResult.errorMessage ?? - _t('settings.other.licenseKey.invalid', { defaultMessage: 'License key is invalid' })} - {#if licenseKeyCheckResult.expiration} -
- {_t('settings.other.licenseKey.expiration', { defaultMessage: 'License key expiration:' })} - {safeFormatDate(licenseKeyCheckResult.expiration)} -
- {/if} -
- {#if licenseKeyCheckResult.isExpired} -
- { - licenseKeyCheckResult = await apiCall('config/get-new-license', { oldLicenseKey: licenseKey }); - if (licenseKeyCheckResult.licenseKey) { - apiCall('config/update-settings', { 'other.licenseKey': licenseKeyCheckResult.licenseKey }); - } - }} - /> -
- {/if} - {/if} -
- {/if} -
- - -
{_t('settings.externalTools', { defaultMessage: 'External tools' })}
- - - - - -
- - - - -
-
- -
- - -
-
-
- -