summaryrefslogtreecommitdiffstats
path: root/js/photos-6.js.map
diff options
context:
space:
mode:
authorCorentin Mors <corentin.mors@dashlane.com>2020-10-12 21:19:14 +0200
committerCorentin Mors <corentin.mors@dashlane.com>2020-10-14 18:03:21 +0200
commit3f7ea970e4c1af13a2091bcd367905449b5ef215 (patch)
treecd5372ea89a032f53ed83222fe9fbfbee7c5fec4 /js/photos-6.js.map
parentf84e43ad3b8d5664bc7aaf4e8aab06cbe424c032 (diff)
Implement "your video" tab
Signed-off-by: Corentin Mors <corentin.mors@dashlane.com>
Diffstat (limited to 'js/photos-6.js.map')
-rw-r--r--js/photos-6.js.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/photos-6.js.map b/js/photos-6.js.map
index d02747b0..eb2e6d57 100644
--- a/js/photos-6.js.map
+++ b/js/photos-6.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./src/patchedRequest.js","webpack:///./src/services/DavClient.js","webpack:///./src/services/DavRequest.js","webpack:///./src/views/Tags.vue?8f3b","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","webdav","getPatcher","patch","axios","remote","generateRemoteUrl","client","createClient","parseUrl","pathname","props","path","options","getDirectoryContents","Object","assign","data","details","response","map","genFileInfo","id","prefixPath","getCurrentUser","uid","filter","file","mime","allowedMimes","indexOf","filename","replace","_h","this","$createElement","_self","_c","attrs","displayName","fileList","_vm","_v","_s","t","loading","_e","key","rootTitle","_l","_b","tags","scopedSlots","_u","fn","proxy","fileid"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAsBA,IAAMA,EAAUC,EAAQ,KAElBC,EAA2BF,EAAQ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M,aAAa,CAACd,EAAIC,GAAG,aAAaD,EAAIE,GAAGF,EAAIG,EAAE,SAAU,gBAAgB,gBAAgBH,EAAIK,KAAKL,EAAIC,GAAG,KAAKD,EAAIQ,GAAIR,EAAY,UAAE,SAASd,GAAM,OAAOU,EAAG,OAAOI,EAAIS,GAAG,CAACH,IAAIpB,EAAK6B,OAAOlB,MAAM,CAAC,KAAOG,EAAID,WAAW,OAAOb,GAAK,SAAY,IAAI,KACv/B,ISUpB,EACA,KACA,KACA,MAIa,Y","file":"photos-6.js?v=85c2100644386e694568","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","/**\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","/**\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 (_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('div',[_c('Navigation',{key:\"navigation\",attrs:{\"basename\":_vm.path,\"filename\":'/' + _vm.path,\"root-title\":_vm.rootTitle}}),_vm._v(\" \"),_c('Grid',[(_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\\t\"+_vm._s(_vm.t('photos', 'Photos with tags will show up here'))+\"\\n\\t\\t\\t\\t\")]},proxy:true}],null,false,2298586353)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'No tags yet'))+\"\\n\\t\\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)],1):_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<div 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\t\t<Grid>\n\t\t\t<!-- Tags list -->\n\t\t\t<template v-if=\"isRoot\">\n\t\t\t\t<Tag v-for=\"id in tagsNames\"\n\t\t\t\t\t:key=\"id\"\n\t\t\t\t\tv-bind=\"tags[id]\"\n\t\t\t\t\t:fileid=\"id\"\n\t\t\t\t\t:basename=\"tags[id].displayName\" />\n\t\t\t</template>\n\n\t\t\t<!-- Content list -->\n\t\t\t<template v-else>\n\t\t\t\t<EmptyContent v-if=\"isEmpty\" key=\"emptycontent\" illustration-name=\"empty\">\n\t\t\t\t\t{{ t('photos', 'No tags yet') }}\n\t\t\t\t\t<template #desc>\n\t\t\t\t\t\t{{ t('photos', 'Photos with tags will show up here') }}\n\t\t\t\t\t</template>\n\t\t\t\t</EmptyContent>\n\n\t\t\t\t<File v-for=\"file in fileList\"\n\t\t\t\t\t:key=\"file.fileid\"\n\t\t\t\t\t:list=\"fileList\"\n\t\t\t\t\tv-bind=\"file\" />\n\t\t\t</template>\n\t\t</Grid>\n\t</div>\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=f7bef954&\"\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/services/DavClient.js","webpack:///./src/services/DavRequest.js","webpack:///./src/views/Tags.vue?8f3b","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","webdav","getPatcher","patch","axios","remote","generateRemoteUrl","client","createClient","parseUrl","pathname","props","path","options","getDirectoryContents","Object","assign","data","details","response","map","genFileInfo","id","prefixPath","getCurrentUser","uid","filter","file","mime","allowedMimes","indexOf","filename","replace","_h","this","$createElement","_self","_c","attrs","displayName","fileList","_vm","_v","_s","t","loading","_e","key","rootTitle","_l","_b","tags","scopedSlots","_u","fn","proxy","fileid"],"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,SAIxCC,EAAOC,QAAUT,G,iCC7CjB,kEA4BgBU,IAAOC,aACfC,MAAM,UAAWC,KAGzB,IAAMC,EAASC,4BAAkB,OAC3BC,EAASN,IAAOO,aAAaH,GAETI,IAASJ,GAAQK,SAC5BH,O,iCCpCf;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMI,EAAQ,+KAWC,sPAMRA,EANP,6C,oVChCA,I;;;;;;;;;;;;;;;;;;;;;GCgCe,kBAAf,gC,iDAAe,WAAeC,GAAf,2GAAqBC,EAArB,+BAA+B,GAA/B,SACSN,IAAOO,qBAAqB,eAAgBC,OAAOC,OAAO,GAAI,CACpFC,KAAM,mTAWNC,SAAS,GACPL,IAdW,cACRM,EADQ,yBAgBPA,EAASF,KAAKG,KAAI,SAAAH,GAAI,OAAII,YAAYJ,OAhB/B,4C;;;;;;;;;;;;;;;;;;;;;GCGA,kBAAf,gC,iDAAe,WAAeK,GAAf,6GAAmBT,EAAnB,+BAA6B,GAE3CA,EAAUE,OAAOC,OAAO,CACvBlB,OAAQ,SACRmB,KAAM,6PAAF,OAOCN,IAPD,mFAUeW,EAVf,yEAaJJ,SAAS,GACPL,GAEGU,EApBQ,iBAoBeC,2BAAiBC,KApBhC,SAqBSlB,IAAOO,qBAAqBS,EAAYV,GArBjD,cAqBRM,EArBQ,yBAuBPA,EAASF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eAAeT,MAAM,CAAC,oBAAoB,SAASc,YAAYX,EAAIY,GAAG,CAAC,CAACN,IAAI,OAAOO,GAAG,WAAW,MAAO,CAACb,EAAIC,GAAG,eAAeD,EAAIE,GAAGF,EAAIG,EAAE,SAAU,uCAAuC,gBAAgBW,OAAM,IAAO,MAAK,EAAM,aAAa,CAACd,EAAIC,GAAG,aAAaD,EAAIE,GAAGF,EAAIG,EAAE,SAAU,gBAAgB,gBAAgBH,EAAIK,KAAKL,EAAIC,GAAG,KAAKD,EAAIQ,GAAIR,EAAY,UAAE,SAASd,GAAM,OAAOU,EAAG,OAAOI,EAAIS,GAAG,CAACH,IAAIpB,EAAK6B,OAAOlB,MAAM,CAAC,KAAOG,EAAID,WAAW,OAAOb,GAAK,SAAY,IAAI,KACv/B,ISUpB,EACA,KACA,KACA,MAIa,Y","file":"photos-6.js?v=96680ce8e996a422fba8","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","/**\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","/**\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 (_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('div',[_c('Navigation',{key:\"navigation\",attrs:{\"basename\":_vm.path,\"filename\":'/' + _vm.path,\"root-title\":_vm.rootTitle}}),_vm._v(\" \"),_c('Grid',[(_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\\t\"+_vm._s(_vm.t('photos', 'Photos with tags will show up here'))+\"\\n\\t\\t\\t\\t\")]},proxy:true}],null,false,2298586353)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'No tags yet'))+\"\\n\\t\\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)],1):_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, fil