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

@@ -89,9 +89,7 @@ const copyIcon = ref("copy")
const copyHeaders = () => {
copyToClipboard(JSON.stringify(props.headers))
copyIcon.value = "check"
$toast.success(t("state.copied_to_clipboard").toString(), {
icon: "content_paste",
})
$toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyIcon.value = "copy"), 1000)
}
</script>

View File

@@ -127,9 +127,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
$toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
$toast.success(`${t("state.download_started")}`)
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)
@@ -140,9 +138,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
$toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
$toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyIcon.value = "copy"), 1000)
}

View File

@@ -103,9 +103,7 @@ export default defineComponent({
document.body.appendChild(a)
a.click()
this.downloadIcon = "check"
this.$toast.success(this.$t("state.download_started"), {
icon: "downloading",
})
this.$toast.success(this.$t("state.download_started"))
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)

View File

@@ -234,9 +234,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
$toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
$toast.success(`${t("state.download_started")}`)
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)
@@ -256,9 +254,7 @@ const outlinePath = computed(() => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
$toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
$toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyIcon.value = "copy"), 1000)
}
</script>

View File

@@ -117,9 +117,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
$toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
$toast.success(`${t("state.download_started")}`)
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)
@@ -130,9 +128,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
$toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
$toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyIcon.value = "copy"), 1000)
}
</script>

View File

@@ -117,9 +117,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
$toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
$toast.success(`${t("state.download_started")}`)
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)
@@ -130,9 +128,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
$toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
$toast.success(`${t("state.copied_to_clipboard")}`)
setTimeout(() => (copyIcon.value = "copy"), 1000)
}
</script>