From 93ccf5dcf653f59aff69b46d4524cd125aa96768 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 7 Feb 2022 23:42:52 +0530 Subject: [PATCH] feat: implement export single collection --- .../components/collections/my/Collection.vue | 23 +++- .../components/collections/my/Folder.vue | 21 ++- .../collections/teams/Collection.vue | 61 +++++++-- .../components/collections/teams/Folder.vue | 53 ++++++-- .../queries/GetCollectionChildrenIDs.graphql | 7 + .../gql/queries/GetCollectionTitle.graphql | 5 + .../hoppscotch-app/helpers/backend/helpers.ts | 127 ++++++++++++++++++ packages/hoppscotch-app/locales/en.json | 1 + 8 files changed, 269 insertions(+), 29 deletions(-) create mode 100644 packages/hoppscotch-app/helpers/backend/gql/queries/GetCollectionChildrenIDs.graphql create mode 100644 packages/hoppscotch-app/helpers/backend/gql/queries/GetCollectionTitle.graphql create mode 100644 packages/hoppscotch-app/helpers/backend/helpers.ts diff --git a/packages/hoppscotch-app/components/collections/my/Collection.vue b/packages/hoppscotch-app/components/collections/my/Collection.vue index da936ccef..57c5c8ffa 100644 --- a/packages/hoppscotch-app/components/collections/my/Collection.vue +++ b/packages/hoppscotch-app/components/collections/my/Collection.vue @@ -126,11 +126,11 @@ { + document.body.removeChild(a) + URL.revokeObjectURL(url) + }, 1000) + }, toggleShowChildren() { if (this.$props.saveRequest) this.$emit("select", { @@ -284,7 +301,7 @@ export default defineComponent({ collectionID: this.collection.id, }) }, - dropEvent({ dataTransfer }) { + dropEvent({ dataTransfer }: any) { this.dragging = !this.dragging const folderPath = dataTransfer.getData("folderPath") const requestIndex = dataTransfer.getData("requestIndex") diff --git a/packages/hoppscotch-app/components/collections/my/Folder.vue b/packages/hoppscotch-app/components/collections/my/Folder.vue index c82d00f24..049b040a2 100644 --- a/packages/hoppscotch-app/components/collections/my/Folder.vue +++ b/packages/hoppscotch-app/components/collections/my/Folder.vue @@ -106,11 +106,11 @@ { + document.body.removeChild(a) + URL.revokeObjectURL(url) + }, 1000) + }, toggleShowChildren() { if (this.$props.saveRequest) this.$emit("select", { diff --git a/packages/hoppscotch-app/components/collections/teams/Collection.vue b/packages/hoppscotch-app/components/collections/teams/Collection.vue index a3c65b121..a1f2c75e8 100644 --- a/packages/hoppscotch-app/components/collections/teams/Collection.vue +++ b/packages/hoppscotch-app/components/collections/teams/Collection.vue @@ -127,18 +127,10 @@ @@ -230,6 +222,10 @@