|
@@ -39,11 +39,11 @@
|
|
|
|
|
|
<div class="col fit">
|
|
<div class="col fit">
|
|
<!-- Профили --------------------------------------------------------------------->
|
|
<!-- Профили --------------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'profiles'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'profiles'" class="fit tab-panel">
|
|
@@include('./ProfilesTab.inc');
|
|
@@include('./ProfilesTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Вид ------------------------------------------------------------------------->
|
|
<!-- Вид ------------------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'view'" class="fit column">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'view'" class="fit column">
|
|
<q-tabs
|
|
<q-tabs
|
|
v-model="selectedViewTab"
|
|
v-model="selectedViewTab"
|
|
active-color="black"
|
|
active-color="black"
|
|
@@ -83,35 +83,35 @@
|
|
@@include('./ViewTab/Status.inc');
|
|
@@include('./ViewTab/Status.inc');
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Кнопки ---------------------------------------------------------------------->
|
|
<!-- Кнопки ---------------------------------------------------------------------->
|
|
<div v-if="selectedTab == 'toolbar'" class="fit tab-panel">
|
|
<div v-if="selectedTab == 'toolbar'" class="fit tab-panel">
|
|
- @@include('./ToolBarTab.inc');
|
|
|
|
|
|
+ <ToolBarTab :form="form" />
|
|
</div>
|
|
</div>
|
|
<!-- Управление ------------------------------------------------------------------>
|
|
<!-- Управление ------------------------------------------------------------------>
|
|
- <div v-if="selectedTab == 'keys'" class="fit column">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'keys'" class="fit column">
|
|
@@include('./KeysTab.inc');
|
|
@@include('./KeysTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Листание -------------------------------------------------------------------->
|
|
<!-- Листание -------------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'pagemove'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'pagemove'" class="fit tab-panel">
|
|
@@include('./PageMoveTab.inc');
|
|
@@include('./PageMoveTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Конвертирование ------------------------------------------------------------->
|
|
<!-- Конвертирование ------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'convert'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'convert'" class="fit tab-panel">
|
|
@@include('./ConvertTab.inc');
|
|
@@include('./ConvertTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Обновление ------------------------------------------------------------------>
|
|
<!-- Обновление ------------------------------------------------------------------>
|
|
- <div v-if="selectedTab == 'update'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'update'" class="fit tab-panel">
|
|
@@include('./UpdateTab.inc');
|
|
@@include('./UpdateTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Прочее ---------------------------------------------------------------------->
|
|
<!-- Прочее ---------------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'others'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'others'" class="fit tab-panel">
|
|
@@include('./OthersTab.inc');
|
|
@@include('./OthersTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
<!-- Сброс ----------------------------------------------------------------------->
|
|
<!-- Сброс ----------------------------------------------------------------------->
|
|
- <div v-if="selectedTab == 'reset'" class="fit tab-panel">
|
|
|
|
|
|
+ <!--div v-if="selectedTab == 'reset'" class="fit tab-panel">
|
|
@@include('./ResetTab.inc');
|
|
@@include('./ResetTab.inc');
|
|
- </div>
|
|
|
|
|
|
+ </div-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Window>
|
|
</Window>
|
|
@@ -119,11 +119,11 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
-import { ref, watch } from 'vue';
|
|
|
|
import vueComponent from '../../vueComponent.js';
|
|
import vueComponent from '../../vueComponent.js';
|
|
|
|
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
|
|
|
|
|
|
+//stuff
|
|
import * as utils from '../../../share/utils';
|
|
import * as utils from '../../../share/utils';
|
|
import * as cryptoUtils from '../../../share/cryptoUtils';
|
|
import * as cryptoUtils from '../../../share/cryptoUtils';
|
|
import Window from '../../share/Window.vue';
|
|
import Window from '../../share/Window.vue';
|
|
@@ -135,6 +135,9 @@ import readerApi from '../../../api/reader';
|
|
import rstore from '../../../store/modules/reader';
|
|
import rstore from '../../../store/modules/reader';
|
|
import defPalette from './defPalette';
|
|
import defPalette from './defPalette';
|
|
|
|
|
|
|
|
+//pages
|
|
|
|
+import ToolBarTab from './ToolBarTab/ToolBarTab.vue';
|
|
|
|
+
|
|
const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
|
|
const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
|
|
|
|
|
|
const componentOptions = {
|
|
const componentOptions = {
|
|
@@ -142,18 +145,21 @@ const componentOptions = {
|
|
Window,
|
|
Window,
|
|
NumInput,
|
|
NumInput,
|
|
UserHotKeys,
|
|
UserHotKeys,
|
|
- },
|
|
|
|
- data: function() {
|
|
|
|
- return Object.assign({}, rstore.settingDefaults);
|
|
|
|
|
|
+ //pages
|
|
|
|
+ ToolBarTab,
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
settings: function() {
|
|
settings: function() {
|
|
this.settingsChanged();
|
|
this.settingsChanged();
|
|
},
|
|
},
|
|
- form: function(newValue) {
|
|
|
|
- if (this.inited) {
|
|
|
|
- this.commit('reader/setSettings', _.cloneDeep(newValue));
|
|
|
|
- }
|
|
|
|
|
|
+ form: {
|
|
|
|
+ handler(newValue) {
|
|
|
|
+ if (this.inited) {
|
|
|
|
+console.log('save settings');
|
|
|
|
+ this.commit('reader/setSettings', _.cloneDeep(newValue));
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ deep: true,
|
|
},
|
|
},
|
|
fontBold: function(newValue) {
|
|
fontBold: function(newValue) {
|
|
this.fontWeight = (newValue ? 'bold' : '');
|
|
this.fontWeight = (newValue ? 'bold' : '');
|
|
@@ -217,6 +223,8 @@ const componentOptions = {
|
|
class SettingsPage {
|
|
class SettingsPage {
|
|
_options = componentOptions;
|
|
_options = componentOptions;
|
|
|
|
|
|
|
|
+ form = {};
|
|
|
|
+
|
|
selectedTab = 'profiles';
|
|
selectedTab = 'profiles';
|
|
selectedViewTab = 'mode';
|
|
selectedViewTab = 'mode';
|
|
selectedKeysTab = 'mouse';
|
|
selectedKeysTab = 'mouse';
|
|
@@ -227,34 +235,17 @@ class SettingsPage {
|
|
textColorFiltered = '';
|
|
textColorFiltered = '';
|
|
bgColorFiltered = '';
|
|
bgColorFiltered = '';
|
|
dualDivColorFiltered = '';
|
|
dualDivColorFiltered = '';
|
|
|
|
+ statusBarColorFiltered = '';
|
|
|
|
|
|
webFonts = [];
|
|
webFonts = [];
|
|
fonts = [];
|
|
fonts = [];
|
|
|
|
|
|
serverStorageKeyVisible = false;
|
|
serverStorageKeyVisible = false;
|
|
- toolButtons = [];
|
|
|
|
- rstore = {};
|
|
|
|
-
|
|
|
|
- setup() {
|
|
|
|
- const settingsProps = { form: ref({}) };
|
|
|
|
-
|
|
|
|
- for (let prop in rstore.settingDefaults) {
|
|
|
|
- settingsProps[prop] = ref(_.cloneDeep(rstore.settingDefaults[prop]));
|
|
|
|
- watch(settingsProps[prop], (newValue) => {
|
|
|
|
- settingsProps.form.value = Object.assign({}, settingsProps.form.value, {[prop]: newValue});
|
|
|
|
- }, {deep: true});
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return settingsProps;
|
|
|
|
- }
|
|
|
|
|
|
|
|
created() {
|
|
created() {
|
|
this.commit = this.$store.commit;
|
|
this.commit = this.$store.commit;
|
|
this.reader = this.$store.state.reader;
|
|
this.reader = this.$store.state.reader;
|
|
|
|
|
|
- this.form = {};
|
|
|
|
- this.rstore = rstore;
|
|
|
|
- this.toolButtons = rstore.toolButtons;
|
|
|
|
this.settingsChanged();
|
|
this.settingsChanged();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -276,22 +267,20 @@ class SettingsPage {
|
|
if (_.isEqual(this.form, this.settings))
|
|
if (_.isEqual(this.form, this.settings))
|
|
return;
|
|
return;
|
|
|
|
|
|
- this.form = Object.assign({}, this.settings);
|
|
|
|
- for (const prop in rstore.settingDefaults) {
|
|
|
|
- this[prop] = _.cloneDeep(this.form[prop]);
|
|
|
|
- }
|
|
|
|
|
|
+ this.form = _.cloneDeep(this.settings);
|
|
|
|
+ const form = this.form;
|
|
|
|
|
|
- this.fontBold = (this.fontWeight == 'bold');
|
|
|
|
- this.fontItalic = (this.fontStyle == 'italic');
|
|
|
|
|
|
+ this.fontBold = (form.fontWeight == 'bold');
|
|
|
|
+ this.fontItalic = (form.fontStyle == 'italic');
|
|
|
|
|
|
this.fonts = rstore.fonts;
|
|
this.fonts = rstore.fonts;
|
|
this.webFonts = rstore.webFonts;
|
|
this.webFonts = rstore.webFonts;
|
|
- const font = (this.webFontName ? this.webFontName : this.fontName);
|
|
|
|
- this.vertShift = this.fontShifts[font] || 0;
|
|
|
|
- this.textColorFiltered = this.textColor;
|
|
|
|
- this.bgColorFiltered = this.backgroundColor;
|
|
|
|
- this.dualDivColorFiltered = this.dualDivColor;
|
|
|
|
- this.statusBarColorFiltered = this.statusBarColor;
|
|
|
|
|
|
+ const font = (form.webFontName ? form.webFontName : form.fontName);
|
|
|
|
+ this.vertShift = form.fontShifts[font] || 0;
|
|
|
|
+ this.textColorFiltered = form.textColor;
|
|
|
|
+ this.bgColorFiltered = form.backgroundColor;
|
|
|
|
+ this.dualDivColorFiltered = form.dualDivColor;
|
|
|
|
+ this.statusBarColorFiltered = form.statusBarColor;
|
|
}
|
|
}
|
|
|
|
|
|
get mode() {
|
|
get mode() {
|
|
@@ -730,20 +719,6 @@ export default vueComponent(SettingsPage);
|
|
padding: 0 10px 15px 10px;
|
|
padding: 0 10px 15px 10px;
|
|
}
|
|
}
|
|
|
|
|
|
-.part-header {
|
|
|
|
- border-top: 2px solid #bbbbbb;
|
|
|
|
- font-weight: bold;
|
|
|
|
- font-size: 110%;
|
|
|
|
- margin-top: 15px;
|
|
|
|
- margin-bottom: 5px;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.item {
|
|
|
|
- width: 100%;
|
|
|
|
- margin-top: 5px;
|
|
|
|
- margin-bottom: 5px;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
.label-1, .label-3, .label-7 {
|
|
.label-1, .label-3, .label-7 {
|
|
width: 75px;
|
|
width: 75px;
|
|
}
|
|
}
|
|
@@ -756,15 +731,6 @@ export default vueComponent(SettingsPage);
|
|
width: 100px;
|
|
width: 100px;
|
|
}
|
|
}
|
|
|
|
|
|
-.label-1, .label-2, .label-3, .label-4, .label-5, .label-6, .label-7 {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- justify-content: center;
|
|
|
|
- text-align: right;
|
|
|
|
- margin-right: 10px;
|
|
|
|
- overflow: hidden;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
.text {
|
|
.text {
|
|
font-size: 90%;
|
|
font-size: 90%;
|
|
line-height: 130%;
|
|
line-height: 130%;
|
|
@@ -795,3 +761,29 @@ export default vueComponent(SettingsPage);
|
|
width: 150px;
|
|
width: 150px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
+
|
|
|
|
+<style>
|
|
|
|
+.sets-part-header {
|
|
|
|
+ border-top: 2px solid #bbbbbb;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ font-size: 110%;
|
|
|
|
+ margin-top: 15px;
|
|
|
|
+ margin-bottom: 5px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.sets-label {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ text-align: right;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.sets-item {
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+ margin-bottom: 5px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</style>
|