🐛 Fixed issues with sync, squashed a bug introduced in last transpile

This commit is contained in:
Liyas Thomas
2020-06-15 15:03:31 +05:30
parent 5249e4730d
commit 5cdc30b822
8 changed files with 61 additions and 14 deletions

View File

@@ -84,8 +84,8 @@ export default {
this.syncEnvironments()
},
hideModal() {
this.$data.name = undefined
this.$emit("hide-modal")
this.$data.name = undefined
},
},
}

View File

@@ -135,7 +135,7 @@ export default {
}
},
watch: {
editingEnvironment: function(update) {
editingEnvironment: function (update) {
this.name =
this.$props.editingEnvironment && this.$props.editingEnvironment.name
? this.$props.editingEnvironment.name
@@ -210,8 +210,8 @@ export default {
this.syncEnvironments()
},
hideModal() {
this.$data.name = undefined
this.$emit("hide-modal")
this.$data.name = undefined
},
},
}

View File

@@ -168,10 +168,18 @@ export default {
this.$store.commit("postwoman/replaceEnvironments", fb.currentEnvironments)
this.fileImported()
},
syncToFBEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}
}
},
fileImported() {
this.$toast.info(this.$t("file_imported"), {
icon: "folder_shared",
})
this.syncToFBEnvironments()
},
},
}