2020-05-30 12:54:05 +02:00
|
|
|
<template>
|
2022-04-25 13:45:07 +02:00
|
|
|
<Teleport to="#window-content">
|
|
|
|
<div id="settings" class="modal active">
|
|
|
|
<a class="modal-overlay c-hand" @click="closeModal" />
|
2022-06-26 15:07:37 +02:00
|
|
|
<div ref="trapRef" class="modal-container">
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="modal-header pl-2">
|
|
|
|
<div class="modal-title h6">
|
|
|
|
<div class="d-flex">
|
|
|
|
<i class="mdi mdi-24px mdi-cog mr-1" />
|
2022-05-24 23:02:14 +02:00
|
|
|
<span class="cut-text">{{ t('word.settings') }}</span>
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2020-08-12 18:11:48 +02:00
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
<a class="btn btn-clear c-hand" @click="closeModal" />
|
2020-05-30 12:54:05 +02:00
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="modal-body p-0">
|
|
|
|
<div class="panel">
|
|
|
|
<div class="panel-nav">
|
|
|
|
<ul class="tab tab-block">
|
|
|
|
<li
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'general'}"
|
|
|
|
@click="selectTab('general')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<a class="tab-link">{{ t('word.general') }}</a>
|
2022-04-25 13:45:07 +02:00
|
|
|
</li>
|
|
|
|
<li
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'themes'}"
|
|
|
|
@click="selectTab('themes')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<a class="tab-link">{{ t('word.themes') }}</a>
|
2022-04-25 13:45:07 +02:00
|
|
|
</li>
|
2022-08-05 12:07:19 +02:00
|
|
|
<li
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'shortcuts'}"
|
|
|
|
@click="selectTab('shortcuts')"
|
|
|
|
>
|
|
|
|
<a class="tab-link">{{ t('word.shortcuts') }}</a>
|
|
|
|
</li>
|
2022-04-25 13:45:07 +02:00
|
|
|
<li
|
|
|
|
v-if="updateStatus !== 'disabled'"
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'update'}"
|
|
|
|
@click="selectTab('update')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<a class="tab-link" :class="{'badge badge-update': hasUpdates}">{{ t('word.update') }}</a>
|
2022-04-25 13:45:07 +02:00
|
|
|
</li>
|
|
|
|
<li
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'changelog'}"
|
|
|
|
@click="selectTab('changelog')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<a class="tab-link">{{ t('word.changelog') }}</a>
|
2022-04-25 13:45:07 +02:00
|
|
|
</li>
|
|
|
|
<li
|
|
|
|
class="tab-item c-hand"
|
|
|
|
:class="{'active': selectedTab === 'about'}"
|
|
|
|
@click="selectTab('about')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<a class="tab-link">{{ t('word.about') }}</a>
|
2022-04-25 13:45:07 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div v-show="selectedTab === 'general'" class="panel-body py-4">
|
|
|
|
<div class="container">
|
|
|
|
<form class="form-horizontal columns">
|
|
|
|
<div class="column col-12 h6 text-uppercase mb-1">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.application') }}
|
2020-05-30 12:54:05 +02:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="column col-12 col-sm-12 mb-2 columns">
|
|
|
|
<div class="form-group column col-12">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
|
|
|
<i class="mdi mdi-18px mdi-translate mr-1" />
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.language') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-05-11 23:30:31 +02:00
|
|
|
<BaseSelect
|
2022-04-25 13:45:07 +02:00
|
|
|
v-model="localLocale"
|
|
|
|
class="form-select"
|
2022-05-11 23:30:31 +02:00
|
|
|
:options="locales"
|
|
|
|
option-track-by="code"
|
|
|
|
option-label="name"
|
2022-04-25 13:45:07 +02:00
|
|
|
@change="changeLocale(localLocale)"
|
2022-05-11 23:30:31 +02:00
|
|
|
/>
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-4 col-sm-12 px-2 p-vcentered">
|
2022-12-18 15:59:58 +01:00
|
|
|
<small class="d-block" :style="'line-height: 1.1; font-size: 70%;'">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.missingOrIncompleteTranslation') }}<br>
|
|
|
|
<a class="text-bold c-hand" @click="openOutside('https://github.com/antares-sql/antares/wiki/Translate-Antares')">{{ t('message.findOutHowToContribute') }}</a>
|
2022-05-04 11:24:48 +02:00
|
|
|
</small>
|
|
|
|
</div>
|
2021-07-22 10:41:06 +02:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="form-group column col-12">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.dataTabPageSize') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-05-11 23:30:31 +02:00
|
|
|
<BaseSelect
|
2022-04-25 13:45:07 +02:00
|
|
|
v-model="localPageSize"
|
|
|
|
class="form-select"
|
2022-05-11 23:30:31 +02:00
|
|
|
:options="pageSizes"
|
2022-04-25 13:45:07 +02:00
|
|
|
@change="changePageSize(+localPageSize)"
|
2022-05-11 23:30:31 +02:00
|
|
|
/>
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2022-03-22 16:13:44 +01:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.restorePreviourSession') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleRestoreSession">
|
|
|
|
<input type="checkbox" :checked="restoreTabs">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
2022-03-22 16:13:44 +01:00
|
|
|
</div>
|
2023-02-23 08:51:33 +01:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
|
|
|
<label class="form-label">
|
|
|
|
{{ t('message.showTableSize') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-1 col-sm-12">
|
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleShowTableSize">
|
|
|
|
<input type="checkbox" :checked="showTableSize">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 col-sm-12 px-2 p-vcentered">
|
|
|
|
<small class="d-block" :style="'line-height: 1.1; font-size: 70%;'">
|
|
|
|
{{ t('message.showTableSizeDescription') }}
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.disableBlur') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleDisableBlur">
|
|
|
|
<input type="checkbox" :checked="disableBlur">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-12-24 10:40:22 +01:00
|
|
|
</div>
|
2022-07-04 15:10:40 +02:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
|
|
|
<label class="form-label">
|
|
|
|
{{ t('message.disableScratchpad') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-3 col-sm-12">
|
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleDisableScratchpad">
|
|
|
|
<input type="checkbox" :checked="disableScratchpad">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="form-group column col-12">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.notificationsTimeout') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<input
|
|
|
|
v-model="localTimeout"
|
|
|
|
class="form-input"
|
|
|
|
type="number"
|
|
|
|
min="1"
|
|
|
|
@focusout="checkNotificationsTimeout"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<span class="input-group-addon">{{ t('word.seconds') }}</span>
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2020-12-24 10:40:22 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-30 19:12:29 +02:00
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="column col-12 h6 mt-4 text-uppercase mb-1">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.editor') }}
|
2020-07-30 19:12:29 +02:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="column col-12 col-sm-12 columns">
|
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.autoCompletion') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleAutoComplete">
|
|
|
|
<input type="checkbox" :checked="selectedAutoComplete">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-12-24 15:33:51 +01:00
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-label">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.wrapLongLines') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-05-04 11:24:48 +02:00
|
|
|
<div class="col-3 col-sm-12">
|
2022-04-25 13:45:07 +02:00
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleLineWrap">
|
|
|
|
<input type="checkbox" :checked="selectedLineWrap">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-12-24 15:33:51 +01:00
|
|
|
</div>
|
2022-12-18 15:59:58 +01:00
|
|
|
<div class="form-group column col-12 mb-0">
|
|
|
|
<div class="col-5 col-sm-12">
|
|
|
|
<label class="form-label">
|
|
|
|
{{ t('message.executeSelectedQuery') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-3 col-sm-12">
|
|
|
|
<label class="form-switch d-inline-block" @click.prevent="toggleExecuteSelected">
|
|
|
|
<input type="checkbox" :checked="selectedExecuteSelected">
|
|
|
|
<i class="form-icon" />
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-16 18:15:49 +01:00
|
|
|
</div>
|
|
|
|
<div class="column col-12 h6 mt-4 text-uppercase mb-1">
|
|
|
|
{{ t('word.resultsTable') }}
|
|
|
|
</div>
|
|
|
|
<div class="column col-12 col-sm-12 columns">
|
2023-01-15 22:42:13 +01:00
|
|
|
<div class="form-group column col-12">
|
|
|
|
<div class="col-5 col-sm-12">
|
|
|
|
<label class="form-label">
|
|
|
|
{{ t('message.defaultCopyType') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-3 col-sm-12">
|
|
|
|
<BaseSelect
|
|
|
|
v-model="defaultCopyType"
|
|
|
|
class="form-select"
|
|
|
|
:options="copyTypes"
|
|
|
|
option-track-by="code"
|
|
|
|
option-label="name"
|
|
|
|
@change="changeDefaultCopyType(defaultCopyType)"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-24 15:33:51 +01:00
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2020-12-24 10:40:22 +01:00
|
|
|
</div>
|
2020-06-02 19:13:57 +02:00
|
|
|
|
2022-04-25 13:45:07 +02:00
|
|
|
<div v-show="selectedTab === 'themes'" class="panel-body py-4">
|
|
|
|
<div class="container">
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column col-12 h6 text-uppercase mb-2">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.applicationTheme') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="column col-6 c-hand theme-block"
|
|
|
|
:class="{'selected': applicationTheme === 'dark'}"
|
|
|
|
@click="changeApplicationTheme('dark')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<img :src="darkPreview" class="img-responsive img-fit-cover s-rounded">
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="theme-name text-light">
|
|
|
|
<i class="mdi mdi-moon-waning-crescent mdi-48px" />
|
|
|
|
<div class="h6 mt-4">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.dark') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2020-12-23 18:07:50 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
<div
|
|
|
|
class="column col-6 c-hand theme-block"
|
|
|
|
:class="{'selected': applicationTheme === 'light'}"
|
|
|
|
@click="changeApplicationTheme('light')"
|
|
|
|
>
|
2022-05-24 23:02:14 +02:00
|
|
|
<img :src="lightPreview" class="img-responsive img-fit-cover s-rounded">
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="theme-name text-dark">
|
|
|
|
<i class="mdi mdi-white-balance-sunny mdi-48px" />
|
|
|
|
<div class="h6 mt-4">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.light') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2020-12-23 18:07:50 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="columns mt-4">
|
|
|
|
<div class="column col-12 h6 text-uppercase mb-2 mt-4">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('message.editorTheme') }}
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2022-09-21 10:33:44 +02:00
|
|
|
<div class="column col-5 h5 mb-4">
|
2022-05-11 23:30:31 +02:00
|
|
|
<BaseSelect
|
2022-04-25 13:45:07 +02:00
|
|
|
v-model="localEditorTheme"
|
|
|
|
class="form-select"
|
2022-05-11 23:30:31 +02:00
|
|
|
:options="editorThemes"
|
|
|
|
option-label="name"
|
|
|
|
option-track-by="code"
|
|
|
|
group-label="group"
|
|
|
|
group-values="themes"
|
2022-04-25 13:45:07 +02:00
|
|
|
@change="changeEditorTheme(localEditorTheme)"
|
2022-05-11 23:30:31 +02:00
|
|
|
/>
|
2022-04-25 13:45:07 +02:00
|
|
|
</div>
|
2022-09-21 10:33:44 +02:00
|
|
|
<div class="column col-7 mb-4">
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="btn-group btn-group-block">
|
2022-09-21 10:33:44 +02:00
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'xsmall'}"
|
|
|
|
@click="changeEditorFontSize('xsmall')"
|
|
|
|
>
|
|
|
|
10px
|
|
|
|
</button>
|
2022-04-25 13:45:07 +02:00
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'small'}"
|
|
|
|
@click="changeEditorFontSize('small')"
|
|
|
|
>
|
2022-09-21 10:33:44 +02:00
|
|
|
12px
|
2022-04-25 13:45:07 +02:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'medium'}"
|
|
|
|
@click="changeEditorFontSize('medium')"
|
|
|
|
>
|
2022-09-21 10:33:44 +02:00
|
|
|
14px
|
2022-04-25 13:45:07 +02:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'large'}"
|
|
|
|
@click="changeEditorFontSize('large')"
|
|
|
|
>
|
2022-09-21 10:33:44 +02:00
|
|
|
16px
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'xlarge'}"
|
|
|
|
@click="changeEditorFontSize('xlarge')"
|
|
|
|
>
|
|
|
|
18px
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-dark cut-text"
|
|
|
|
:class="{'active': editorFontSize === 'xxlarge'}"
|
|
|
|
@click="changeEditorFontSize('xxlarge')"
|
|
|
|
>
|
|
|
|
20px
|
2022-04-25 13:45:07 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="column col-12">
|
|
|
|
<BaseTextEditor
|
|
|
|
:model-value="exampleQuery"
|
|
|
|
mode="sql"
|
|
|
|
:workspace="workspace"
|
|
|
|
:read-only="true"
|
|
|
|
:height="270"
|
|
|
|
/>
|
2021-06-19 11:54:15 +02:00
|
|
|
</div>
|
2020-12-23 18:07:50 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-28 15:31:16 +02:00
|
|
|
</div>
|
2020-06-02 19:13:57 +02:00
|
|
|
|
2022-08-08 16:44:40 +02:00
|
|
|
<div v-show="selectedTab === 'shortcuts'" class="panel-body py-4">
|
|
|
|
<ModalSettingsShortcuts />
|
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
<div v-show="selectedTab === 'update'" class="panel-body py-4">
|
|
|
|
<ModalSettingsUpdate />
|
|
|
|
</div>
|
|
|
|
<div v-show="selectedTab === 'changelog'" class="panel-body py-4">
|
|
|
|
<ModalSettingsChangelog />
|
|
|
|
</div>
|
2020-06-02 19:13:57 +02:00
|
|
|
|
2022-04-25 13:45:07 +02:00
|
|
|
<div v-show="selectedTab === 'about'" class="panel-body py-4">
|
|
|
|
<div class="text-center">
|
2022-05-24 23:02:14 +02:00
|
|
|
<img :src="appLogo" width="128">
|
2022-04-25 13:45:07 +02:00
|
|
|
<h4>{{ appName }}</h4>
|
|
|
|
<p class="mb-2">
|
2022-05-24 23:02:14 +02:00
|
|
|
{{ t('word.version') }} {{ appVersion }}<br>
|
2022-04-25 13:45:07 +02:00
|
|
|
<a class="c-hand" @click="openOutside('https://github.com/antares-sql/antares')"><i class="mdi mdi-github d-inline" /> GitHub</a> • <a class="c-hand" @click="openOutside('https://twitter.com/AntaresSQL')"><i class="mdi mdi-twitter d-inline" /> Twitter</a> • <a class="c-hand" @click="openOutside('https://antares-sql.app/')"><i class="mdi mdi-web d-inline" /> Website</a><br>
|
2022-05-24 23:02:14 +02:00
|
|
|
<small>{{ t('word.author') }} <a class="c-hand" @click="openOutside('https://github.com/Fabio286')">{{ appAuthor }}</a></small><br>
|
2022-04-25 13:45:07 +02:00
|
|
|
</p>
|
|
|
|
<div class="mb-2">
|
2022-05-24 23:02:14 +02:00
|
|
|
<small class="d-block text-uppercase">{{ t('word.contributors') }}:</small>
|
2022-04-25 13:45:07 +02:00
|
|
|
<div class="d-block py-1">
|
|
|
|
<small v-for="(contributor, i) in otherContributors" :key="i">{{ i !== 0 ? ', ' : '' }}{{ contributor }}</small>
|
|
|
|
</div>
|
2022-05-24 23:02:14 +02:00
|
|
|
<small>{{ t('message.madeWithJS') }}</small>
|
2022-03-06 16:02:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-30 12:54:05 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-25 13:45:07 +02:00
|
|
|
</Teleport>
|
2020-05-30 12:54:05 +02:00
|
|
|
</template>
|
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
<script setup lang="ts">
|
2022-08-01 18:13:14 +02:00
|
|
|
import { onBeforeUnmount, Ref, ref, computed } from 'vue';
|
2022-04-24 23:10:25 +02:00
|
|
|
import { shell } from 'electron';
|
2022-04-27 18:23:48 +02:00
|
|
|
import { storeToRefs } from 'pinia';
|
2022-05-24 23:02:14 +02:00
|
|
|
import { useI18n } from 'vue-i18n';
|
2022-04-27 18:23:48 +02:00
|
|
|
import { useApplicationStore } from '@/stores/application';
|
2022-04-30 00:47:37 +02:00
|
|
|
import { useSettingsStore } from '@/stores/settings';
|
|
|
|
import { useWorkspacesStore } from '@/stores/workspaces';
|
2022-06-26 15:07:37 +02:00
|
|
|
import { useFocusTrap } from '@/composables/useFocusTrap';
|
2022-05-10 13:02:01 +02:00
|
|
|
import { localesNames } from '@/i18n/supported-locales';
|
2022-05-24 23:02:14 +02:00
|
|
|
import ModalSettingsUpdate from '@/components/ModalSettingsUpdate.vue';
|
|
|
|
import ModalSettingsChangelog from '@/components/ModalSettingsChangelog.vue';
|
2022-08-08 16:44:40 +02:00
|
|
|
import ModalSettingsShortcuts from '@/components/ModalSettingsShortcuts.vue';
|
2022-05-24 23:02:14 +02:00
|
|
|
import BaseTextEditor from '@/components/BaseTextEditor.vue';
|
2022-05-11 23:30:31 +02:00
|
|
|
import BaseSelect from '@/components/BaseSelect.vue';
|
2022-08-05 17:03:16 +02:00
|
|
|
import { AvailableLocale } from '@/i18n';
|
2020-05-30 12:54:05 +02:00
|
|
|
|
2022-08-05 17:03:16 +02:00
|
|
|
const { t } = useI18n();
|
2022-04-30 00:47:37 +02:00
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const applicationStore = useApplicationStore();
|
|
|
|
const settingsStore = useSettingsStore();
|
|
|
|
const workspacesStore = useWorkspacesStore();
|
2022-04-27 18:23:48 +02:00
|
|
|
|
2022-06-26 15:07:37 +02:00
|
|
|
const { trapRef } = useFocusTrap({ disableAutofocus: true });
|
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const {
|
|
|
|
selectedSettingTab,
|
|
|
|
updateStatus
|
|
|
|
} = storeToRefs(applicationStore);
|
|
|
|
const {
|
|
|
|
locale: selectedLocale,
|
|
|
|
dataTabLimit: pageSize,
|
|
|
|
autoComplete: selectedAutoComplete,
|
|
|
|
lineWrap: selectedLineWrap,
|
2022-12-18 15:59:58 +01:00
|
|
|
executeSelected: selectedExecuteSelected,
|
2023-01-15 22:42:13 +01:00
|
|
|
defaultCopyType: selectedCopyType,
|
2022-05-24 23:02:14 +02:00
|
|
|
notificationsTimeout,
|
|
|
|
restoreTabs,
|
2023-02-23 08:51:33 +01:00
|
|
|
showTableSize,
|
2022-05-24 23:02:14 +02:00
|
|
|
disableBlur,
|
2022-07-04 15:10:40 +02:00
|
|
|
disableScratchpad,
|
2022-05-24 23:02:14 +02:00
|
|
|
applicationTheme,
|
|
|
|
editorTheme,
|
|
|
|
editorFontSize
|
|
|
|
} = storeToRefs(settingsStore);
|
2022-04-30 00:47:37 +02:00
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
2022-04-27 18:23:48 +02:00
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const {
|
|
|
|
changeLocale,
|
|
|
|
changePageSize,
|
|
|
|
changeRestoreTabs,
|
|
|
|
changeDisableBlur,
|
2022-07-04 15:10:40 +02:00
|
|
|
changeDisableScratchpad,
|
2022-05-24 23:02:14 +02:00
|
|
|
changeAutoComplete,
|
|
|
|
changeLineWrap,
|
2022-12-18 15:59:58 +01:00
|
|
|
changeExecuteSelected,
|
2022-05-24 23:02:14 +02:00
|
|
|
changeApplicationTheme,
|
|
|
|
changeEditorTheme,
|
|
|
|
changeEditorFontSize,
|
2023-01-15 22:42:13 +01:00
|
|
|
updateNotificationsTimeout,
|
2023-02-23 08:51:33 +01:00
|
|
|
changeDefaultCopyType,
|
|
|
|
changeShowTableSize
|
2022-05-24 23:02:14 +02:00
|
|
|
} = settingsStore;
|
|
|
|
const {
|
|
|
|
hideSettingModal: closeModal,
|
|
|
|
appName,
|
|
|
|
appVersion
|
|
|
|
} = applicationStore;
|
|
|
|
const { getWorkspace } = workspacesStore;
|
2020-05-31 17:56:33 +02:00
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const appAuthor = 'Fabio Di Stasio';
|
|
|
|
const pageSizes = [30, 40, 100, 250, 500, 1000];
|
|
|
|
const contributors = process.env.APP_CONTRIBUTORS;
|
|
|
|
const appLogo = require('../images/logo.svg');
|
|
|
|
const darkPreview = require('../images/dark.png');
|
|
|
|
const lightPreview = require('../images/light.png');
|
2022-08-18 16:10:29 +02:00
|
|
|
const exampleQuery = `-- This is an example
|
2023-01-15 22:42:13 +01:00
|
|
|
SELECT
|
2022-08-18 16:10:29 +02:00
|
|
|
employee.id,
|
|
|
|
employee.first_name,
|
|
|
|
employee.last_name,
|
|
|
|
SUM(DATEDIFF("SECOND", call.start, call.end)) AS call_duration
|
|
|
|
FROM call
|
|
|
|
INNER JOIN employee ON call.employee_id = employee.id
|
|
|
|
GROUP BY
|
|
|
|
employee.id,
|
|
|
|
employee.first_name,
|
|
|
|
employee.last_name
|
|
|
|
ORDER BY
|
|
|
|
employee.id ASC;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const localLocale: Ref<AvailableLocale> = ref(null);
|
2023-01-15 22:42:13 +01:00
|
|
|
const defaultCopyType: Ref<string> = ref(null);
|
2022-08-18 16:10:29 +02:00
|
|
|
const localPageSize: Ref<number> = ref(null);
|
|
|
|
const localTimeout: Ref<number> = ref(null);
|
|
|
|
const localEditorTheme: Ref<string> = ref(null);
|
|
|
|
const selectedTab: Ref<string> = ref('general');
|
|
|
|
|
|
|
|
const editorThemes = computed(() => [
|
2022-05-24 23:02:14 +02:00
|
|
|
{
|
|
|
|
group: t('word.light'),
|
|
|
|
themes: [
|
|
|
|
{ code: 'chrome', name: 'Chrome' },
|
|
|
|
{ code: 'clouds', name: 'Clouds' },
|
|
|
|
{ code: 'crimson_editor', name: 'Crimson Editor' },
|
|
|
|
{ code: 'dawn', name: 'Dawn' },
|
|
|
|
{ code: 'dreamweaver', name: 'Dreamweaver' },
|
|
|
|
{ code: 'eclupse', name: 'Eclipse' },
|
|
|
|
{ code: 'github', name: 'GitHub' },
|
|
|
|
{ code: 'iplastic', name: 'IPlastic' },
|
|
|
|
{ code: 'solarized_light', name: 'Solarized Light' },
|
|
|
|
{ code: 'textmate', name: 'TextMate' },
|
|
|
|
{ code: 'tomorrow', name: 'Tomorrow' },
|
|
|
|
{ code: 'xcode', name: 'Xcode' },
|
|
|
|
{ code: 'kuroir', name: 'Kuroir' },
|
|
|
|
{ code: 'katzenmilch', name: 'KatzenMilch' },
|
|
|
|
{ code: 'sqlserver', name: 'SQL Server' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
group: t('word.dark'),
|
|
|
|
themes: [
|
|
|
|
{ code: 'ambiance', name: 'Ambiance' },
|
|
|
|
{ code: 'chaos', name: 'Chaos' },
|
|
|
|
{ code: 'clouds_midnight', name: 'Clouds Midnight' },
|
|
|
|
{ code: 'dracula', name: 'Dracula' },
|
|
|
|
{ code: 'cobalt', name: 'Cobalt' },
|
|
|
|
{ code: 'gruvbox', name: 'Gruvbox' },
|
|
|
|
{ code: 'gob', name: 'Green on Black' },
|
|
|
|
{ code: 'idle_fingers', name: 'Idle Fingers' },
|
|
|
|
{ code: 'kr_theme', name: 'krTheme' },
|
|
|
|
{ code: 'merbivore', name: 'Merbivore' },
|
|
|
|
{ code: 'mono_industrial', name: 'Mono Industrial' },
|
|
|
|
{ code: 'monokai', name: 'Monokai' },
|
|
|
|
{ code: 'nord_dark', name: 'Nord Dark' },
|
|
|
|
{ code: 'pastel_on_dark', name: 'Pastel on Dark' },
|
|
|
|
{ code: 'solarized_dark', name: 'Solarized Dark' },
|
|
|
|
{ code: 'terminal', name: 'Terminal' },
|
|
|
|
{ code: 'tomorrow_night', name: 'Tomorrow Night' },
|
|
|
|
{ code: 'tomorrow_night_blue', name: 'Tomorrow Night Blue' },
|
|
|
|
{ code: 'tomorrow_night_bright', name: 'Tomorrow Night Bright' },
|
|
|
|
{ code: 'tomorrow_night_eighties', name: 'Tomorrow Night 80s' },
|
|
|
|
{ code: 'twilight', name: 'Twilight' },
|
|
|
|
{ code: 'vibrant_ink', name: 'Vibrant Ink' }
|
|
|
|
]
|
|
|
|
}
|
2022-08-18 16:10:29 +02:00
|
|
|
]);
|
2022-05-24 23:02:14 +02:00
|
|
|
|
|
|
|
const locales = computed(() => {
|
|
|
|
const locales = [];
|
2022-08-05 17:03:16 +02:00
|
|
|
for (const locale of Object.keys(localesNames))
|
2022-05-24 23:02:14 +02:00
|
|
|
locales.push({ code: locale, name: localesNames[locale] });
|
|
|
|
|
|
|
|
return locales;
|
|
|
|
});
|
|
|
|
|
2023-01-15 22:42:13 +01:00
|
|
|
const copyTypes = computed(() => [
|
|
|
|
{ code: 'cell', name: t('word.cell') },
|
|
|
|
{ code: 'html', name: t('word.table') },
|
|
|
|
{ code: 'json', name: 'JSON' },
|
|
|
|
{ code: 'csv', name: 'CSV' },
|
|
|
|
{ code: 'sql', name: 'SQL insert' }
|
|
|
|
]);
|
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const hasUpdates = computed(() => ['available', 'downloading', 'downloaded', 'link'].includes(updateStatus.value));
|
|
|
|
|
|
|
|
const workspace = computed(() => {
|
|
|
|
return getWorkspace(selectedWorkspace.value);
|
|
|
|
});
|
|
|
|
|
|
|
|
const otherContributors = computed(() => {
|
|
|
|
return contributors
|
|
|
|
.split(',')
|
|
|
|
.filter(c => !c.includes(appAuthor))
|
|
|
|
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
|
|
|
|
});
|
|
|
|
|
|
|
|
const selectTab = (tab: string) => {
|
|
|
|
selectedTab.value = tab;
|
|
|
|
};
|
|
|
|
|
|
|
|
const openOutside = (link: string) => {
|
|
|
|
shell.openExternal(link);
|
|
|
|
};
|
|
|
|
|
|
|
|
const checkNotificationsTimeout = () => {
|
|
|
|
if (!localTimeout.value)
|
|
|
|
localTimeout.value = 10;
|
|
|
|
|
|
|
|
updateNotificationsTimeout(+localTimeout.value);
|
|
|
|
};
|
|
|
|
|
|
|
|
const onKey = (e: KeyboardEvent) => {
|
|
|
|
e.stopPropagation();
|
|
|
|
if (e.key === 'Escape')
|
|
|
|
closeModal();
|
|
|
|
};
|
|
|
|
|
|
|
|
const toggleRestoreSession = () => {
|
|
|
|
changeRestoreTabs(!restoreTabs.value);
|
2020-05-30 12:54:05 +02:00
|
|
|
};
|
2022-05-24 23:02:14 +02:00
|
|
|
|
2023-02-23 08:51:33 +01:00
|
|
|
const toggleShowTableSize = () => {
|
|
|
|
changeShowTableSize(!showTableSize.value);
|
|
|
|
};
|
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const toggleDisableBlur = () => {
|
|
|
|
changeDisableBlur(!disableBlur.value);
|
|
|
|
};
|
|
|
|
|
2022-07-04 15:10:40 +02:00
|
|
|
const toggleDisableScratchpad = () => {
|
|
|
|
changeDisableScratchpad(!disableScratchpad.value);
|
|
|
|
};
|
|
|
|
|
2022-05-24 23:02:14 +02:00
|
|
|
const toggleAutoComplete = () => {
|
|
|
|
changeAutoComplete(!selectedAutoComplete.value);
|
|
|
|
};
|
|
|
|
|
|
|
|
const toggleLineWrap = () => {
|
|
|
|
changeLineWrap(!selectedLineWrap.value);
|
|
|
|
};
|
|
|
|
|
2022-12-18 15:59:58 +01:00
|
|
|
const toggleExecuteSelected = () => {
|
|
|
|
changeExecuteSelected(!selectedExecuteSelected.value);
|
|
|
|
};
|
|
|
|
|
2022-08-05 17:03:16 +02:00
|
|
|
localLocale.value = selectedLocale.value;
|
2023-01-15 22:42:13 +01:00
|
|
|
defaultCopyType.value = selectedCopyType.value;
|
2022-05-24 23:02:14 +02:00
|
|
|
localPageSize.value = pageSize.value as number;
|
|
|
|
localTimeout.value = notificationsTimeout.value as number;
|
|
|
|
localEditorTheme.value = editorTheme.value as string;
|
|
|
|
selectedTab.value = selectedSettingTab.value;
|
|
|
|
window.addEventListener('keydown', onKey);
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
window.removeEventListener('keydown', onKey);
|
|
|
|
});
|
2020-05-30 12:54:05 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-07-31 18:16:28 +02:00
|
|
|
#settings {
|
2021-04-11 12:35:16 +02:00
|
|
|
.modal-container {
|
|
|
|
position: absolute;
|
|
|
|
top: 17.5vh;
|
|
|
|
|
|
|
|
.modal-body {
|
|
|
|
overflow: hidden;
|
2020-05-30 12:54:05 +02:00
|
|
|
|
2022-08-09 16:10:08 +02:00
|
|
|
.tab-link {
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2022-08-05 17:03:16 +02:00
|
|
|
}
|
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.panel-body {
|
|
|
|
min-height: calc(25vh - 70px);
|
2021-04-12 18:46:35 +02:00
|
|
|
max-height: 65vh;
|
2021-04-11 12:35:16 +02:00
|
|
|
overflow: auto;
|
2020-12-23 18:07:50 +01:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.theme-block {
|
|
|
|
position: relative;
|
|
|
|
text-align: center;
|
2020-12-23 18:07:50 +01:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
&.selected {
|
|
|
|
img {
|
|
|
|
box-shadow: 0 0 0 3px $primary-color;
|
|
|
|
}
|
2020-12-23 18:07:50 +01:00
|
|
|
}
|
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
&.disabled {
|
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
2020-12-23 18:07:50 +01:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.theme-name {
|
|
|
|
position: absolute;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-direction: column;
|
|
|
|
top: 0;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2020-12-23 18:07:50 +01:00
|
|
|
}
|
|
|
|
}
|
2020-05-31 17:56:33 +02:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.badge::after {
|
|
|
|
background: #32b643;
|
|
|
|
}
|
2020-05-30 12:54:05 +02:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.badge-update::after {
|
|
|
|
bottom: initial;
|
|
|
|
background: $primary-color;
|
|
|
|
}
|
2020-08-17 17:37:42 +02:00
|
|
|
|
2021-04-11 12:35:16 +02:00
|
|
|
.form-label {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2020-07-31 18:16:28 +02:00
|
|
|
}
|
|
|
|
}
|
2020-05-30 12:54:05 +02:00
|
|
|
}
|
|
|
|
</style>
|