Working on Gallery folder list state change

This commit is contained in:
Torsten 2020-02-19 15:03:25 +01:00
parent fa3929377a
commit f3bcfc0e72
8 changed files with 119 additions and 16 deletions

View file

@ -1996,6 +1996,20 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
@ -2012,9 +2026,15 @@ __webpack_require__.r(__webpack_exports__);
}),
//folders: this.$store.state.folders
folders: ['Folder1', 'Folder2'],
selectedFolder: this.$store.state.selectedFolder
selectedFolder: this.$store.state.selectedFolder,
xFiles: this.$store.state.files
};
},
computed: {
xFiles2: function xFiles2() {
return this.$store.state.files;
}
},
beforeDestroy: function beforeDestroy() {
this.editor.destroy();
},
@ -2100,19 +2120,28 @@ __webpack_require__.r(__webpack_exports__);
console.log("First entry:");
console.log(res.data.folders);
console.log("Received the following data:");
_this3.$store.state.files = [];
for (var i = 0; i < res.data.folders.length; i++) {
var folder = res.data.folders[i].folder_name;
var file = res.data.folders[i].file_name;
console.log('http://localhost:8000/upload/images/' + folder + "/" + file);
console.log('http://localhost:8000/upload/images/' + folder + "/thumbnail/" + file);
var thumbUrl = 'http://localhost:8000/upload/images/' + folder + "/thumbnail/" + file;
console.log(thumbUrl);
_this3.$store.state.files.push(thumbUrl);
}
_this3.files = _this3.$store.state.files;
});
},
newFolderSelected: function newFolderSelected(event) {
console.log("New Folder selected:");
console.log(event.target.value);
this.$store.state.selectedFolder = event.target.value;
},
showUrlList: function showUrlList() {
console.log(this.$store.state.files);
}
}
});
@ -31682,9 +31711,51 @@ var render = function() {
_vm._v(" "),
_vm._m(0),
_vm._v(" "),
_vm._m(1)
_vm._m(1),
_vm._v(" "),
_c(
"div",
[
_c("p", [_vm._v("Static test")]),
_vm._v(" "),
_vm._l([1, 2, 3], function(entry) {
return _c("p", [_vm._v(_vm._s(entry))])
})
],
2
),
_vm._v(" "),
_c("p", [_vm._v("-")]),
_vm._v(" "),
_c(
"div",
{ attrs: { id: "gallery" } },
[
_c("p", [_vm._v("Test")]),
_vm._v(" "),
_vm._l(_vm.xFiles2, function(url) {
return _c("p", [_vm._v(_vm._s(url))])
})
],
2
)
],
1
),
_vm._v(" "),
_c("p", [_vm._v("BUTTON")]),
_vm._v(" "),
_c(
"button",
{
staticClass: "button",
on: {
click: function($event) {
return _vm.showUrlList()
}
}
},
[_vm._v("Debug output:List")]
)
])
}
@ -31843,7 +31914,7 @@ var render = function() {
}
}
},
[_vm._v("Bilder-Uploads")]
[_vm._v("Gallerie")]
)
])
: _vm._e(),
@ -31860,7 +31931,7 @@ var render = function() {
}
}
},
[_vm._v("Bilder-Uploads")]
[_vm._v("Gallerie")]
)
])
: _vm._e(),