refactor: better toast messages + minor ui improvements

This commit is contained in:
liyasthomas
2021-08-11 16:57:40 +05:30
parent 829e116e04
commit 0738ad1c15
52 changed files with 300 additions and 275 deletions

View File

@@ -219,11 +219,11 @@ export default {
})
window.open(res.html_url)
})
.catch((error) => {
this.$toast.error(this.$t("something_went_wrong"), {
.catch((e) => {
this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
console.log(error)
console.error(e)
})
},
async readCollectionGist() {
@@ -240,9 +240,9 @@ export default {
setRESTCollections(collections)
this.fileImported()
})
.catch((error) => {
.catch((e) => {
this.failedImport()
console.log(error)
console.error(e)
})
},
hideModal() {
@@ -292,8 +292,8 @@ export default {
this.failedImport()
}
})
.catch((error) => {
console.log(error)
.catch((e) => {
console.error(e)
this.failedImport()
})
} else {
@@ -346,8 +346,8 @@ export default {
this.failedImport()
}
})
.catch((error) => {
console.log(error)
.catch((e) => {
console.error(e)
this.failedImport()
})
} else {
@@ -373,8 +373,8 @@ export default {
this.failedImport()
}
})
.catch((error) => {
console.log(error)
.catch((e) => {
console.error(e)
this.failedImport()
})
},
@@ -409,7 +409,7 @@ export default {
}, 1000)
},
fileImported() {
this.$toast.info(this.$t("file_imported"), {
this.$toast.success(this.$t("file_imported"), {
icon: "folder_shared",
})
},