Глобальный рефакторинг SettingsPage (закончено)

This commit is contained in:
Book Pauk
2022-10-13 21:12:56 +07:00
parent e8d1817566
commit 9160b4ef90
9 changed files with 375 additions and 221 deletions

View File

@@ -106,13 +106,6 @@ const componentOptions = {
},
deep: true,
},
statusBarColor(newValue) {
this.statusBarColorFiltered = newValue;
},
statusBarColorFiltered(newValue) {
if (hex.test(newValue))
this.statusBarColor = newValue;
},
},
};
class SettingsPage {
@@ -135,8 +128,6 @@ class SettingsPage {
isSetsChanged = false;
statusBarColorFiltered = '';
created() {
this.commit = this.$store.commit;
@@ -159,9 +150,6 @@ class SettingsPage {
this.isSetsChanged = true;
try {
this.form = reactive(_.cloneDeep(this.settings));
const form = this.form;
this.statusBarColorFiltered = form.statusBarColor;
} finally {
await this.$nextTick();
this.isSetsChanged = false;
@@ -172,10 +160,6 @@ class SettingsPage {
return this.$store.state.reader.settings;
}
needReload() {
this.$root.notify.warning('Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
}
close() {
this.$emit('do-action', {action: 'settings'});
}