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

photos.6.js.map « js - github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 403338874ffd2948091429f0ce56aba337b91c91 (plain)
1
{"version":3,"sources":["webpack:///./src/components/FolderTagPreview.vue?9cd5","webpack:///./src/components/FolderTagPreview.vue?13f2","webpack:///./src/components/FolderTagPreview.vue?a676","webpack:///./src/components/Folder.vue?a77c","webpack:///./src/components/FolderTagPreview.vue?737d","webpack:///./src/components/FolderTagPreview.vue?c186","webpack:///src/components/FolderTagPreview.vue","webpack:///./src/components/FolderTagPreview.vue","webpack:///./src/components/Folder.vue?4216","webpack:///./src/components/Folder.vue?dcdb","webpack:///./src/views/Albums.vue?edf5","webpack:///./src/services/AlbumContent.js","webpack:///src/components/Folder.vue","webpack:///./src/components/Folder.vue?f12b","webpack:///./src/components/Folder.vue","webpack:///./src/components/Folder.vue?176a","webpack:///src/views/Albums.vue","webpack:///./src/views/Albums.vue?01c6","webpack:///./src/views/Albums.vue"],"names":["content","module","i","locals","exports","add","default","___CSS_LOADER_API_IMPORT___","push","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","prefixPath","generateUrl","shared","axios","get","encodeFilePath","response","list","data","map","genFileInfo","folder","folders","files","entry","filename","type","allowedMimes","indexOf","mime","basename","fileList","error","t","loading","_e","_b","rootTitle","dir","showShared"],"mappings":"6EAGA,IAAIA,EAAU,EAAQ,KACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACC,EAAOC,EAAIF,EAAS,MAC7DA,EAAQG,SAAQF,EAAOG,QAAUJ,EAAQG,SAG/BE,EADH,EAAQ,KAA+DC,SAChE,WAAYN,GAAS,EAAM,K,iCCR5C,oBAA+a,G,qBCE/aI,EADkC,EAAQ,IAChCG,EAA4B,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cAAcT,EAAI8D,aAAa,SAASD,GAAI,OAAU7D,EAAI2B,GAAG,KAAK3B,EAAIkB,GAAIlB,EAAY,UAAE,SAASmB,GAAM,OAAOf,EAAG,OAAOJ,EAAI2D,GAAG,CAACvC,IAAID,EAAKE,OAAOZ,MAAM,CAAC,KAAOT,EAAIsD,WAAW,OAAOnC,GAAK,SAAY,KACl8B,IQUpB,EACA,KACA,KACA,MAIa,Y","file":"photos.6.js?v=83b3298799b5f2528327","sourcesContent":["// 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, {});","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","// 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!./Folder.vue?vue&type=style&index=0&id=4b85e8d1&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(\"388d73e2\", content, true, {});","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","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!./Folder.vue?vue&type=style&index=0&id=4b85e8d1&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!./Folder.vue?vue&type=style&index=0&id=4b85e8d1&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-4b85e8d1],.folder[data-v-4b85e8d1]{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-4b85e8d1],.folder .cover[data-v-4b85e8d1]{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-4b85e8d1],.file:active .cover[data-v-4b85e8d1],.file:hover .cover[data-v-4b85e8d1],.file:focus .cover[data-v-4b85e8d1],.folder.active .cover[data-v-4b85e8d1],.folder:active .cover[data-v-4b85e8d1],.folder:hover .cover[data-v-4b85e8d1],.folder:focus .cover[data-v-4b85e8d1]{opacity:.3}.file--clear.active .cover[data-v-4b85e8d1],.file--clear:active .cover[data-v-4b85e8d1],.file--clear:hover .cover[data-v-4b85e8d1],.file--clear:focus .cover[data-v-4b85e8d1],.folder--clear.active .cover[data-v-4b85e8d1],.folder--clear:active .cover[data-v-4b85e8d1],.folder--clear:hover .cover[data-v-4b85e8d1],.folder--clear:focus .cover[data-v-4b85e8d1]{opacity:.1}.fade-enter-active[data-v-4b85e8d1],.fade-leave-active[data-v-4b85e8d1]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-4b85e8d1],.fade-leave-to[data-v-4b85e8d1]{opacity:0}.folder-content[data-v-4b85e8d1]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-4b85e8d1]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-4b85e8d1]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-4b85e8d1]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-4b85e8d1]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-4b85e8d1]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-4b85e8d1]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.folder-name[data-v-4b85e8d1]{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-4b85e8d1]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-4b85e8d1]{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-4b85e8d1]{opacity:.3}.folder--clear .folder-name__name[data-v-4b85e8d1]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-4b85e8d1]{opacity:.3}.folder:not(.folder--clear).active .folder-name[data-v-4b85e8d1],.folder:not(.folder--clear).active .cover[data-v-4b85e8d1],.folder:not(.folder--clear):active .folder-name[data-v-4b85e8d1],.folder:not(.folder--clear):active .cover[data-v-4b85e8d1],.folder:not(.folder--clear):hover .folder-name[data-v-4b85e8d1],.folder:not(.folder--clear):hover .cover[data-v-4b85e8d1],.folder:not(.folder--clear):focus .folder-name[data-v-4b85e8d1],.folder:not(.folder--clear):focus .cover[data-v-4b85e8d1]{opacity:0}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error === 404)?_c('EmptyContent',{attrs:{\"illustration-name\":\"folder\"}},[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'This folder does not exists'))+\"\\n\")]):(_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('Grid',[(_vm.folder)?_c('Navigation',_vm._b({key:\"navigation\",attrs:{\"root-title\":_vm.rootTitle,\"show-actions\":true}},'Navigation',_vm.folder,false)):_vm._e(),_vm._v(\" \"),(_vm.isEmpty)?_c('EmptyContent',{key:\"emptycontent\",attrs:{\"illustration-name\":\"empty\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'No photos in here'))+\"\\n\\t\")]):[_vm._l((_vm.folderList),function(dir){return _c('Folder',_vm._b({key:dir.fileid,attrs:{\"show-shared\":_vm.showShared}},'Folder',dir,false))}),_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 axios from '@nextcloud/axios'\nimport { generateUrl } from '@nextcloud/router'\nimport { genFileInfo, encodeFilePath } from '../utils/fileUtils'\nimport allowedMimes from './AllowedMimes'\n\n/**\n * List files from a folder and filter out unwanted mimes\n *\n * @param {String} path the path relative to the user root\n * @param {Object} [options] optional options for axios\n * @param {boolean} [shared] fetch shared albums ?\n * @returns {Array} the file list\n */\nexport default async function(path = '/', options = {}) {\n\tconst prefixPath = generateUrl(`/apps/photos/api/v1/${options.shared ? 'shared' : 'albums'}`)\n\n\t// fetch listing\n\tconst response = await axios.get(prefixPath + encodeFilePath(path), options)\n\tconst list = response.data.map(data => genFileInfo(data))\n\n\t// filter all the files and folders\n\tlet folder = {}\n\tconst folders = []\n\tconst files = []\n\n\tfor (const entry of list) {\n\t\t// is this the current provided path ?\n\t\tif (entry.filename === path) {\n\t\t\tfolder = entry\n\t\t} else if (entry.type !== 'file') {\n\t\t\tfolders.push(entry)\n\t\t} else if (allowedMimes.indexOf(entry.mime) > -1) {\n\t\t\tfiles.push(entry)\n\t\t}\n\t}\n\n\t// return current folder, subfolders and files\n\treturn { folder, folders, files }\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=\"fileid\"\n\t\t:name=\"basename\"\n\t\t:path=\"filename\"\n\t\t:file-list=\"fileList\" />\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getAlbumContent from '../services/AlbumContent'\nimport cancelableRequest from '../utils/CancelableRequest'\nimport FolderTagPreview from './FolderTagPreview'\n\nexport default {\n\tname: 'Folder',\n\n\tcomponents: {\n\t\tFolderTagPreview,\n\t},\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tbasename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: Number,\n\t\t\trequired: true,\n\t\t},\n\t\tshowShared: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\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'folders',\n\t\t]),\n\n\t\t// files list of the current folder\n\t\tfolderContent() {\n\t\t\treturn this.folders[this.fileid]\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\tasync created() {\n\t\t// init cancellable request\n\t\tconst { request, cancel } = cancelableRequest(getAlbumContent)\n\t\tthis.cancelRequest = cancel\n\n\t\ttry {\n\t\t\t// get data\n\t\t\tconst { folder, folders, files } = await request(this.filename, { shared: this.showShared })\n\t\t\tthis.$store.dispatch('updateFolders', { fileid: folder.fileid, files, folders })\n\t\t\tthis.$store.dispatch('updateFiles', { folder, files, folders })\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.folder, error.response)\n\t\t\t}\n\t\t\t// else we just cancelled the request\n\t\t} finally {\n\t\t\tthis.cancelRequest = null\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</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&: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 mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Folder.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!./Folder.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Folder.vue?vue&type=template&id=4b85e8d1&scoped=true&\"\nimport script from \"./Folder.vue?vue&type=script&lang=js&\"\nexport * from \"./Folder.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Folder.vue?vue&type=style&index=0&id=4b85e8d1&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  \"4b85e8d1\",\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.fileid,\"name\":_vm.basename,\"path\":_vm.filename,\"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 === 404\" illustration-name=\"folder\">\n\t\t{{ t('photos', 'This folder does not exists') }}\n\t</EmptyContent>\n\t<EmptyContent v-else-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 v-if=\"folder\"\n\t\t\tkey=\"navigation\"\n\t\t\tv-bind=\"folder\"\n\t\t\t:root-title=\"rootTitle\"\n\t\t\t:show-actions=\"true\" />\n\n\t\t<!-- Empty folder, should only happen via direct link -->\n\t\t<EmptyContent v-if=\"isEmpty\" key=\"emptycontent\" illustration-name=\"empty\">\n\t\t\t{{ t('photos', 'No photos in here') }}\n\t\t</EmptyContent>\n\n\t\t<!-- Folders and files list -->\n\t\t<template v-else>\n\t\t\t<Folder v-for=\"dir in folderList\"\n\t\t\t\t:key=\"dir.fileid\"\n\t\t\t\tv-bind=\"dir\"\n\t\t\t\t:show-shared=\"showShared\" />\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 getAlbumContent from '../services/AlbumContent'\n\nimport EmptyContent from '../components/EmptyContent'\nimport Folder from '../components/Folder'\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: 'Albums',\n\tcomponents: {\n\t\tEmptyContent,\n\t\tFile,\n\t\tFolder,\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\tshowShared: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\terror: null,\n\t\t\tcancelRequest: () => {},\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'folders',\n\t\t]),\n\n\t\t// current folder id from current path\n\t\tfolderId() {\n\t\t\treturn this.$store.getters.folderId(this.path)\n\t\t},\n\n\t\t// files list of the current folder\n\t\tfolder() {\n\t\t\treturn this.files[this.folderId]\n\t\t},\n\t\tfolderContent() {\n\t\t\treturn this.folders[this.folderId]\n\t\t},\n\t\tfileList() {\n\t\t\tconst list = 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\treturn list\n\t\t},\n\n\t\t// subfolders of the current folder\n\t\tsubFolders() {\n\t\t\treturn this.folderId\n\t\t\t\t&& this.files[this.folderId]\n\t\t\t\t&& this.files[this.folderId].folders\n\t\t},\n\t\tfolderList() {\n\t\t\tconst list = this.subFolders\n\t\t\t\t&& this.subFolders\n\t\t\t\t\t.map(id => this.files[id])\n\t\t\t\t\t.filter(file => !!file)\n\t\t\treturn list\n\t\t},\n\n\t\t// is current folder empty?\n\t\tisEmpty() {\n\t\t\treturn !this.haveFiles && !this.haveFolders\n\t\t},\n\t\thaveFiles() {\n\t\t\treturn !!this.fileList && this.fileList.length !== 0\n\t\t},\n\t\thaveFolders() {\n\t\t\treturn !!this.folderList && this.folderList.length !== 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tpath() {\n\t\t\tthis.fetchFolderContent()\n\t\t},\n\t\tshowShared() {\n\t\t\tthis.fetchFolderContent()\n\t\t},\n\t},\n\n\tasync beforeMount() {\n\t\tthis.fetchFolderContent()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.cancelRequest('Changed view')\n\t},\n\n\tmethods: {\n\t\tasync fetchFolderContent() {\n\t\t\t// cancel any pending requests\n\t\t\tthis.cancelRequest('Changed folder')\n\n\t\t\t// close any potential opened viewer & sidebar\n\t\t\tOCA.Viewer && OCA.Viewer.close && OCA.Viewer.close()\n\t\t\tOCA.Files && OCA.Files.Sidebar.close && OCA.Files.Sidebar.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.files[this.folderId]) {\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(getAlbumContent)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// get content and current folder info\n\t\t\t\tconst { folder, folders, files } = await request(this.path, { shared: this.showShared })\n\t\t\t\tthis.$store.dispatch('addPath', { path: this.path, fileid: folder.fileid })\n\t\t\t\tthis.$store.dispatch('updateFolders', { fileid: folder.fileid, files, folders })\n\t\t\t\tthis.$store.dispatch('updateFiles', { folder, files, folders })\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response && error.response.status) {\n\t\t\t\t\tif (error.response.status === 404) {\n\t\t\t\t\t\tthis.error = 404\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tthis.$router.push({ name: this.$route.name })\n\t\t\t\t\t\t}, 3000)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.error = error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// cancelled request, moving on...\n\t\t\t\tconsole.error('Error fetching album data', error)\n\t\t\t} finally {\n\t\t\t\t// done loading even with errors\n\t\t\t\tthis.$emit('update:loading', false)\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!./Albums.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!./Albums.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Albums.vue?vue&type=template&id=fc4a64d2&\"\nimport script from \"./Albums.vue?vue&type=script&lang=js&\"\nexport * from \"./Albums.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":""}