Actions for image lens

This commit is contained in:
Liyas Thomas
2020-06-23 08:27:41 +05:30
parent d12c09aca0
commit d9ac947fe1
3 changed files with 55 additions and 12 deletions

View File

@@ -33,7 +33,7 @@
class="icon"
@click="downloadResponse"
ref="downloadResponse"
v-if="response.body && canDownloadResponse"
v-if="response.body"
v-tooltip="$t('download_file')"
>
<i class="material-icons">save_alt</i>
@@ -126,14 +126,6 @@ export default {
this.$refs.downloadResponse.innerHTML = this.downloadButton
}, 1000)
},
canDownloadResponse() {
return (
this.response &&
this.response.headers &&
this.response.headers["content-type"] &&
isJSONContentType(this.response.headers["content-type"])
)
},
copyResponse() {
this.$refs.copyResponse.innerHTML = this.doneButton
this.$toast.success(this.$t("copied_to_clipboard"), {