Merge branch 'master' of https://github.com/liyasthomas/postwoman
This commit is contained in:
21
package-lock.json
generated
21
package-lock.json
generated
@@ -1636,9 +1636,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": {
|
"@babel/parser": {
|
||||||
"version": "7.10.1",
|
"version": "7.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz",
|
||||||
"integrity": "sha512-AUTksaz3FqugBkbTZ1i+lDLG5qy8hIzCaAxEtttU6C0BtZZU9pkNZtWSVAht4EW9kl46YBiyTGMp9xTTGqViNg=="
|
"integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -9693,18 +9693,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nuxt-i18n": {
|
"nuxt-i18n": {
|
||||||
"version": "6.12.1",
|
"version": "6.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.12.2.tgz",
|
||||||
"integrity": "sha512-IkdYTnwREM+cuds2w3bqTnCB52wK2Sbs4VwXQgRyXzLpHGUn0TN9vuQ4OhQzw3VP+xWNNPke+bzMkjIKw8YlNQ==",
|
"integrity": "sha512-XECHvyEGrHd4AnVFogE3XmaiOzn8j7VDssLjmMWUjZ4RbzB6pecNsxCwcUR7WGPvjXDONKAROS/zQDQL3g5Q7Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/parser": "^7.5.5",
|
"@babel/parser": "^7.5.5",
|
||||||
"@babel/traverse": "^7.5.5",
|
"@babel/traverse": "^7.5.5",
|
||||||
"@intlify/vue-i18n-extensions": "^1.0.1",
|
"@intlify/vue-i18n-extensions": "^1.0.1",
|
||||||
"@intlify/vue-i18n-loader": "^1.0.0",
|
"@intlify/vue-i18n-loader": "^1.0.0",
|
||||||
"cookie": "^0.4.0",
|
"cookie": "^0.4.0",
|
||||||
"is-https": "^1.0.0",
|
"is-https": "^2.0.0",
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
"vue-i18n": "^8.18.1"
|
"vue-i18n": "^8.18.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"is-https": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-https/-/is-https-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-UfUCKVQH/6PQRCh5Qk9vNu4feLZiFmV/gr8DjbtJD0IrCRIDTA6E+d/AVFGPulI5tqK5W45fYbn1Nir1O99rFw=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth-sign": {
|
"oauth-sign": {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
"graphql": "^14.6.0",
|
"graphql": "^14.6.0",
|
||||||
"graphql-language-service-interface": "^2.3.3",
|
"graphql-language-service-interface": "^2.3.3",
|
||||||
"nuxt": "^2.12.2",
|
"nuxt": "^2.12.2",
|
||||||
"nuxt-i18n": "^6.12.1",
|
"nuxt-i18n": "^6.12.2",
|
||||||
"paho-mqtt": "^1.1.0",
|
"paho-mqtt": "^1.1.0",
|
||||||
"socket.io-client": "^2.3.0",
|
"socket.io-client": "^2.3.0",
|
||||||
"socketio-wildcard": "^2.0.0",
|
"socketio-wildcard": "^2.0.0",
|
||||||
|
|||||||
@@ -118,8 +118,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="downloadResponse"
|
@click="downloadSchema"
|
||||||
ref="downloadResponse"
|
ref="downloadSchema"
|
||||||
v-tooltip="$t('download_file')"
|
v-tooltip="$t('download_file')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">get_app</i>
|
<i class="material-icons">get_app</i>
|
||||||
@@ -221,6 +221,14 @@
|
|||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label for="responseField">{{ $t("response") }}</label>
|
<label for="responseField">{{ $t("response") }}</label>
|
||||||
<div>
|
<div>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="downloadResponse"
|
||||||
|
ref="downloadResponse"
|
||||||
|
v-tooltip="$t('download_file')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">get_app</i>
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="copyResponse"
|
@click="copyResponse"
|
||||||
@@ -667,12 +675,12 @@ export default {
|
|||||||
this.responseBodyMaxLines = this.responseBodyMaxLines == Infinity ? 16 : Infinity
|
this.responseBodyMaxLines = this.responseBodyMaxLines == Infinity ? 16 : Infinity
|
||||||
},
|
},
|
||||||
downloadResponse() {
|
downloadResponse() {
|
||||||
const dataToWrite = JSON.stringify(this.schema, null, 2)
|
const dataToWrite = this.response
|
||||||
const file = new Blob([dataToWrite], { type: "application/json" })
|
const file = new Blob([dataToWrite], { type: "application/json" })
|
||||||
const a = document.createElement("a")
|
const a = document.createElement("a")
|
||||||
const url = URL.createObjectURL(file)
|
const url = URL.createObjectURL(file)
|
||||||
a.href = url
|
a.href = url
|
||||||
a.download = `${this.url} on ${Date()}.graphql`.replace(/\./g, "[dot]")
|
a.download = `Response ${this.url} on ${Date()}.json`.replace(/\./g, "[dot]")
|
||||||
document.body.appendChild(a)
|
document.body.appendChild(a)
|
||||||
a.click()
|
a.click()
|
||||||
this.$refs.downloadResponse.innerHTML = this.doneButton
|
this.$refs.downloadResponse.innerHTML = this.doneButton
|
||||||
@@ -685,6 +693,25 @@ export default {
|
|||||||
this.$refs.downloadResponse.innerHTML = this.downloadButton
|
this.$refs.downloadResponse.innerHTML = this.downloadButton
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
|
downloadSchema() {
|
||||||
|
const dataToWrite = JSON.stringify(this.schema, null, 2)
|
||||||
|
const file = new Blob([dataToWrite], { type: "application/json" })
|
||||||
|
const a = document.createElement("a")
|
||||||
|
const url = URL.createObjectURL(file)
|
||||||
|
a.href = url
|
||||||
|
a.download = `${this.url} on ${Date()}.graphql`.replace(/\./g, "[dot]")
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
this.$refs.downloadSchema.innerHTML = this.doneButton
|
||||||
|
this.$toast.success(this.$t("download_started"), {
|
||||||
|
icon: "done",
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
document.body.removeChild(a)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
this.$refs.downloadSchema.innerHTML = this.downloadButton
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
addRequestHeader(index) {
|
addRequestHeader(index) {
|
||||||
this.$store.commit("addGQLHeader", {
|
this.$store.commit("addGQLHeader", {
|
||||||
key: "",
|
key: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user