Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: import collections from file - removed store commit
liyasthomas5f0f7693bbec
diff --git a/components/collections/ImportExport.vue b/components/collections/ImportExport.vueindex e5f2ced8a..13ebd1e71 100644--- a/components/collections/ImportExport.vue+++ b/components/collections/ImportExport.vue@@ -2,7 +2,7 @@<SmartModal v-if="show" @close="hideModal"><div slot="header"><div class="row-wrapper">- <h3 class="title">Export</h3>+ <h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3><div><buttonv-if="mode != 'import_export'"@@ -177,7 +177,6 @@<script>import { fb } from "~/helpers/fb"-import { getSettingSubject } from "~/newstore/settings"import * as teamUtils from "~/helpers/teams/utils"import {restCollections$,@@ -201,7 +200,6 @@ export default {},subscriptions() {return {- SYNC_COLLECTIONS: getSettingSubject("syncCollections"),myCollections: restCollections$,}},diff --git a/components/collections/graphql/ImportExport.vue b/components/collections/graphql/ImportExport.vueindex 52363c318..44a726c88 100644--- a/components/collections/graphql/ImportExport.vue+++ b/components/collections/graphql/ImportExport.vue@@ -54,22 +54,6 @@</div><div slot="body" class="flex flex-col"><div class="flex flex-col items-start p-2">- <span- v-tooltip="{- content: !fb.currentUser- ? $t('login_first')- : $t('replace_current'),- }"- >- <button- :disabled="!fb.currentUser"- class="icon"- @click="syncCollections"- >- <i class="material-icons">folder_shared</i>- <span>{{ $t("import_from_sync") }}</span>- </button>- </span><buttonv-tooltip="$t('replace_current')"class="icon"@@ -134,6 +118,7 @@ import { fb } from "~/helpers/fb"import {graphqlCollections$,setGraphqlCollections,+ appendGraphqlCollections,} from "~/newstore/collections"export default {@@ -272,12 +257,8 @@ export default {this.failedImport()return}- this.$store.commit("postwoman/importCollections", {- data: collections,- flag: "graphql",- })+ appendGraphqlCollections(collections)this.fileImported()- this.syncToFBCollections()}reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])this.$refs.inputChooseFileToImportFrom.value = ""@@ -300,13 +281,6 @@ export default {icon: "done",})},- syncCollections() {- this.$store.commit("postwoman/replaceCollections", {- data: fb.currentGraphqlCollections,- flag: "graphql",- })- this.fileImported()- },fileImported() {this.$toast.info(this.$t("file_imported"), {icon: "folder_shared",