浏览代码

chore: add json file extension (#1889)

Chun-Hao Lien 4 年之前
父节点
当前提交
2f91d25ed4

+ 1 - 1
packages/hoppscotch-app/components/collections/ImportExport.vue

@@ -412,7 +412,7 @@ export default defineComponent({
       const url = URL.createObjectURL(file)
       const url = URL.createObjectURL(file)
       a.href = url
       a.href = url
       // TODO get uri from meta
       // TODO get uri from meta
-      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}`
+      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json`
       document.body.appendChild(a)
       document.body.appendChild(a)
       a.click()
       a.click()
       this.$toast.success(this.$t("state.download_started"), {
       this.$toast.success(this.$t("state.download_started"), {

+ 1 - 1
packages/hoppscotch-app/components/collections/graphql/ImportExport.vue

@@ -249,7 +249,7 @@ export default defineComponent({
       const url = URL.createObjectURL(file)
       const url = URL.createObjectURL(file)
       a.href = url
       a.href = url
       // TODO get uri from meta
       // TODO get uri from meta
-      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}`
+      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json`
       document.body.appendChild(a)
       document.body.appendChild(a)
       a.click()
       a.click()
       this.$toast.success(this.$t("state.download_started"), {
       this.$toast.success(this.$t("state.download_started"), {

+ 1 - 1
packages/hoppscotch-app/components/environments/ImportExport.vue

@@ -227,7 +227,7 @@ export default defineComponent({
       const url = URL.createObjectURL(file)
       const url = URL.createObjectURL(file)
       a.href = url
       a.href = url
       // TODO get uri from meta
       // TODO get uri from meta
-      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}`
+      a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}.json`
       document.body.appendChild(a)
       document.body.appendChild(a)
       a.click()
       a.click()
       this.$toast.success(this.$t("state.download_started"), {
       this.$toast.success(this.$t("state.download_started"), {