Мелкий рефакторинг
This commit is contained in:
@@ -205,9 +205,9 @@ class Reader extends Vue {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
(async() => {
|
(async() => {
|
||||||
this.$refs.serverStorage.init();
|
|
||||||
await bookManager.init(this.settings);
|
await bookManager.init(this.settings);
|
||||||
await restoreOldSettings(this.settings, bookManager, this.commit);
|
await restoreOldSettings(this.settings, bookManager, this.commit);
|
||||||
|
await this.$refs.serverStorage.init();
|
||||||
|
|
||||||
if (this.$root.rootRoute == '/reader') {
|
if (this.$root.rootRoute == '/reader') {
|
||||||
if (this.routeParamUrl) {
|
if (this.routeParamUrl) {
|
||||||
|
|||||||
@@ -90,10 +90,9 @@ class ServerStorage extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async saveProfiles() {
|
async saveProfiles() {
|
||||||
if (!this.currentProfile)
|
if (!this.currentProfile || this.savingProfiles)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this.savingProfiles) {
|
|
||||||
this.savingProfiles = true;
|
this.savingProfiles = true;
|
||||||
|
|
||||||
const diff = utils.getObjDiff(this.oldProfiles, this.profiles);
|
const diff = utils.getObjDiff(this.oldProfiles, this.profiles);
|
||||||
@@ -120,7 +119,6 @@ class ServerStorage extends Vue {
|
|||||||
|
|
||||||
this.savingProfiles = false;
|
this.savingProfiles = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
generateNewServerStorageKey() {
|
generateNewServerStorageKey() {
|
||||||
const key = utils.toBase58(utils.randomArray(32));
|
const key = utils.toBase58(utils.randomArray(32));
|
||||||
|
|||||||
Reference in New Issue
Block a user