summaryrefslogtreecommitdiffstats
path: root/js/photos-6.js.map
diff options
context:
space:
mode:
authorCorentin Mors <corentin.mors@dashlane.com>2020-10-13 16:16:11 +0200
committerCorentin Mors <corentin.mors@dashlane.com>2020-10-13 16:16:11 +0200
commit5c2f0f2afdc7c07ab1509a6d844c0767e24ba6c7 (patch)
tree94e08ce159502fbbd097096949bd46764a0156c3 /js/photos-6.js.map
parent1c1dbf7e19070bff7fbcd04876254311cc425227 (diff)
Readd timeline caching
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 ff60c7ee..2c8b6ac0 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,EAAQG,s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AAa,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=762f09479b8bf9286617","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,"file":"photos-6.js?v=38a8c65bb96fc35410e6","sources":["webpack:///./src/components/Tag.vue?5bd8","webpack:///./src/views/Tags.vue?0f03","webpack:///./src/components/Tag.vue?b6fd","webpack:///./src/views/Tags.vue?f755","webpack:///./src/components/Tag.vue","webpack:///./src/components/Tag.vue?63b5","webpack:///./src/components/Tag.vue?ee18","webpack:///./src/patchedRequest.js","webpack:///./src/services/DavClient.js","webpack:///./src/services/DavRequest.js","webpack:///./src/services/SystemTags.js","webpack:///./src/services/TaggedImages.js","webpack:///./src/views/Tags.vue","webpack:///./src/views/Tags.vue?963b","webpack:///./src/views/Tags.vue?4a43"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport getTaggedImages from '../services/TaggedImages';\nimport cancelableRequest from '../utils/CancelableRequest';\nimport FolderTagPreview from './FolderTagPreview';\nexport default {\n name: 'Tag',\n components: {\n FolderTagPreview: FolderTagPreview\n },\n inheritAttrs: false,\n props: {\n displayName: {\n type: String,\n required: true\n },\n id: {\n type: Number,\n required: true\n }\n },\n data: function data() {\n return {\n cancelRequest: null\n };\n },\n computed: _objectSpread(_objectSpread({}, mapGetters(['files', 'tags'])), {}, {\n // files list of the current folder\n folderContent: function folderContent() {\n return this.tags[this.id].files;\n },\n fileList: function fileList() {\n var _this = this;\n\n return this.folderContent ? this.folderContent.map(function (id) {\n return _this.files[id];\n }).filter(function (file) {\n return !!file;\n }).slice(0, 4) // only get the 4 first images\n : [];\n }\n }),\n beforeDestroy: function beforeDestroy() {\n // cancel any pending requests\n if (this.cancelRequest) {\n this.cancelRequest('Navigated away');\n }\n },\n created: function created() {\n var _this2 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var _cancelableRequest, request, cancel, files;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // init cancellable request\n _cancelableRequest = cancelableRequest(getTaggedImages), request = _cancelableRequest.request, cancel = _cancelableRequest.cancel;\n _this2.cancelRequest = cancel;\n _context.prev = 2;\n _context.next = 5;\n return request(_this2.id);\n\n case 5:\n files = _context.sent;\n\n _this2.$store.dispatch('updateTag', {\n id: _this2.id,\n files: files\n });\n\n _this2.$store.dispatch('appendFiles', files);\n\n _context.next = 13;\n break;\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context[\"catch\"](2);\n\n if (_context.t0.response && _context.t0.response.status) {\n console.error('Failed to get folder content', _this2.id, _context.t0.response);\n }\n\n case 13:\n _context.prev = 13;\n _this2.cancelRequest = null;\n return _context.finish(13);\n\n case 16:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[2, 10, 13, 16]]);\n }))();\n }\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport getSystemTags from '../services/SystemTags';\nimport getTaggedImages from '../services/TaggedImages';\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';\nimport cancelableRequest from '../utils/CancelableRequest';\nexport default {\n name: 'Tags',\n components: {\n EmptyContent: EmptyContent,\n File: File,\n Tag: Tag,\n Grid: Grid,\n Navigation: Navigation\n },\n props: {\n rootTitle: {\n type: String,\n required: true\n },\n path: {\n type: String,\n default: ''\n },\n loading: {\n type: Boolean,\n required: true\n },\n isRoot: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n error: null,\n cancelRequest: null\n };\n },\n computed: _objectSpread(_objectSpread({}, mapGetters(['files', 'tags', 'tagsNames'])), {}, {\n // current tag id from current path\n tagId: function tagId() {\n return this.$store.getters.tagId(this.path);\n },\n // current tag\n tag: function tag() {\n return this.tags[this.tagId];\n },\n // files list of the current tag\n fileList: function fileList() {\n var _this = this;\n\n return this.tag && this.tag.files.map(function (id) {\n return _this.files[id];\n }).filter(function (file) {\n return !!file;\n });\n },\n isEmpty: function isEmpty() {\n if (this.isRoot) {\n return Object.keys(this.tagsNames).length === 0;\n }\n\n return this.fileList.length === 0;\n }\n }),\n watch: {\n path: function path() {\n var _this2 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (_this2.tagId) {\n _context.next = 3;\n break;\n }\n\n _context.next = 3;\n return _this2.fetchRootContent();\n\n case 3:\n // if we're not in the root, we fetch the data\n if (!_this2.isRoot) {\n _this2.fetchContent();\n }\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n }\n },\n beforeDestroy: function beforeDestroy() {\n // cancel any pending requests\n if (this.cancelRequest) {\n this.cancelRequest('Navigated away');\n }\n },\n beforeMount: function beforeMount() {\n var _this3 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (_this3.tagId) {\n _context2.next = 3;\n break;\n }\n\n _context2.next = 3;\n return _this3.fetchRootContent();\n\n case 3:\n // if we're not in the root, we fetch the data\n if (!_this3.isRoot) {\n _this3.fetchContent();\n }\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }))();\n },\n methods: {\n fetchRootContent: function fetchRootContent() {\n var _this4 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var _cancelableRequest, request, cancel, tags;\n\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n // cancel any pending requests\n if (_this4.cancelRequest) {\n _this4.cancelRequest('Changed folder');\n } // close any potential opened viewer\n\n\n OCA.Viewer.close(); // if we don't already have some cached data let's show a loader\n\n if (!_this4.tags[_this4.tagId]) {\n _this4.$emit('update:loading', true);\n }\n\n _this4.error = null; // init cancellable request\n\n _cancelableRequest = cancelableRequest(getSystemTags), request = _cancelableRequest.request, cancel = _cancelableRequest.cancel;\n _this4.cancelRequest = cancel;\n _context3.prev = 6;\n _context3.next = 9;\n return request();\n\n case 9:\n tags = _context3.sent;\n\n _this4.$store.dispatch('updateTags', tags);\n\n _context3.next = 17;\n break;\n\n case 13:\n _context3.prev = 13;\n _context3.t0 = _context3[\"catch\"](6);\n console.error(_context3.t0);\n _this4.error = true;\n\n case 17:\n _context3.prev = 17;\n\n // done loading\n _this4.$emit('update:loading', false);\n\n _this4.cancelRequest = null;\n return _context3.finish(17);\n\n case 21:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[6, 13, 17, 21]]);\n }))();\n },\n fetchContent: function fetchContent() {\n var _this5 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var _cancelableRequest2, request, cancel, files;\n\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n // cancel any pending requests\n if (_this5.cancelRequest) {\n _this5.cancelRequest();\n } // close any potential opened viewer\n\n\n OCA.Viewer.close(); // if we don't already have some cached data let's show a loader\n\n if (!_this5.tags[_this5.tagId]) {\n _this5.$emit('update:loading', true);\n }\n\n _this5.error = null; // init cancellable request\n\n _cancelableRequest2 = cancelableRequest(getTaggedImages), request = _cancelableRequest2.request, cancel = _cancelableRequest2.cancel;\n _this5.cancelRequest = cancel;\n _context4.prev = 6;\n _context4.next = 9;\n return request(_this5.tagId);\n\n case 9:\n files = _context4.sent;\n\n _this5.$store.dispatch('updateTag', {\n id: _this5.tagId,\n files: files\n });\n\n _this5.$store.dispatch('appendFiles', files);\n\n _context4.next = 18;\n break;\n\n case 14:\n _context4.prev = 14;\n _context4.t0 = _context4[\"catch\"](6);\n console.error(_context4.t0);\n _this5.error = true;\n\n case 18:\n _context4.prev = 18;\n\n // done loading\n _this5.$emit('update:loading', false);\n\n _this5.cancelRequest = null;\n return _context4.finish(18);\n\n case 22:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, null, [[6, 14, 18, 22]]);\n }))();\n }\n }\n};","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"FolderTagPreview\", {\n attrs: {\n id: _vm.id,\n icon: \"icon-tag\",\n name: _vm.displayName,\n path: _vm.displayName,\n \"file-list\": _vm.fileList\n }\n })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _vm.error\n ? _c(\"EmptyContent\", [\n _vm._v(\"\\n\\t\" + _vm._s(_vm.t(\"photos\", \"An error occurred\")) + \"\\n\")\n ])\n : !_vm.loading\n ? _c(\n \"div\",\n [\n _c(\"Navigation\", {\n key: \"navigation\",\n attrs: {\n basename: _vm.path,\n filename: \"/\" + _vm.path,\n \"root-title\": _vm.rootTitle\n }\n }),\n _vm._v(\" \"),\n _c(\n \"Grid\",\n [\n _vm.isRoot\n ? _vm._l(_vm.tagsNames, function(id) {\n return _c(\n \"Tag\",\n _vm._b(\n {\n key: id,\n attrs: {\n fileid: id,\n basename: _vm.tags[id].displayName\n }\n },\n \"Tag\",\n _vm.tags[id],\n false\n )\n )\n })\n : [\n _vm.isEmpty\n ? _c(\n \"EmptyContent\",\n {\n key: \"emptycontent\",\n attrs: { \"illustration-name\": \"empty\" },\n scopedSlots: _vm._u(\n [\n {\n key: \"desc\",\n fn: function() {\n