Работа над профилями и ключом доступа

This commit is contained in:
Book Pauk
2019-03-15 19:11:27 +07:00
parent 2ff94c1458
commit d229aab8c9
2 changed files with 104 additions and 4 deletions

View File

@@ -53,6 +53,10 @@ class ServerStorage extends Vue {
return this.$store.state.reader.profilesRev;
}
get currentProfile() {
return this.$store.state.reader.currentProfile;
}
notifySuccessIfNeeded(rev1, rev2) {
if (rev1 != rev2)
this.$notify.success({message: 'Данные синхронизированы с сервером'});
@@ -67,6 +71,9 @@ class ServerStorage extends Vue {
}
async loadProfiles() {
if (!this.currentProfile)
return;
let prof = await this.storageGet({'profiles': {}});
if (prof.state == 'success') {
@@ -83,6 +90,9 @@ class ServerStorage extends Vue {
}
async saveProfiles() {
if (!this.currentProfile)
return;
if (!this.savingProfiles) {
this.savingProfiles = true;