diff --git a/components/collections/add-folder.vue b/components/collections/add-folder.vue
index 588239074..421475efa 100644
--- a/components/collections/add-folder.vue
+++ b/components/collections/add-folder.vue
@@ -53,6 +53,7 @@ export default {
props: {
show: Boolean,
folder: Object,
+ folderPath: String,
collectionIndex: Number,
},
data() {
@@ -61,20 +62,12 @@ export default {
}
},
methods: {
- syncCollections() {
- if (fb.currentUser !== null) {
- if (fb.currentSettings[0].value) {
- fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
- }
- }
- },
addFolder() {
- this.$store.commit("postwoman/addFolder", {
- name: this.$data.name,
- folder: this.$props.folder,
+ this.$emit("add-folder", {
+ name: this.name,
+ folder: this.folder,
+ path: this.folderPath || `${this.collectionIndex}`,
})
- this.hideModal()
- this.syncCollections()
},
hideModal() {
this.$emit("hide-modal")
diff --git a/components/collections/collection.vue b/components/collections/collection.vue
index b1912bd3a..6ec10f47a 100644
--- a/components/collections/collection.vue
+++ b/components/collections/collection.vue
@@ -32,7 +32,7 @@