refactor: better toast messages + minor ui improvements
This commit is contained in:
@@ -41,7 +41,9 @@ export default Vue.extend({
|
||||
methods: {
|
||||
addNewCollection() {
|
||||
if (!this.name) {
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString())
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString(), {
|
||||
icon: "info",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ export default Vue.extend({
|
||||
methods: {
|
||||
saveCollection() {
|
||||
if (!this.name) {
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString())
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString(), {
|
||||
icon: "info",
|
||||
})
|
||||
return
|
||||
}
|
||||
const collectionUpdated = {
|
||||
|
||||
@@ -47,7 +47,9 @@ export default Vue.extend({
|
||||
methods: {
|
||||
editFolder() {
|
||||
if (!this.name) {
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString())
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString(), {
|
||||
icon: "info",
|
||||
})
|
||||
return
|
||||
}
|
||||
editGraphqlFolder(this.folderPath, { ...this.folder, name: this.name })
|
||||
|
||||
@@ -46,7 +46,9 @@ export default Vue.extend({
|
||||
methods: {
|
||||
saveRequest() {
|
||||
if (!this.requestUpdateData.name) {
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString())
|
||||
this.$toast.info(this.$t("collection.invalid_name").toString(), {
|
||||
icon: "info",
|
||||
})
|
||||
return
|
||||
}
|
||||
const requestUpdated = {
|
||||
|
||||
@@ -138,11 +138,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() {
|
||||
@@ -159,9 +159,9 @@ export default {
|
||||
setGraphqlCollections(collections)
|
||||
this.fileImported()
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch((e) => {
|
||||
this.failedImport()
|
||||
console.log(error)
|
||||
console.error(e)
|
||||
})
|
||||
},
|
||||
hideModal() {
|
||||
|
||||
@@ -133,12 +133,7 @@ export default Vue.extend({
|
||||
selectRequest() {
|
||||
if (this.savingMode) {
|
||||
this.pick()
|
||||
return
|
||||
}
|
||||
|
||||
this.$store.commit("postwoman/selectGraphqlRequest", {
|
||||
request: this.request,
|
||||
})
|
||||
},
|
||||
dragStart({ dataTransfer }: any) {
|
||||
this.dragging = !this.dragging
|
||||
|
||||
Reference in New Issue
Block a user