Fix add folder to collections being broken when logged in (#1299)
* Moved add folder modal logic out * Pass around folder paths for collections to fix folder not applying on logged in users * Remove unwanted use of folder value for addFolder store mutation Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
@@ -21,6 +21,8 @@ TODO:
|
||||
<add-folder
|
||||
:show="showModalAddFolder"
|
||||
:folder="editingFolder"
|
||||
:folder-path="editingFolderPath"
|
||||
@add-folder="onAddFolder($event)"
|
||||
@hide-modal="displayModalAddFolder(false)"
|
||||
/>
|
||||
<edit-folder
|
||||
@@ -121,6 +123,7 @@ export default {
|
||||
editingFolder: undefined,
|
||||
editingFolderName: undefined,
|
||||
editingFolderIndex: undefined,
|
||||
editingFolderPath: undefined,
|
||||
editingRequest: undefined,
|
||||
editingRequestIndex: undefined,
|
||||
filterText: "",
|
||||
@@ -213,12 +216,21 @@ export default {
|
||||
this.displayModalEdit(true)
|
||||
this.syncCollections()
|
||||
},
|
||||
addFolder(payload) {
|
||||
const { folder } = payload
|
||||
this.$data.editingFolder = folder
|
||||
this.displayModalAddFolder(true)
|
||||
onAddFolder({ name, path }) {
|
||||
this.$store.commit("postwoman/addFolder", {
|
||||
name,
|
||||
path,
|
||||
})
|
||||
|
||||
this.displayModalAddFolder(false)
|
||||
this.syncCollections()
|
||||
},
|
||||
addFolder(payload) {
|
||||
const { folder, path } = payload
|
||||
this.$data.editingFolder = folder
|
||||
this.$data.editingFolderPath = path
|
||||
this.displayModalAddFolder(true)
|
||||
},
|
||||
editFolder(payload) {
|
||||
const { collectionIndex, folder, folderIndex } = payload
|
||||
this.$data.editingCollectionIndex = collectionIndex
|
||||
|
||||
Reference in New Issue
Block a user