Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/photos.5.js.map')
-rw-r--r--js/photos.5.js.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/photos.5.js.map b/js/photos.5.js.map
index 9ffe6e7d..dbe593cb 100644
--- a/js/photos.5.js.map
+++ b/js/photos.5.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./src/patchedRequest.js","webpack:///./src/components/FolderTagPreview.vue?9cd5","webpack:///./src/services/DavClient.js","webpack:///./src/components/FolderTagPreview.vue?13f2","webpack:///./src/components/FolderTagPreview.vue?a676","webpack:///./src/services/DavRequest.js","webpack:///./src/components/FolderTagPreview.vue?737d","webpack:///./src/components/FolderTagPreview.vue?c186","webpack:///src/components/FolderTagPreview.vue","webpack:///./src/components/FolderTagPreview.vue","webpack:///./src/views/Tags.vue?0bd8","webpack:///./src/services/SystemTags.js","webpack:///./src/services/TaggedImages.js","webpack:///src/components/Tag.vue","webpack:///./src/components/Tag.vue?63b5","webpack:///./src/components/Tag.vue","webpack:///./src/components/Tag.vue?1c78","webpack:///src/views/Tags.vue","webpack:///./src/views/Tags.vue?963b","webpack:///./src/views/Tags.vue"],"names":["request","require","oldPrepareRequestOptions","prepareRequestOptions","requestOptions","methodOptions","cancelToken","method","module","exports","content","i","locals","add","default","webdav","getPatcher","patch","axios","remote","generateRemoteUrl","client","createClient","parseUrl","pathname","___CSS_LOADER_API_IMPORT___","push","props","component","_vm","this","_h","$createElement","_c","_self","staticClass","class","isEmpty","attrs","to","ariaLabel","directives","name","rawName","value","expression","previewList","_l","file","key","fileid","generateImgSrc","on","$event","loaded","onPreviewFail","_v","icon","ariaUuid","_s","path","options","getDirectoryContents","Object","assign","data","details","response","map","genFileInfo","id","prefixPath","getCurrentUser","uid","filter","mime","allowedMimes","indexOf","filename","replace","displayName","fileList","t","loading","_e","root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com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst request = require('webdav/dist/node/request')\n\nconst oldPrepareRequestOptions = request.prepareRequestOptions\n\n// While we wait for official cancellable webdav requests\n// https://github.com/perry-mitchell/webdav-client/issues/179\n// let's properly forward our axios options through webdav to axios\n\nrequest.prepareRequestOptions = function(requestOptions, methodOptions) {\n\t// add our cancelToken support\n\tif (methodOptions.cancelToken && typeof methodOptions.cancelToken === 'object') {\n\t\trequestOptions.cancelToken = methodOptions.cancelToken\n\t}\n\n\t// exploit old method\n\toldPrepareRequestOptions(requestOptions, methodOptions)\n\n\t// allow us to override the request method\n\tif (methodOptions.method && typeof methodOptions.method === 'string') {\n\t\trequestOptions.method = methodOptions.method\n\t}\n}\n\nmodule.exports = request\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0f73ce6c\", content, true, {});","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport webdav from 'webdav'\nimport axios from '@nextcloud/axios'\nimport parseUrl from 'url-parse'\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n// force our axios\nconst patcher = webdav.getPatcher()\npatcher.patch('request', axios)\n\n// init webdav client on default dav endpoint\nconst remote = generateRemoteUrl(`dav`)\nconst client = webdav.createClient(remote)\n\nexport const remotePath = parseUrl(remote).pathname\nexport default client\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".file[data-v-1b9c1a10],.folder[data-v-1b9c1a10]{position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.file .cover[data-v-1b9c1a10],.folder .cover[data-v-1b9c1a10]{z-index:2;width:100%;padding-bottom:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:0;background-color:var(--color-main-text)}.file.active .cover[data-v-1b9c1a10],.file:active .cover[data-v-1b9c1a10],.file:hover .cover[data-v-1b9c1a10],.file:focus .cover[data-v-1b9c1a10],.folder.active .cover[data-v-1b9c1a10],.folder:active .cover[data-v-1b9c1a10],.folder:hover .cover[data-v-1b9c1a10],.folder:focus .cover[data-v-1b9c1a10]{opacity:.3}.file--clear.active .cover[data-v-1b9c1a10],.file--clear:active .cover[data-v-1b9c1a10],.file--clear:hover .cover[data-v-1b9c1a10],.file--clear:focus .cover[data-v-1b9c1a10],.folder--clear.active .cover[data-v-1b9c1a10],.folder--clear:active .cover[data-v-1b9c1a10],.folder--clear:hover .cover[data-v-1b9c1a10],.folder--clear:focus .cover[data-v-1b9c1a10]{opacity:.1}.fade-enter-active[data-v-1b9c1a10],.fade-leave-active[data-v-1b9c1a10]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-1b9c1a10],.fade-leave-to[data-v-1b9c1a10]{opacity:0}.folder-content[data-v-1b9c1a10]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-1b9c1a10]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-1b9c1a10]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-1b9c1a10]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-1b9c1a10]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-1b9c1a10]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-1b9c1a10]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.folder-name[data-v-1b9c1a10]{position:absolute;z-index:3;display:flex;overflow:hidden;flex-direction:column;width:100%;height:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:1}.folder-name__icon[data-v-1b9c1a10]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-1b9c1a10]{overflow:hidden;height:1rem;padding:0 10px;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:var(--color-main-background);text-shadow:0 0 8px var(--color-main-text);font-size:1rem;line-height:1rem}.folder--clear .folder-name__icon[data-v-1b9c1a10]{opacity:.3}.folder--clear .folder-name__name[data-v-1b9c1a10]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-1b9c1a10]{opacity:.3}.folder:not(.folder--clear):active .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):active .cover[data-v-1b9c1a10],.folder:not(.folder--clear):hover .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):hover .cover[data-v-1b9c1a10],.folder:not(.folder--clear):focus .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):focus .cover[data-v-1b9c1a10]{opacity:0}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst props = `\n\t<oc:fileid />\n\t<d:getlastmodified />\n\t<d:getetag />\n\t<d:getcontenttype />\n\t<d:getcontentlength />\n\t<nc:has-preview />\n\t<oc:favorite />\n\t<d:resourcetype />`\n\nexport { props }\nexport default `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('router-link',{staticClass:\"folder\",class:{'folder--clear': _vm.isEmpty},attrs:{\"to\":_vm.to,\"aria-label\":_vm.ariaLabel}},[_c('transition',{attrs:{\"name\":\"fade\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loaded),expression:\"loaded\"}],staticClass:\"folder-content\",class:(\"folder-content--grid-\" + (_vm.previewList.length)),attrs:{\"role\":\"none\"}},_vm._l((_vm.previewList),function(file){return _c('img',{key:file.fileid,attrs:{\"src\":_vm.generateImgSrc(file),\"alt\":\"\"},on:{\"load\":function($event){_vm.loaded = true},\"error\":function($event){return _vm.onPreviewFail(file)}}})}),0)]),_vm._v(\" \"),_c('div',{staticClass:\"folder-name\"},[_c('span',{staticClass:\"folder-name__icon\",class:[!_vm.isEmpty ? 'icon-white' : 'icon-dark', _vm.icon],attrs:{\"role\":\"img\"}}),_vm._v(\" \"),_c('p',{staticClass:\"folder-name__name\",attrs:{\"id\":_vm.ariaUuid}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.name)+\"\\n\\t\\t\")])]),_vm._v(\" \"),_c('div',{staticClass:\"cover\",attrs:{\"role\":\"none\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<router-link :class=\"{'folder--clear': isEmpty}\"\n\t\tclass=\"folder\"\n\t\t:to=\"to\"\n\t\t:aria-label=\"ariaLabel\">\n\t\t<!-- Images preview -->\n\t\t<transition name=\"fade\">\n\t\t\t<div v-show=\"loaded\"\n\t\t\t\t:class=\"`folder-content--grid-${previewList.length}`\"\n\t\t\t\tclass=\"folder-content\"\n\t\t\t\trole=\"none\">\n\t\t\t\t<img v-for=\"file in previewList\"\n\t\t\t\t\t:key=\"file.fileid\"\n\t\t\t\t\t:src=\"generateImgSrc(file)\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\t@load=\"loaded = true\"\n\t\t\t\t\t@error=\"onPreviewFail(file)\">\n\t\t\t</div>\n\t\t</transition>\n\n\t\t<div\n\t\t\tclass=\"folder-name\">\n\t\t\t<span :class=\"[!isEmpty ? 'icon-white' : 'icon-dark', icon]\"\n\t\t\t\tclass=\"folder-name__icon\"\n\t\t\t\trole=\"img\" />\n\t\t\t<p :id=\"ariaUuid\" class=\"folder-name__name\">\n\t\t\t\t{{ name }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<div class=\"cover\" role=\"none\" />\n\t</router-link>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'FolderTagPreview',\n\n\tprops: {\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'icon-folder',\n\t\t},\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tfileList: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloaded: false,\n\t\t\tfailed: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// folder is empty\n\t\tisEmpty() {\n\t\t\treturn this.previewList.length === 0\n\t\t},\n\n\t\tariaUuid() {\n\t\t\treturn `folder-${this.id}`\n\t\t},\n\t\tariaLabel() {\n\t\t\treturn t('photos', 'Open the \"{name}\" sub-directory', { name: this.name })\n\t\t},\n\n\t\t/**\n\t\t * Previews list without the failed ones\n\t\t * @returns {Object[]} the previews fileinfo\n\t\t */\n\t\tpreviewList() {\n\t\t\treturn this.fileList\n\t\t\t\t.filter(file => this.failed.indexOf(file.fileid) === -1)\n\t\t},\n\n\t\t/**\n\t\t * We do not want encoded slashes when browsing by folder\n\t\t * so we generate a new valid route object based on the\n\t\t * current named route, get the final url back, decode it\n\t\t * and use it as a direct string.\n\t\t * Which vue-router does not encode afterwards!\n\t\t * @returns {string}\n\t\t */\n\t\tto() {\n\t\t\t// always remove first slash, the router\n\t\t\t// manage it automatically\n\t\t\tconst regex = /^\\/?(.+)/i\n\t\t\tconst path = regex.exec(this.path)[1]\n\n\t\t\t// apply to current route\n\t\t\treturn Object.assign({}, this.$route, {\n\t\t\t\tparams: { path },\n\t\t\t})\n\t\t},\n\t},\n\n\tmethods: {\n\t\tgenerateImgSrc({ fileid, etag }) {\n\t\t\t// use etag to force cache reload if file changed\n\t\t\treturn generateUrl(`/core/preview?fileId=${fileid}&x=${256}&y=${256}&a=true&v=${etag}`)\n\t\t},\n\t\tonPreviewFail({ fileid }) {\n\t\t\tthis.failed.push(fileid)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../mixins/FileFolder.scss';\n\n.folder-content {\n\tposition: absolute;\n\tdisplay: grid;\n\twidth: 100%;\n\theight: 100%;\n\t// folder layout if less than 4 pictures\n\t&--grid-1 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr;\n\t}\n\t&--grid-2 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\t&--grid-3 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t\timg:first-child {\n\t\t\tgrid-column: span 2;\n\t\t}\n\t}\n\t&--grid-4 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tobject-fit: cover;\n\t}\n}\n\n$name-height: 1rem;\n\n.folder-name {\n\tposition: absolute;\n\tz-index: 3;\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: opacity var(--animation-quick) ease-in-out;\n\topacity: 1;\n\t&__icon {\n\t\theight: 40%;\n\t\tmargin-top: calc(30% - #{$name-height} / 2); // center name+icon\n\t\tbackground-size: 40%;\n\t}\n\t&__name {\n\t\toverflow: hidden;\n\t\theight: $name-height;\n\t\tpadding: 0 10px;\n\t\ttext-align: center;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-background);\n\t\ttext-shadow: 0 0 8px var(--color-main-text);\n\t\tfont-size: $name-height;\n\t\tline-height: $name-height;\n\t}\n}\n\n// Cover management empty/full\n.folder {\n\t// if no img, let's display the folder icon as default black\n\t&--clear {\n\t\t.folder-name__icon {\n\t\t\topacity: .3;\n\t\t}\n\t\t.folder-name__name {\n\t\t\tcolor: var(--color-main-text);\n\t\t\ttext-shadow: 0 0 8px var(--color-main-background);\n\t\t}\n\t}\n\n\t// show the cover as background\n\t// if there are pictures in it\n\t// so we can sho the folder+name above it\n\t&:not(.folder--clear) {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\n\t\t// hide everything but pictures\n\t\t// on hover/active/focus\n\t\t&:active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\t.folder-name,\n\t\t\t.cover {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n</style>\n","import { render, staticRenderFns } from \"./FolderTagPreview.vue?vue&type=template&id=1b9c1a10&scoped=true&\"\nimport script from \"./FolderTagPreview.vue?vue&type=script&lang=js&\"\nexport * from \"./FolderTagPreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1b9c1a10\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('Grid',[_c('Navigation',{key:\"navigation\",attrs:{\"basename\":_vm.path,\"filename\":'/' + _vm.path,\"root-title\":_vm.rootTitle}}),_vm._v(\" \"),(_vm.isRoot)?_vm._l((_vm.tagsNames),function(id){return _c('Tag',_vm._b({key:id,attrs:{\"fileid\":id,\"basename\":_vm.tags[id].displayName}},'Tag',_vm.tags[id],false))}):[(_vm.isEmpty)?_c('EmptyContent',{key:\"emptycontent\",attrs:{\"illustration-name\":\"empty\"},scopedSlots:_vm._u([{key:\"desc\",fn:function(){return [_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Photos with tags will show up here'))+\"\\n\\t\\t\\t\")]},proxy:true}],null,false,3269923249)},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('photos', 'No tags yet'))+\"\\n\\t\\t\\t\")]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.fileList),function(file){return _c('File',_vm._b({key:file.fileid,attrs:{\"list\":_vm.fileList}},'File',file,false))})]],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport client from './DavClient'\nimport { genFileInfo } from '../utils/fileUtils'\n\n/**\n * List system tags\n *\n * @param {String} path the path relative to the user root\n * @param {Object} [options] optional options for axios\n * @returns {Array} the file list\n */\nexport default async function(path, options = {}) {\n\tconst response = await client.getDirectoryContents('/systemtags/', Object.assign({}, {\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:id />\n\t\t\t\t\t<oc:display-name />\n\t\t\t\t\t<oc:user-visible />\n\t\t\t\t\t<oc:user-assignable />\n\t\t\t\t\t<oc:can-assign />\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`,\n\t\tdetails: true,\n\t}, options))\n\n\treturn response.data.map(data => genFileInfo(data))\n}\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { genFileInfo } from '../utils/fileUtils'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { props } from './DavRequest'\nimport allowedMimes from './AllowedMimes'\nimport client from './DavClient'\n\n/**\n * Get tagged files based on provided tag id\n *\n * @param {number} id the tag id to filter\n * @param {Object} [options] optional options for axios\n * @returns {Array} the file list\n */\nexport default async function(id, options = {}) {\n\n\toptions = Object.assign({\n\t\tmethod: 'REPORT',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-files\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t\t<oc:filter-rules>\n\t\t\t\t\t<oc:systemtag>${id}</oc:systemtag>\n\t\t\t\t</oc:filter-rules>\n\t\t\t</oc:filter-files>`,\n\t\tdetails: true,\n\t}, options)\n\n\tconst prefixPath = `/files/${getCurrentUser().uid}`\n\tconst response = await client.getDirectoryContents(prefixPath, options)\n\n\treturn response.data\n\t\t.map(data => genFileInfo(data))\n\t\t// filter out unwanted mime because server REPORT service only support\n\t\t// hardcoded props and mime is not one of them\n\t\t// https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php#L274\n\t\t.filter(file => file.mime && allowedMimes.indexOf(file.mime) !== -1)\n\t\t// remove prefix path from full file path\n\t\t.map(data => Object.assign({}, data, { filename: data.filename.replace(prefixPath, '') }))\n}\n","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<FolderTagPreview :id=\"id\"\n\t\ticon=\"icon-tag\"\n\t\t:name=\"displayName\"\n\t\t:path=\"displayName\"\n\t\t:file-list=\"fileList\" />\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getTaggedImages from '../services/TaggedImages'\nimport cancelableRequest from '../utils/CancelableRequest'\nimport FolderTagPreview from './FolderTagPreview'\n\nexport default {\n\tname: 'Tag',\n\n\tcomponents: {\n\t\tFolderTagPreview,\n\t},\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t]),\n\n\t\t// files list of the current folder\n\t\tfolderContent() {\n\t\t\treturn this.tags[this.id].files\n\t\t},\n\t\tfileList() {\n\t\t\treturn this.folderContent\n\t\t\t\t? this.folderContent\n\t\t\t\t\t.map(id => this.files[id])\n\t\t\t\t\t.filter(file => !!file)\n\t\t\t\t\t.slice(0, 4) // only get the 4 first images\n\t\t\t\t: []\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync created() {\n\t\t// init cancellable request\n\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\tthis.cancelRequest = cancel\n\n\t\ttry {\n\t\t\t// get data\n\t\t\tconst files = await request(this.id)\n\t\t\tthis.$store.dispatch('updateTag', { id: this.id, files })\n\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t} catch (error) {\n\t\t\tif (error.response && error.response.status) {\n\t\t\t\tconsole.error('Failed to get folder content', this.id, error.response)\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.cancelRequest = null\n\t\t}\n\t},\n\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=55d2c7c8&\"\nimport script from \"./Tag.vue?vue&type=script&lang=js&\"\nexport * from \"./Tag.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FolderTagPreview',{attrs:{\"id\":_vm.id,\"icon\":\"icon-tag\",\"name\":_vm.displayName,\"path\":_vm.displayName,\"file-list\":_vm.fileList}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<!-- Errors handlers-->\n\t<EmptyContent v-if=\"error\">\n\t\t{{ t('photos', 'An error occurred') }}\n\t</EmptyContent>\n\n\t<!-- Folder content -->\n\t<Grid v-else-if=\"!loading\">\n\t\t<Navigation\n\t\t\tkey=\"navigation\"\n\t\t\t:basename=\"path\"\n\t\t\t:filename=\"'/' + path\"\n\t\t\t:root-title=\"rootTitle\" />\n\n\t\t<!-- Tags list -->\n\t\t<template v-if=\"isRoot\">\n\t\t\t<Tag v-for=\"id in tagsNames\"\n\t\t\t\t:key=\"id\"\n\t\t\t\tv-bind=\"tags[id]\"\n\t\t\t\t:fileid=\"id\"\n\t\t\t\t:basename=\"tags[id].displayName\" />\n\t\t</template>\n\n\t\t<!-- Content list -->\n\t\t<template v-else>\n\t\t\t<EmptyContent v-if=\"isEmpty\" key=\"emptycontent\" illustration-name=\"empty\">\n\t\t\t\t{{ t('photos', 'No tags yet') }}\n\t\t\t\t<template #desc>\n\t\t\t\t\t{{ t('photos', 'Photos with tags will show up here') }}\n\t\t\t\t</template>\n\t\t\t</EmptyContent>\n\n\t\t\t<File v-for=\"file in fileList\"\n\t\t\t\t:key=\"file.fileid\"\n\t\t\t\t:list=\"fileList\"\n\t\t\t\tv-bind=\"file\" />\n\t\t</template>\n\t</Grid>\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getSystemTags from '../services/SystemTags'\nimport getTaggedImages from '../services/TaggedImages'\n\nimport EmptyContent from '../components/EmptyContent'\nimport Tag from '../components/Tag'\nimport File from '../components/File'\nimport Grid from '../components/Grid'\nimport Navigation from '../components/Navigation'\n\nimport cancelableRequest from '../utils/CancelableRequest'\n\nexport default {\n\tname: 'Tags',\n\tcomponents: {\n\t\tEmptyContent,\n\t\tFile,\n\t\tTag,\n\t\tGrid,\n\t\tNavigation,\n\t},\n\tprops: {\n\t\trootTitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tisRoot: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\terror: null,\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t\t'tagsNames',\n\t\t]),\n\n\t\t// current tag id from current path\n\t\ttagId() {\n\t\t\treturn this.$store.getters.tagId(this.path)\n\t\t},\n\n\t\t// current tag\n\t\ttag() {\n\t\t\treturn this.tags[this.tagId]\n\t\t},\n\t\t// files list of the current tag\n\t\tfileList() {\n\t\t\treturn this.tag && this.tag.files\n\t\t\t\t.map(id => this.files[id])\n\t\t\t\t.filter(file => !!file)\n\t\t},\n\n\t\tisEmpty() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn Object.keys(this.tagsNames).length === 0\n\t\t\t}\n\t\t\treturn this.fileList.length === 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tasync path() {\n\t\t\t// if we don't have the tag in the store yet,\n\t\t\t// we need to fetch the list first\n\t\t\tif (!this.tagId) {\n\t\t\t\tawait this.fetchRootContent()\n\t\t\t}\n\n\t\t\t// if we're not in the root, we fetch the data\n\t\t\tif (!this.isRoot) {\n\t\t\t\tthis.fetchContent()\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync beforeMount() {\n\t\t// if we don't have the tag in the store yet,\n\t\t// we need to fetch the list first\n\t\tif (!this.tagId) {\n\t\t\tawait this.fetchRootContent()\n\t\t}\n\n\t\t// if we're not in the root, we fetch the data\n\t\tif (!this.isRoot) {\n\t\t\tthis.fetchContent()\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync fetchRootContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest('Changed folder')\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getSystemTags)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// fetch content\n\t\t\t\tconst tags = await request()\n\t\t\t\tthis.$store.dispatch('updateTags', tags)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\n\t\t},\n\n\t\tasync fetchContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest()\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// get data\n\t\t\t\tconst files = await request(this.tagId)\n\t\t\t\tthis.$store.dispatch('updateTag', { id: this.tagId, files })\n\t\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\t\t},\n\t},\n\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Tags.vue?vue&type=template&id=84b81760&\"\nimport script from \"./Tags.vue?vue&type=script&lang=js&\"\nexport * from \"./Tags.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///./src/patchedRequest.js","webpack:///./src/components/FolderTagPreview.vue?9cd5","webpack:///./src/services/DavClient.js","webpack:///./src/components/FolderTagPreview.vue?13f2","webpack:///./src/components/FolderTagPreview.vue?a676","webpack:///./src/services/DavRequest.js","webpack:///./src/components/FolderTagPreview.vue?737d","webpack:///./src/components/FolderTagPreview.vue?c186","webpack:///src/components/FolderTagPreview.vue","webpack:///./src/components/FolderTagPreview.vue","webpack:///./src/views/Tags.vue?0bd8","webpack:///./src/services/SystemTags.js","webpack:///./src/services/TaggedImages.js","webpack:///src/components/Tag.vue","webpack:///./src/components/Tag.vue?63b5","webpack:///./src/components/Tag.vue","webpack:///./src/components/Tag.vue?1c78","webpack:///src/views/Tags.vue","webpack:///./src/views/Tags.vue?963b","webpack:///./src/views/Tags.vue"],"names":["request","require","oldPrepareRequestOptions","prepareRequestOptions","requestOptions","methodOptions","cancelToken","method","module","exports","content","i","locals","add","default","webdav","getPatcher","patch","axios","remote","generateRemoteUrl","client","createClient","parseUrl","pathname","___CSS_LOADER_API_IMPORT___","push","props","component","_vm","this","_h","$createElement","_c","_self","staticClass","class","isEmpty","attrs","to","ariaLabel","directives","name","rawName","value","expression","previewList","_l","file","key","fileid","generateImgSrc","on","$event","loaded","onPreviewFail","_v","icon","ariaUuid","_s","path","options","getDirectoryContents","Object","assign","data","details","response","map","genFileInfo","id","prefixPath","getCurrentUser","uid","filter","mime","allowedMimes","indexOf","filename","replace","displayName","fileList","t","loading","_e","rootTitle","_b","tags","scopedSlots","_u","fn","proxy"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAsBA,IAAMA,EAAUC,EAAQ,KAElBC,EAA2BF,EAAQG,sBAMzCH,EAAQG,sBAAwB,SAASC,EAAgBC,GAEpDA,EAAcC,aAAoD,WAArC,EAAOD,EAAcC,eACrDF,EAAeE,YAAcD,EAAcC,aAI5CJ,EAAyBE,EAAgBC,GAGrCA,EAAcE,QAA0C,iBAAzBF,EAAcE,SAChDH,EAAeG,OAASF,EAAcE,SAIxC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AAa,WAAE,SAASyC,GAAI,OAAOrC,EAAG,MAAMJ,EAAIyD,GAAG,CAACrC,IAAIqB,EAAGhC,MAAM,CAAC,OAASgC,EAAG,SAAWzC,EAAI0D,KAAKjB,GAAIU,cAAc,MAAMnD,EAAI0D,KAAKjB,IAAI,OAAU,CAAEzC,EAAW,QAAEI,EAAG,eAAe,CAACgB,IAAI,eAAeX,MAAM,CAAC,oBAAoB,SAASkD,YAAY3D,EAAI4D,GAAG,CAAC,CAACxC,IAAI,OAAOyC,GAAG,WAAW,MAAO,CAAC7D,EAAI2B,GAAG,aAAa3B,EAAI8B,GAAG9B,EAAIqD,EAAE,SAAU,uCAAuC,cAAcS,OAAM,IAAO,MAAK,EAAM,aAAa,CAAC9D,EAAI2B,GAAG,WAAW3B,EAAI8B,GAAG9B,EAAIqD,EAAE,SAAU,gBAAgB,cAAcrD,EAAIuD,KAAKvD,EAAI2B,GAAG,KAAK3B,EAAIkB,GAAIlB,EAAY,UAAE,SAASmB,GAAM,OAAOf,EAAG,OAAOJ,EAAIyD,GAAG,CAACrC,IAAID,EAAKE,OAAOZ,MAAM,CAAC,KAAOT,EAAIoD,WAAW,OAAOjC,GAAK,SAAY,KACj+B,ISUpB,EACA,KACA,KACA,MAIa,Y","file":"photos.5.js?v=4c1e9d26974c46cbefc6","sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst request = require('webdav/dist/node/request')\n\nconst oldPrepareRequestOptions = request.prepareRequestOptions\n\n// While we wait for official cancellable webdav requests\n// https://github.com/perry-mitchell/webdav-client/issues/179\n// let's properly forward our axios options through webdav to axios\n\nrequest.prepareRequestOptions = function(requestOptions, methodOptions) {\n\t// add our cancelToken support\n\tif (methodOptions.cancelToken && typeof methodOptions.cancelToken === 'object') {\n\t\trequestOptions.cancelToken = methodOptions.cancelToken\n\t}\n\n\t// exploit old method\n\toldPrepareRequestOptions(requestOptions, methodOptions)\n\n\t// allow us to override the request method\n\tif (methodOptions.method && typeof methodOptions.method === 'string') {\n\t\trequestOptions.method = methodOptions.method\n\t}\n}\n\nmodule.exports = request\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0f73ce6c\", content, true, {});","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport webdav from 'webdav'\nimport axios from '@nextcloud/axios'\nimport parseUrl from 'url-parse'\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n// force our axios\nconst patcher = webdav.getPatcher()\npatcher.patch('request', axios)\n\n// init webdav client on default dav endpoint\nconst remote = generateRemoteUrl(`dav`)\nconst client = webdav.createClient(remote)\n\nexport const remotePath = parseUrl(remote).pathname\nexport default client\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js!../../node_modules/sass-loader/dist/cjs.js??ref--1-3!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".file[data-v-1b9c1a10],.folder[data-v-1b9c1a10]{position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.file .cover[data-v-1b9c1a10],.folder .cover[data-v-1b9c1a10]{z-index:2;width:100%;padding-bottom:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:0;background-color:var(--color-main-text)}.file.active .cover[data-v-1b9c1a10],.file:active .cover[data-v-1b9c1a10],.file:hover .cover[data-v-1b9c1a10],.file:focus .cover[data-v-1b9c1a10],.folder.active .cover[data-v-1b9c1a10],.folder:active .cover[data-v-1b9c1a10],.folder:hover .cover[data-v-1b9c1a10],.folder:focus .cover[data-v-1b9c1a10]{opacity:.3}.file--clear.active .cover[data-v-1b9c1a10],.file--clear:active .cover[data-v-1b9c1a10],.file--clear:hover .cover[data-v-1b9c1a10],.file--clear:focus .cover[data-v-1b9c1a10],.folder--clear.active .cover[data-v-1b9c1a10],.folder--clear:active .cover[data-v-1b9c1a10],.folder--clear:hover .cover[data-v-1b9c1a10],.folder--clear:focus .cover[data-v-1b9c1a10]{opacity:.1}.fade-enter-active[data-v-1b9c1a10],.fade-leave-active[data-v-1b9c1a10]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-1b9c1a10],.fade-leave-to[data-v-1b9c1a10]{opacity:0}.folder-content[data-v-1b9c1a10]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-1b9c1a10]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-1b9c1a10]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-1b9c1a10]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-1b9c1a10]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-1b9c1a10]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-1b9c1a10]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.folder-name[data-v-1b9c1a10]{position:absolute;z-index:3;display:flex;overflow:hidden;flex-direction:column;width:100%;height:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:1}.folder-name__icon[data-v-1b9c1a10]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-1b9c1a10]{overflow:hidden;height:1rem;padding:0 10px;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:var(--color-main-background);text-shadow:0 0 8px var(--color-main-text);font-size:1rem;line-height:1rem}.folder--clear .folder-name__icon[data-v-1b9c1a10]{opacity:.3}.folder--clear .folder-name__name[data-v-1b9c1a10]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-1b9c1a10]{opacity:.3}.folder:not(.folder--clear):active .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):active .cover[data-v-1b9c1a10],.folder:not(.folder--clear):hover .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):hover .cover[data-v-1b9c1a10],.folder:not(.folder--clear):focus .folder-name[data-v-1b9c1a10],.folder:not(.folder--clear):focus .cover[data-v-1b9c1a10]{opacity:0}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst props = `\n\t<oc:fileid />\n\t<d:getlastmodified />\n\t<d:getetag />\n\t<d:getcontenttype />\n\t<d:getcontentlength />\n\t<nc:has-preview />\n\t<oc:favorite />\n\t<d:resourcetype />`\n\nexport { props }\nexport default `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('router-link',{staticClass:\"folder\",class:{'folder--clear': _vm.isEmpty},attrs:{\"to\":_vm.to,\"aria-label\":_vm.ariaLabel}},[_c('transition',{attrs:{\"name\":\"fade\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loaded),expression:\"loaded\"}],staticClass:\"folder-content\",class:(\"folder-content--grid-\" + (_vm.previewList.length)),attrs:{\"role\":\"none\"}},_vm._l((_vm.previewList),function(file){return _c('img',{key:file.fileid,attrs:{\"src\":_vm.generateImgSrc(file),\"alt\":\"\"},on:{\"load\":function($event){_vm.loaded = true},\"error\":function($event){return _vm.onPreviewFail(file)}}})}),0)]),_vm._v(\" \"),_c('div',{staticClass:\"folder-name\"},[_c('span',{staticClass:\"folder-name__icon\",class:[!_vm.isEmpty ? 'icon-white' : 'icon-dark', _vm.icon],attrs:{\"role\":\"img\"}}),_vm._v(\" \"),_c('p',{staticClass:\"folder-name__name\",attrs:{\"id\":_vm.ariaUuid}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.name)+\"\\n\\t\\t\")])]),_vm._v(\" \"),_c('div',{staticClass:\"cover\",attrs:{\"role\":\"none\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FolderTagPreview.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<router-link :class=\"{'folder--clear': isEmpty}\"\n\t\tclass=\"folder\"\n\t\t:to=\"to\"\n\t\t:aria-label=\"ariaLabel\">\n\t\t<!-- Images preview -->\n\t\t<transition name=\"fade\">\n\t\t\t<div v-show=\"loaded\"\n\t\t\t\t:class=\"`folder-content--grid-${previewList.length}`\"\n\t\t\t\tclass=\"folder-content\"\n\t\t\t\trole=\"none\">\n\t\t\t\t<img v-for=\"file in previewList\"\n\t\t\t\t\t:key=\"file.fileid\"\n\t\t\t\t\t:src=\"generateImgSrc(file)\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\t@load=\"loaded = true\"\n\t\t\t\t\t@error=\"onPreviewFail(file)\">\n\t\t\t</div>\n\t\t</transition>\n\n\t\t<div\n\t\t\tclass=\"folder-name\">\n\t\t\t<span :class=\"[!isEmpty ? 'icon-white' : 'icon-dark', icon]\"\n\t\t\t\tclass=\"folder-name__icon\"\n\t\t\t\trole=\"img\" />\n\t\t\t<p :id=\"ariaUuid\" class=\"folder-name__name\">\n\t\t\t\t{{ name }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<div class=\"cover\" role=\"none\" />\n\t</router-link>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'FolderTagPreview',\n\n\tprops: {\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: 'icon-folder',\n\t\t},\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tfileList: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloaded: false,\n\t\t\tfailed: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// folder is empty\n\t\tisEmpty() {\n\t\t\treturn this.previewList.length === 0\n\t\t},\n\n\t\tariaUuid() {\n\t\t\treturn `folder-${this.id}`\n\t\t},\n\t\tariaLabel() {\n\t\t\treturn t('photos', 'Open the \"{name}\" sub-directory', { name: this.name })\n\t\t},\n\n\t\t/**\n\t\t * Previews list without the failed ones\n\t\t * @returns {Object[]} the previews fileinfo\n\t\t */\n\t\tpreviewList() {\n\t\t\treturn this.fileList\n\t\t\t\t.filter(file => this.failed.indexOf(file.fileid) === -1)\n\t\t},\n\n\t\t/**\n\t\t * We do not want encoded slashes when browsing by folder\n\t\t * so we generate a new valid route object based on the\n\t\t * current named route, get the final url back, decode it\n\t\t * and use it as a direct string.\n\t\t * Which vue-router does not encode afterwards!\n\t\t * @returns {string}\n\t\t */\n\t\tto() {\n\t\t\t// always remove first slash, the router\n\t\t\t// manage it automatically\n\t\t\tconst regex = /^\\/?(.+)/i\n\t\t\tconst path = regex.exec(this.path)[1]\n\n\t\t\t// apply to current route\n\t\t\treturn Object.assign({}, this.$route, {\n\t\t\t\tparams: { path },\n\t\t\t})\n\t\t},\n\t},\n\n\tmethods: {\n\t\tgenerateImgSrc({ fileid, etag }) {\n\t\t\t// use etag to force cache reload if file changed\n\t\t\treturn generateUrl(`/core/preview?fileId=${fileid}&x=${256}&y=${256}&a=true&v=${etag}`)\n\t\t},\n\t\tonPreviewFail({ fileid }) {\n\t\t\tthis.failed.push(fileid)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../mixins/FileFolder.scss';\n\n.folder-content {\n\tposition: absolute;\n\tdisplay: grid;\n\twidth: 100%;\n\theight: 100%;\n\t// folder layout if less than 4 pictures\n\t&--grid-1 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr;\n\t}\n\t&--grid-2 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\t&--grid-3 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t\timg:first-child {\n\t\t\tgrid-column: span 2;\n\t\t}\n\t}\n\t&--grid-4 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tobject-fit: cover;\n\t}\n}\n\n$name-height: 1rem;\n\n.folder-name {\n\tposition: absolute;\n\tz-index: 3;\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: opacity var(--animation-quick) ease-in-out;\n\topacity: 1;\n\t&__icon {\n\t\theight: 40%;\n\t\tmargin-top: calc(30% - #{$name-height} / 2); // center name+icon\n\t\tbackground-size: 40%;\n\t}\n\t&__name {\n\t\toverflow: hidden;\n\t\theight: $name-height;\n\t\tpadding: 0 10px;\n\t\ttext-align: center;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-background);\n\t\ttext-shadow: 0 0 8px var(--color-main-text);\n\t\tfont-size: $name-height;\n\t\tline-height: $name-height;\n\t}\n}\n\n// Cover management empty/full\n.folder {\n\t// if no img, let's display the folder icon as default black\n\t&--clear {\n\t\t.folder-name__icon {\n\t\t\topacity: .3;\n\t\t}\n\t\t.folder-name__name {\n\t\t\tcolor: var(--color-main-text);\n\t\t\ttext-shadow: 0 0 8px var(--color-main-background);\n\t\t}\n\t}\n\n\t// show the cover as background\n\t// if there are pictures in it\n\t// so we can sho the folder+name above it\n\t&:not(.folder--clear) {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\n\t\t// hide everything but pictures\n\t\t// on hover/active/focus\n\t\t&:active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\t.folder-name,\n\t\t\t.cover {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n</style>\n","import { render, staticRenderFns } from \"./FolderTagPreview.vue?vue&type=template&id=1b9c1a10&scoped=true&\"\nimport script from \"./FolderTagPreview.vue?vue&type=script&lang=js&\"\nexport * from \"./FolderTagPreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FolderTagPreview.vue?vue&type=style&index=0&id=1b9c1a10&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1b9c1a10\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('Grid',[_c('Navigation',{key:\"navigation\",attrs:{\"basename\":_vm.path,\"filename\":'/' + _vm.path,\"root-title\":_vm.rootTitle}}),_vm._v(\" \"),(_vm.isRoot)?_vm._l((_vm.tagsNames),function(id){return _c('Tag',_vm._b({key:id,attrs:{\"fileid\":id,\"basename\":_vm.tags[id].displayName}},'Tag',_vm.tags[id],false))}):[(_vm.isEmpty)?_c('EmptyContent',{key:\"emptycontent\",attrs:{\"illustration-name\":\"empty\"},scopedSlots:_vm._u([{key:\"desc\",fn:function(){return [_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Photos with tags will show up here'))+\"\\n\\t\\t\\t\")]},proxy:true}],null,false,3269923249)},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('photos', 'No tags yet'))+\"\\n\\t\\t\\t\")]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.fileList),function(file){return _c('File',_vm._b({key:file.fileid,attrs:{\"list\":_vm.fileList}},'File',file,false))})]],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport client from './DavClient'\nimport { genFileInfo } from '../utils/fileUtils'\n\n/**\n * List system tags\n *\n * @param {String} path the path relative to the user root\n * @param {Object} [options] optional options for axios\n * @returns {Array} the file list\n */\nexport default async function(path, options = {}) {\n\tconst response = await client.getDirectoryContents('/systemtags/', Object.assign({}, {\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:id />\n\t\t\t\t\t<oc:display-name />\n\t\t\t\t\t<oc:user-visible />\n\t\t\t\t\t<oc:user-assignable />\n\t\t\t\t\t<oc:can-assign />\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`,\n\t\tdetails: true,\n\t}, options))\n\n\treturn response.data.map(data => genFileInfo(data))\n}\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { genFileInfo } from '../utils/fileUtils'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { props } from './DavRequest'\nimport allowedMimes from './AllowedMimes'\nimport client from './DavClient'\n\n/**\n * Get tagged files based on provided tag id\n *\n * @param {number} id the tag id to filter\n * @param {Object} [options] optional options for axios\n * @returns {Array} the file list\n */\nexport default async function(id, options = {}) {\n\n\toptions = Object.assign({\n\t\tmethod: 'REPORT',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-files\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t\t<oc:filter-rules>\n\t\t\t\t\t<oc:systemtag>${id}</oc:systemtag>\n\t\t\t\t</oc:filter-rules>\n\t\t\t</oc:filter-files>`,\n\t\tdetails: true,\n\t}, options)\n\n\tconst prefixPath = `/files/${getCurrentUser().uid}`\n\tconst response = await client.getDirectoryContents(prefixPath, options)\n\n\treturn response.data\n\t\t.map(data => genFileInfo(data))\n\t\t// filter out unwanted mime because server REPORT service only support\n\t\t// hardcoded props and mime is not one of them\n\t\t// https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php#L274\n\t\t.filter(file => file.mime && allowedMimes.indexOf(file.mime) !== -1)\n\t\t// remove prefix path from full file path\n\t\t.map(data => Object.assign({}, data, { filename: data.filename.replace(prefixPath, '') }))\n}\n","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<FolderTagPreview :id=\"id\"\n\t\ticon=\"icon-tag\"\n\t\t:name=\"displayName\"\n\t\t:path=\"displayName\"\n\t\t:file-list=\"fileList\" />\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getTaggedImages from '../services/TaggedImages'\nimport cancelableRequest from '../utils/CancelableRequest'\nimport FolderTagPreview from './FolderTagPreview'\n\nexport default {\n\tname: 'Tag',\n\n\tcomponents: {\n\t\tFolderTagPreview,\n\t},\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t]),\n\n\t\t// files list of the current folder\n\t\tfolderContent() {\n\t\t\treturn this.tags[this.id].files\n\t\t},\n\t\tfileList() {\n\t\t\treturn this.folderContent\n\t\t\t\t? this.folderContent\n\t\t\t\t\t.map(id => this.files[id])\n\t\t\t\t\t.filter(file => !!file)\n\t\t\t\t\t.slice(0, 4) // only get the 4 first images\n\t\t\t\t: []\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync created() {\n\t\t// init cancellable request\n\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\tthis.cancelRequest = cancel\n\n\t\ttry {\n\t\t\t// get data\n\t\t\tconst files = await request(this.id)\n\t\t\tthis.$store.dispatch('updateTag', { id: this.id, files })\n\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t} catch (error) {\n\t\t\tif (error.response && error.response.status) {\n\t\t\t\tconsole.error('Failed to get folder content', this.id, error.response)\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.cancelRequest = null\n\t\t}\n\t},\n\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=55d2c7c8&\"\nimport script from \"./Tag.vue?vue&type=script&lang=js&\"\nexport * from \"./Tag.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FolderTagPreview',{attrs:{\"id\":_vm.id,\"icon\":\"icon-tag\",\"name\":_vm.displayName,\"path\":_vm.displayName,\"file-list\":_vm.fileList}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<!-- Errors handlers-->\n\t<EmptyContent v-if=\"error\">\n\t\t{{ t('photos', 'An error occurred') }}\n\t</EmptyContent>\n\n\t<!-- Folder content -->\n\t<Grid v-else-if=\"!loading\">\n\t\t<Navigation\n\t\t\tkey=\"navigation\"\n\t\t\t:basename=\"path\"\n\t\t\t:filename=\"'/' + path\"\n\t\t\t:root-title=\"rootTitle\" />\n\n\t\t<!-- Tags list -->\n\t\t<template v-if=\"isRoot\">\n\t\t\t<Tag v-for=\"id in tagsNames\"\n\t\t\t\t:key=\"id\"\n\t\t\t\tv-bind=\"tags[id]\"\n\t\t\t\t:fileid=\"id\"\n\t\t\t\t:basename=\"tags[id].displayName\" />\n\t\t</template>\n\n\t\t<!-- Content list -->\n\t\t<template v-else>\n\t\t\t<EmptyContent v-if=\"isEmpty\" key=\"emptycontent\" illustration-name=\"empty\">\n\t\t\t\t{{ t('photos', 'No tags yet') }}\n\t\t\t\t<template #desc>\n\t\t\t\t\t{{ t('photos', 'Photos with tags will show up here') }}\n\t\t\t\t</template>\n\t\t\t</EmptyContent>\n\n\t\t\t<File v-for=\"file in fileList\"\n\t\t\t\t:key=\"file.fileid\"\n\t\t\t\t:list=\"fileList\"\n\t\t\t\tv-bind=\"file\" />\n\t\t</template>\n\t</Grid>\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getSystemTags from '../services/SystemTags'\nimport getTaggedImages from '../services/TaggedImages'\n\nimport EmptyContent from '../components/EmptyContent'\nimport Tag from '../components/Tag'\nimport File from '../components/File'\nimport Grid from '../components/Grid'\nimport Navigation from '../components/Navigation'\n\nimport cancelableRequest from '../utils/CancelableRequest'\n\nexport default {\n\tname: 'Tags',\n\tcomponents: {\n\t\tEmptyContent,\n\t\tFile,\n\t\tTag,\n\t\tGrid,\n\t\tNavigation,\n\t},\n\tprops: {\n\t\trootTitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tisRoot: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\terror: null,\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t\t'tagsNames',\n\t\t]),\n\n\t\t// current tag id from current path\n\t\ttagId() {\n\t\t\treturn this.$store.getters.tagId(this.path)\n\t\t},\n\n\t\t// current tag\n\t\ttag() {\n\t\t\treturn this.tags[this.tagId]\n\t\t},\n\t\t// files list of the current tag\n\t\tfileList() {\n\t\t\treturn this.tag && this.tag.files\n\t\t\t\t.map(id => this.files[id])\n\t\t\t\t.filter(file => !!file)\n\t\t},\n\n\t\tisEmpty() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn Object.keys(this.tagsNames).length === 0\n\t\t\t}\n\t\t\treturn this.fileList.length === 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tasync path() {\n\t\t\t// if we don't have the tag in the store yet,\n\t\t\t// we need to fetch the list first\n\t\t\tif (!this.tagId) {\n\t\t\t\tawait this.fetchRootContent()\n\t\t\t}\n\n\t\t\t// if we're not in the root, we fetch the data\n\t\t\tif (!this.isRoot) {\n\t\t\t\tthis.fetchContent()\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync beforeMount() {\n\t\t// if we don't have the tag in the store yet,\n\t\t// we need to fetch the list first\n\t\tif (!this.tagId) {\n\t\t\tawait this.fetchRootContent()\n\t\t}\n\n\t\t// if we're not in the root, we fetch the data\n\t\tif (!this.isRoot) {\n\t\t\tthis.fetchContent()\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync fetchRootContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest('Changed folder')\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getSystemTags)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// fetch content\n\t\t\t\tconst tags = await request()\n\t\t\t\tthis.$store.dispatch('updateTags', tags)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\n\t\t},\n\n\t\tasync fetchContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest()\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// get data\n\t\t\t\tconst files = await request(this.tagId)\n\t\t\t\tthis.$store.dispatch('updateTag', { id: this.tagId, files })\n\t\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\t\t},\n\t},\n\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Tags.vue?vue&type=template&id=84b81760&\"\nimport script from \"./Tags.vue?vue&type=script&lang=js&\"\nexport * from \"./Tags.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file