feat: svg icons

This commit is contained in:
liyasthomas
2021-08-28 05:47:33 +05:30
parent e397e3fb6f
commit 476bfbaef0
149 changed files with 476 additions and 392 deletions

View File

@@ -22,7 +22,7 @@
ref="downloadResponse"
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.download_file')"
:icon="downloadIcon"
:svg="downloadIcon"
@click.native="downloadResponse"
/>
<ButtonSecondary
@@ -30,7 +30,7 @@
ref="copyResponse"
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.copy')"
:icon="copyIcon"
:svg="copyIcon"
@click.native="copyResponse"
/>
</div>
@@ -66,8 +66,8 @@ export default defineComponent({
},
data() {
return {
downloadIcon: "save_alt",
copyIcon: "content_copy",
downloadIcon: "download",
copyIcon: "copy",
}
},
computed: {
@@ -100,23 +100,23 @@ export default defineComponent({
a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}`
document.body.appendChild(a)
a.click()
this.downloadIcon = "done"
this.downloadIcon = "check"
this.$toast.success(this.$t("state.download_started"), {
icon: "downloading",
})
setTimeout(() => {
document.body.removeChild(a)
URL.revokeObjectURL(url)
this.downloadIcon = "save_alt"
this.downloadIcon = "download"
}, 1000)
},
copyResponse() {
copyToClipboard(this.responseBodyText)
this.copyIcon = "done"
this.copyIcon = "check"
this.$toast.success(this.$t("state.copied_to_clipboard"), {
icon: "content_paste",
})
setTimeout(() => (this.copyIcon = "content_copy"), 1000)
setTimeout(() => (this.copyIcon = "copy"), 1000)
},
},
})