From c1f083d19f523bc222ff336163b367fc2f58710f Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Thu, 13 May 2021 04:26:33 +0000 Subject: [PATCH] fix: indicate selected location on save request --- components/collections/SaveRequest.vue | 10 ++++++---- components/collections/index.vue | 9 +++++++++ components/collections/my/Collection.vue | 6 +++++- components/collections/my/Folder.vue | 12 ++++++++++-- components/collections/teams/Collection.vue | 5 ++++- components/collections/teams/Folder.vue | 17 +++-------------- components/teams/Edit.vue | 2 +- 7 files changed, 38 insertions(+), 23 deletions(-) diff --git a/components/collections/SaveRequest.vue b/components/collections/SaveRequest.vue index ba70a4a96..06412913f 100644 --- a/components/collections/SaveRequest.vue +++ b/components/collections/SaveRequest.vue @@ -13,9 +13,9 @@
- - - Select location + + @@ -178,6 +186,7 @@ export default { }, teamCollectionAdapter: new TeamCollectionAdapter(null), teamCollectionsNew: [], + picked: "", } }, subscriptions() { diff --git a/components/collections/my/Collection.vue b/components/collections/my/Collection.vue index d9bf8426b..89c90f914 100644 --- a/components/collections/my/Collection.vue +++ b/components/collections/my/Collection.vue @@ -12,7 +12,8 @@
@@ -87,9 +88,11 @@ name: folder.name + '/' + $event.name, id: $event.id, reqIdx: $event.reqIdx, + folderPath: $event.folderPath, }) " @remove-request="removeRequest" + :picked="picked" /> @@ -157,6 +160,7 @@ export default { selected: Boolean, saveRequest: Boolean, collectionsType: Object, + picked: { default: "", type: String }, }, data() { return { diff --git a/components/collections/my/Folder.vue b/components/collections/my/Folder.vue index 7a1fd8ea4..3a6045676 100644 --- a/components/collections/my/Folder.vue +++ b/components/collections/my/Folder.vue @@ -13,7 +13,8 @@
@@ -75,6 +76,7 @@ name: subFolder.name + '/' + $event.name, id: subFolder.id, reqIdx: $event.reqIdx, + folderPath: $event.folderPath, }) " @remove-request="removeRequest" @@ -147,6 +149,7 @@ export default { saveRequest: Boolean, isFiltered: Boolean, collectionsType: Object, + picked: { default: "", type: String }, }, data() { return { @@ -173,7 +176,12 @@ export default { }, toggleShowChildren() { if (this.$props.saveRequest) - this.$emit("select-folder", { name: "", id: this.$props.folder.id, reqIdx: "" }) + this.$emit("select-folder", { + name: "", + id: this.$props.folder.id, + reqIdx: "", + folderPath: this.$props.folderPath, + }) this.showChildren = !this.showChildren }, removeFolder() { diff --git a/components/collections/teams/Collection.vue b/components/collections/teams/Collection.vue index ac81803b3..91325bc86 100644 --- a/components/collections/teams/Collection.vue +++ b/components/collections/teams/Collection.vue @@ -4,7 +4,8 @@
@@ -98,6 +99,7 @@ " @expand-collection="expandCollection" @remove-request="removeRequest" + :picked="picked" /> @@ -165,6 +167,7 @@ export default { selected: Boolean, saveRequest: Boolean, collectionsType: Object, + picked: { default: "", type: String }, }, data() { return { diff --git a/components/collections/teams/Folder.vue b/components/collections/teams/Folder.vue index 758fd3ea6..efdba7dde 100644 --- a/components/collections/teams/Folder.vue +++ b/components/collections/teams/Folder.vue @@ -5,7 +5,8 @@
@@ -149,6 +150,7 @@ export default { saveRequest: Boolean, isFiltered: Boolean, collectionsType: Object, + picked: { default: "", type: String }, }, data() { return { @@ -158,20 +160,7 @@ export default { cursor: "", } }, - subscriptions() { - return { - SYNC_COLLECTIONS: getSettingSubject("syncCollections"), - } - }, methods: { - syncCollections() { - if (fb.currentUser !== null && this.SYNC_COLLECTIONS) { - fb.writeCollections( - JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)), - "collections" - ) - } - }, toggleShowChildren() { if (this.$props.saveRequest) this.$emit("select-folder", { name: "", id: this.$props.folder.id, reqIdx: "" }) diff --git a/components/teams/Edit.vue b/components/teams/Edit.vue index a40f77e0a..ad705e042 100644 --- a/components/teams/Edit.vue +++ b/components/teams/Edit.vue @@ -6,7 +6,7 @@

{{ $t("edit_team") }}

-