refactor: remove icons from toast

This commit is contained in:
liyasthomas
2021-11-19 21:13:58 +05:30
parent cad8f3e856
commit 26429466e9
58 changed files with 156 additions and 425 deletions

View File

@@ -230,15 +230,11 @@ export default defineComponent({
}
)
.then((res) => {
this.$toast.success(this.$t("export.gist_created"), {
icon: "done",
})
this.$toast.success(this.$t("export.gist_created"))
window.open(res.html_url)
})
.catch((e) => {
this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error_outline",
})
this.$toast.error(this.$t("error.something_went_wrong"))
console.error(e)
})
},
@@ -251,13 +247,9 @@ export default defineComponent({
this.collectionJSON = target.result
}
reader.readAsText(file)
this.$toast.success(this.$t("state.file_imported"), {
icon: "attach_file",
})
this.$toast.success(this.$t("state.file_imported"))
} else {
this.$toast.error(this.$t("action.choose_file"), {
icon: "attach_file",
})
this.$toast.error(this.$t("action.choose_file"))
}
this.$refs.collectionUpload.value = ""
},
@@ -288,9 +280,7 @@ export default defineComponent({
this.items = JSON.parse(this.collectionJSON)
this.assignIDs(this.items, "", "#")
this.$toast.clear()
this.$toast.success(this.$t("state.docs_generated"), {
icon: "book",
})
this.$toast.success(this.$t("state.docs_generated"))
const docsMarkdown = Mustache.render(
DocsTemplate,
{
@@ -325,9 +315,7 @@ export default defineComponent({
this.docsMarkdown = docsMarkdown.replace(/^\s*[\r\n]/gm, "\n\n")
} catch (e) {
console.error(e)
this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error_outline",
})
this.$toast.error(this.$t("error.something_went_wrong"))
}
},

View File

@@ -238,9 +238,7 @@ export default defineComponent({
TE.matchW(
() => {
this.loading = false
this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error_outline",
})
this.$toast.error(`${this.$t("error.something_went_wrong")}`)
},
() => {
this.joinTeamSuccess = true

View File

@@ -99,7 +99,7 @@
required
/>
<ButtonPrimary
:label="$t('action.save').toString()"
:label="$t('action.save')"
class="ml-2 min-w-16"
type="submit"
:loading="updatingDisplayName"

View File

@@ -328,9 +328,7 @@ export default defineComponent({
resetProxy() {
applySetting("PROXY_URL", `https://proxy.hoppscotch.io/`)
this.clearIcon = "check"
this.$toast.success(`${this.$t("state.cleared")}`, {
icon: "clear_all",
})
this.$toast.success(`${this.$t("state.cleared")}`)
setTimeout(() => (this.clearIcon = "rotate-ccw"), 1000)
},
getColorModeName(colorMode: string) {