From 2f91d25ed4f61382c648140eddf6b8f3f7dfa0c9 Mon Sep 17 00:00:00 2001 From: Chun-Hao Lien Date: Wed, 20 Oct 2021 14:36:01 +0800 Subject: [PATCH] chore: add json file extension (#1889) --- packages/hoppscotch-app/components/collections/ImportExport.vue | 2 +- .../components/collections/graphql/ImportExport.vue | 2 +- .../hoppscotch-app/components/environments/ImportExport.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue index 7a686d040..e12fe5947 100644 --- a/packages/hoppscotch-app/components/collections/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/ImportExport.vue @@ -412,7 +412,7 @@ export default defineComponent({ const url = URL.createObjectURL(file) a.href = url // 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) a.click() this.$toast.success(this.$t("state.download_started"), { diff --git a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue index 925850000..cab3d4b87 100644 --- a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue @@ -249,7 +249,7 @@ export default defineComponent({ const url = URL.createObjectURL(file) a.href = url // 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) a.click() this.$toast.success(this.$t("state.download_started"), { diff --git a/packages/hoppscotch-app/components/environments/ImportExport.vue b/packages/hoppscotch-app/components/environments/ImportExport.vue index 994fedc16..c607e7ab5 100644 --- a/packages/hoppscotch-app/components/environments/ImportExport.vue +++ b/packages/hoppscotch-app/components/environments/ImportExport.vue @@ -227,7 +227,7 @@ export default defineComponent({ const url = URL.createObjectURL(file) a.href = url // 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) a.click() this.$toast.success(this.$t("state.download_started"), {