diff --git a/client/components/Reader/SettingsPage/SettingsPage.vue b/client/components/Reader/SettingsPage/SettingsPage.vue
index e4bbaee6..f2e1ccec 100644
--- a/client/components/Reader/SettingsPage/SettingsPage.vue
+++ b/client/components/Reader/SettingsPage/SettingsPage.vue
@@ -9,7 +9,8 @@
-
-
-
-
-
-
-
-
-
+
+
+
+ {{ item.label }}
+
+
@@ -108,30 +106,6 @@ const componentOptions = {
},
deep: true,
},
- fontBold: function(newValue) {
- this.fontWeight = (newValue ? 'bold' : '');
- },
- fontItalic: function(newValue) {
- this.fontStyle = (newValue ? 'italic' : '');
- },
- vertShift: function(newValue) {
- const font = (this.webFontName ? this.webFontName : this.fontName);
- if (this.fontShifts[font] != newValue || this.fontVertShift != newValue) {
- this.fontShifts = Object.assign({}, this.fontShifts, {[font]: newValue});
- this.fontVertShift = newValue;
- }
- },
- fontName: function(newValue) {
- const font = (this.webFontName ? this.webFontName : newValue);
- this.vertShift = this.fontShifts[font] || 0;
- },
- webFontName: function(newValue) {
- const font = (newValue ? newValue : this.fontName);
- this.vertShift = this.fontShifts[font] || 0;
- },
- textColor: function(newValue) {
- this.textColorFiltered = newValue;
- },
statusBarColor(newValue) {
this.statusBarColorFiltered = newValue;
},
@@ -146,21 +120,27 @@ class SettingsPage {
form = {};
+ tabs = [
+ { name: 'profiles', icon: 'la la-users', label: 'Профили' },
+ { name: 'view', icon: 'la la-eye', label: 'Вид'},
+ { name: 'toolbar', icon: 'la la-grip-horizontal', label: 'Панель'},
+ { name: 'keys', icon: 'la la-gamepad', label: 'Управление'},
+ { name: 'pagemove', icon: 'la la-school', label: 'Листание'},
+ { name: 'convert', icon: 'la la-magic', label: 'Конвертир.'},
+ { name: 'update', icon: 'la la-retweet', label: 'Обновление'},
+ { name: 'others', icon: 'la la-list-ul', label: 'Прочее'},
+ { name: 'reset', icon: 'la la-broom', label: 'Сброс'},
+ ];
selectedTab = 'profiles';
isSetsChanged = false;
- fontBold = false;
- fontItalic = false;
- vertShift = 0;
statusBarColorFiltered = '';
- webFonts = [];
- fonts = [];
created() {
this.commit = this.$store.commit;
- this.debouncedCommitSettings = _.debounce(() => {
+ this.debouncedCommitSettings = _.debounce(() => {
this.commit('reader/setSettings', _.cloneDeep(this.form));
}, 50);
@@ -181,14 +161,6 @@ class SettingsPage {
this.form = reactive(_.cloneDeep(this.settings));
const form = this.form;
- this.fontBold = (form.fontWeight == 'bold');
- this.fontItalic = (form.fontStyle == 'italic');
-
- this.fonts = rstore.fonts;
- this.webFonts = rstore.webFonts;
- const font = (form.webFontName ? form.webFontName : form.fontName);
- this.vertShift = form.fontShifts[font] || 0;
- this.dualDivColorFiltered = form.dualDivColor;
this.statusBarColorFiltered = form.statusBarColor;
} finally {
await this.$nextTick();
@@ -200,30 +172,10 @@ class SettingsPage {
return this.$store.state.reader.settings;
}
- get fontsOptions() {
- let result = [];
- this.fonts.forEach(font => {
- result.push({label: (font.label ? font.label : font.name), value: font.name});
- });
- return result;
- }
-
- get webFontsOptions() {
- let result = [{label: 'Нет', value: ''}];
- this.webFonts.forEach(font => {
- result.push({label: font.name, value: font.name});
- });
- return result;
- }
-
needReload() {
this.$root.notify.warning('Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
}
- needTextReload() {
- this.$root.notify.warning('Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект');
- }
-
close() {
this.$emit('do-action', {action: 'settings'});
}
diff --git a/client/components/Reader/SettingsPage/ViewTab/Color.inc b/client/components/Reader/SettingsPage/ViewTab/Color.inc
deleted file mode 100644
index c438cc73..00000000
--- a/client/components/Reader/SettingsPage/ViewTab/Color.inc
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Обои
-
-
-
-
-
- {{ scope.opt.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Добавить файл обоев
-
-
-
-
- Удалить выбранные обои
-
-
-
-
- Скачать выбранные обои
-
-
-
-
-
-
-
-
-
diff --git a/client/components/Reader/SettingsPage/ViewTab/Color/Color.vue b/client/components/Reader/SettingsPage/ViewTab/Color/Color.vue
index 7113addd..568a794b 100644
--- a/client/components/Reader/SettingsPage/ViewTab/Color/Color.vue
+++ b/client/components/Reader/SettingsPage/ViewTab/Color/Color.vue
@@ -145,8 +145,11 @@ const componentOptions = {
components: {
},
watch: {
- form() {
- this.formChanged();//no await
+ form: {
+ handler() {
+ this.formChanged();//no await
+ },
+ deep: true,
},
textColorFiltered(newValue) {
if (!this.isFormChanged && this.helper.isHexColor(newValue))
diff --git a/client/components/Reader/SettingsPage/ViewTab/Font.inc b/client/components/Reader/SettingsPage/ViewTab/Font.inc
deleted file mode 100644
index 1059a830..00000000
--- a/client/components/Reader/SettingsPage/ViewTab/Font.inc
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
Локальный/веб
-
-
-
-
-
-
- Веб шрифты дают большое разнообразие,
- однако есть шанс, что шрифт будет загружаться
- очень медленно или вовсе не загрузится
-
-
-
-
-
-
-
-
-
Сдвиг
-
-
-
- Сдвиг шрифта по вертикали в процентах от размера.
- Отрицательное значение сдвигает вверх, положительное -
- вниз. Значение зависит от метрики шрифта.
-
-
-
-
-
-
diff --git a/client/components/Reader/SettingsPage/ViewTab/Font/Font.vue b/client/components/Reader/SettingsPage/ViewTab/Font/Font.vue
new file mode 100644
index 00000000..76f1dadc
--- /dev/null
+++ b/client/components/Reader/SettingsPage/ViewTab/Font/Font.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+ Локальный/веб
+
+
+
+
+
+
+
+ Веб шрифты дают большое разнообразие,
+ однако есть шанс, что шрифт будет загружаться
+ очень медленно или вовсе не загрузится
+
+
+
+
+
+
+
+
+
+ Сдвиг
+
+
+
+
+ Сдвиг шрифта по вертикали в процентах от размера.
+ Отрицательное значение сдвигает вверх, положительное -
+ вниз. Значение зависит от метрики шрифта.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/components/Reader/SettingsPage/ViewTab/Mode/Mode.vue b/client/components/Reader/SettingsPage/ViewTab/Mode/Mode.vue
index e2515390..7c61469c 100644
--- a/client/components/Reader/SettingsPage/ViewTab/Mode/Mode.vue
+++ b/client/components/Reader/SettingsPage/ViewTab/Mode/Mode.vue
@@ -162,8 +162,11 @@ const componentOptions = {
NumInput
},
watch: {
- form() {
- this.formChanged();//no await
+ form: {
+ handler() {
+ this.formChanged();//no await
+ },
+ deep: true,
},
dualDivColorFiltered(newValue) {
if (!this.isFormChanged && this.helper.isHexColor(newValue))
diff --git a/client/components/Reader/SettingsPage/ViewTab/ViewTab.vue b/client/components/Reader/SettingsPage/ViewTab/ViewTab.vue
index c817da9f..80ddffb2 100644
--- a/client/components/Reader/SettingsPage/ViewTab/ViewTab.vue
+++ b/client/components/Reader/SettingsPage/ViewTab/ViewTab.vue
@@ -21,14 +21,7 @@
-
-
-
-
+