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

photos-7.js « js - github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d0a43da89ebbbb08d8d31e6785503042c146f7bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{274:function(n,e,t){"use strict";var r=t(94),i=t.n(r)()(!0);i.push([n.i,".file[data-v-72c8239b],.folder[data-v-72c8239b]{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;border-radius:var(--border-radius);overflow:hidden}.file .cover[data-v-72c8239b],.folder .cover[data-v-72c8239b]{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-72c8239b],.file:active .cover[data-v-72c8239b],.file:hover .cover[data-v-72c8239b],.file:focus .cover[data-v-72c8239b],.folder.active .cover[data-v-72c8239b],.folder:active .cover[data-v-72c8239b],.folder:hover .cover[data-v-72c8239b],.folder:focus .cover[data-v-72c8239b]{opacity:.3}.file--clear.active .cover[data-v-72c8239b],.file--clear:active .cover[data-v-72c8239b],.file--clear:hover .cover[data-v-72c8239b],.file--clear:focus .cover[data-v-72c8239b],.folder--clear.active .cover[data-v-72c8239b],.folder--clear:active .cover[data-v-72c8239b],.folder--clear:hover .cover[data-v-72c8239b],.folder--clear:focus .cover[data-v-72c8239b]{opacity:.1}.fade-enter-active[data-v-72c8239b],.fade-leave-active[data-v-72c8239b]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-72c8239b],.fade-leave-to[data-v-72c8239b]{opacity:0}.folder-content[data-v-72c8239b]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-72c8239b]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-72c8239b]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-72c8239b]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-72c8239b]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-72c8239b]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-72c8239b]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.folder-name[data-v-72c8239b]{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-72c8239b]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-72c8239b]{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-72c8239b]{opacity:.3}.folder--clear .folder-name__name[data-v-72c8239b]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-72c8239b]{opacity:.3}.folder:not(.folder--clear):active .folder-name[data-v-72c8239b],.folder:not(.folder--clear):active .cover[data-v-72c8239b],.folder:not(.folder--clear):hover .folder-name[data-v-72c8239b],.folder:not(.folder--clear):hover .cover[data-v-72c8239b],.folder:not(.folder--clear):focus .folder-name[data-v-72c8239b],.folder:not(.folder--clear):focus .cover[data-v-72c8239b]{opacity:0}\n","",{version:3,sources:["webpack://src/mixins/FileFolder.scss","webpack://src/components/FolderTagPreview.vue"],names:[],mappings:"AAsBA,gDAEC,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,kCAAmC,CACnC,eAAgB,CARjB,8DAWE,SAAU,CAMV,UAAW,CACX,mBAAoB,CACpB,qDAAsD,CACtD,SAAU,CACV,uCAAwC,CArB1C,4SA6BG,UAAW,CACX,oWAQA,UAAW,CACX,wEAKF,qDAAsD,CACtD,6DAGA,SAAU,CCgFX,iCACC,iBAAkB,CAClB,YAAa,CACb,UAAW,CACX,WAAY,CAEZ,yCACC,yBAA0B,CAC1B,sBAAuB,CACvB,yCAEA,yBAA0B,CAC1B,0BAA2B,CAC3B,yCAEA,6BAA8B,CAC9B,0BAA2B,CAF3B,yDAIC,kBAAmB,CACnB,yCAGD,6BAA8B,CAC9B,0BAA2B,CAvB7B,qCA0BE,UAAW,CACX,WAAY,CAEZ,mBAAY,CAAZ,gBAAiB,CACjB,8BAMD,iBAAkB,CAClB,SAAU,CACV,YAAa,CACb,eAAgB,CAChB,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,qDAAsD,CACtD,SAAU,CACV,oCACC,UAAW,CACX,+BAA2C,CAC3C,mBAAoB,CACpB,oCAEA,eAAgB,CAChB,WAnBgB,CAoBhB,cAAe,CACf,iBAAkB,CAClB,kBAAmB,CACnB,sBAAuB,CACvB,kCAAmC,CACnC,0CAA2C,CAC3C,cA1BgB,CA2BhB,gBA3BgB,CA4BhB,mDAQC,UAAW,CAFZ,mDAKC,4BAA6B,CAC7B,gDAAiD,CARpD,oDAiBG,UAAW,CAjBd,gXA2BI,SAAU",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\n.file,\n.folder {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tuser-select: none;\n\tborder-radius: var(--border-radius);\n\toverflow: hidden;\n\n\t.cover {\n\t\tz-index: 2;\n\t\t// We want nice squares despite anything that is in it.\n\t\t// The .cover is what makes the exact square size of the grid.\n\t\t// We use padding-bottom because padding with percentage\n\t\t// always refers to the width. And we only want to fit\n\t\t// the css grid's width.\n\t\twidth: 100%;\n\t\tpadding-bottom: 100%;\n\t\ttransition: opacity var(--animation-quick) ease-in-out;\n\t\topacity: 0;\n\t\tbackground-color: var(--color-main-text);\n\t}\n\n\t&.active,\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&--clear.active,\n\t&--clear:active,\n\t&--clear:hover,\n\t&--clear:focus {\n\t\t.cover {\n\t\t\topacity: .1;\n\t\t}\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity var(--animation-quick) ease-in-out;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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"],sourceRoot:""}]),e.a=i},304:function(n,e,r){"use strict";var i=r(13),o={name:"FolderTagPreview",props:{icon:{type:String,default:"icon-folder"},id:{type:Number,required:!0},name:{type:String,required:!0},path:{type:String,required:!0},fileList:{type:Array,default:function(){return[]}}},data:function(){return{loaded:!1,failed:[]}},computed:{isEmpty:function(){return 0===this.previewList.length},ariaUuid:function(){return"folder-".concat(this.id)},ariaLabel:function(){return t("photos",'Open the "{name}" sub-directory',{name:this.name})},previewList:function(){var n=this;return this.fileList.filter((function(e){return-1===n.failed.indexOf(e.fileid)}))},to:function(){var n=/^\/?(.+)/i.exec(this.path)[1];return Object.assign({},this.$route,{params:{path:n.split("/")}})}},methods:{generateImgSrc:function(n){var e=n.fileid,t=n.etag;return Object(i.generateUrl)("/core/preview?fileId=".concat(e,"&x=",256,"&y=",256,"&a=true&v=").concat(t))},onPreviewFail:function(n){var e=n.fileid;this.failed.push(e)}}},a=r(93),c=r.n(a),d=r(274),l={insert:"head",singleton:!1},s=(c()(d.a,l),d.a.locals,r(43)),f=Object(s.a)(o,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("router-link",{staticClass:"folder",class:{"folder--clear":n.isEmpty},attrs:{to:n.to,"aria-label":n.ariaLabel}},[t("transition",{attrs:{name:"fade"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:n.loaded,expression:"loaded"}],staticClass:"folder-content",class:"folder-content--grid-"+n.previewList.length,attrs:{role:"none"}},n._l(n.previewList,(function(e){return t("img",{key:e.fileid,attrs:{src:n.generateImgSrc(e),alt:""},on:{load:function(e){n.loaded=!0},error:function(t){return n.onPreviewFail(e)}}})})),0)]),n._v(" "),t("div",{staticClass:"folder-name"},[t("span",{staticClass:"folder-name__icon",class:[n.isEmpty?"icon-dark":"icon-white",n.icon],attrs:{role:"img"}}),n._v(" "),t("p",{staticClass:"folder-name__name",attrs:{id:n.ariaUuid}},[n._v("\n\t\t\t"+n._s(n.name)+"\n\t\t")])]),n._v(" "),t("div",{staticClass:"cover",attrs:{role:"none"}})],1)}),[],!1,null,"72c8239b",null);e.a=f.exports},529:function(n,e,t){"use strict";var r=t(94),i=t.n(r)()(!0);i.push([n.i,".file[data-v-95e00322],.folder[data-v-95e00322]{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;border-radius:var(--border-radius);overflow:hidden}.file .cover[data-v-95e00322],.folder .cover[data-v-95e00322]{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-95e00322],.file:active .cover[data-v-95e00322],.file:hover .cover[data-v-95e00322],.file:focus .cover[data-v-95e00322],.folder.active .cover[data-v-95e00322],.folder:active .cover[data-v-95e00322],.folder:hover .cover[data-v-95e00322],.folder:focus .cover[data-v-95e00322]{opacity:.3}.file--clear.active .cover[data-v-95e00322],.file--clear:active .cover[data-v-95e00322],.file--clear:hover .cover[data-v-95e00322],.file--clear:focus .cover[data-v-95e00322],.folder--clear.active .cover[data-v-95e00322],.folder--clear:active .cover[data-v-95e00322],.folder--clear:hover .cover[data-v-95e00322],.folder--clear:focus .cover[data-v-95e00322]{opacity:.1}.fade-enter-active[data-v-95e00322],.fade-leave-active[data-v-95e00322]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-95e00322],.fade-leave-to[data-v-95e00322]{opacity:0}.folder-content[data-v-95e00322]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-95e00322]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-95e00322]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-95e00322]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-95e00322]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-95e00322]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-95e00322]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.folder-name[data-v-95e00322]{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-95e00322]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-95e00322]{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-95e00322]{opacity:.3}.folder--clear .folder-name__name[data-v-95e00322]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-95e00322]{opacity:.3}.folder:not(.folder--clear).active .folder-name[data-v-95e00322],.folder:not(.folder--clear).active .cover[data-v-95e00322],.folder:not(.folder--clear):active .folder-name[data-v-95e00322],.folder:not(.folder--clear):active .cover[data-v-95e00322],.folder:not(.folder--clear):hover .folder-name[data-v-95e00322],.folder:not(.folder--clear):hover .cover[data-v-95e00322],.folder:not(.folder--clear):focus .folder-name[data-v-95e00322],.folder:not(.folder--clear):focus .cover[data-v-95e00322]{opacity:0}\n","",{version:3,sources:["webpack://src/mixins/FileFolder.scss","webpack://src/components/Folder.vue"],names:[],mappings:"AAsBA,gDAEC,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,kCAAmC,CACnC,eAAgB,CARjB,8DAWE,SAAU,CAMV,UAAW,CACX,mBAAoB,CACpB,qDAAsD,CACtD,SAAU,CACV,uCAAwC,CArB1C,4SA6BG,UAAW,CACX,oWAQA,UAAW,CACX,wEAKF,qDAAsD,CACtD,6DAGA,SAAU,CCuEX,iCACC,iBAAkB,CAClB,YAAa,CACb,UAAW,CACX,WAAY,CAEZ,yCACC,yBAA0B,CAC1B,sBAAuB,CACvB,yCAEA,yBAA0B,CAC1B,0BAA2B,CAC3B,yCAEA,6BAA8B,CAC9B,0BAA2B,CAF3B,yDAIC,kBAAmB,CACnB,yCAGD,6BAA8B,CAC9B,0BAA2B,CAvB7B,qCA0BE,UAAW,CACX,WAAY,CAEZ,mBAAY,CAAZ,gBAAiB,CACjB,8BAMD,iBAAkB,CAClB,SAAU,CACV,YAAa,CACb,eAAgB,CAChB,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,qDAAsD,CACtD,SAAU,CACV,oCACC,UAAW,CACX,+BAA2C,CAC3C,mBAAoB,CACpB,oCAEA,eAAgB,CAChB,WAnBgB,CAoBhB,cAAe,CACf,iBAAkB,CAClB,kBAAmB,CACnB,sBAAuB,CACvB,kCAAmC,CACnC,0CAA2C,CAC3C,cA1BgB,CA2BhB,gBA3BgB,CA4BhB,mDAQC,UAAW,CAFZ,mDAKC,4BAA6B,CAC7B,gDAAiD,CARpD,oDAiBG,UAAW,CAjBd,4eA4BI,SAAU",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\n.file,\n.folder {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tuser-select: none;\n\tborder-radius: var(--border-radius);\n\toverflow: hidden;\n\n\t.cover {\n\t\tz-index: 2;\n\t\t// We want nice squares despite anything that is in it.\n\t\t// The .cover is what makes the exact square size of the grid.\n\t\t// We use padding-bottom because padding with percentage\n\t\t// always refers to the width. And we only want to fit\n\t\t// the css grid's width.\n\t\twidth: 100%;\n\t\tpadding-bottom: 100%;\n\t\ttransition: opacity var(--animation-quick) ease-in-out;\n\t\topacity: 0;\n\t\tbackground-color: var(--color-main-text);\n\t}\n\n\t&.active,\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&--clear.active,\n\t&--clear:active,\n\t&--clear:hover,\n\t&--clear:focus {\n\t\t.cover {\n\t\t\topacity: .1;\n\t\t}\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity var(--animation-quick) ease-in-out;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\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\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\n\n\n\n\n\n\n\n\n\n\n\n\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"],sourceRoot:""}]),e.a=i},534:function(n,e,t){"use strict";var r=t(94),i=t.n(r)()(!0);i.push([n.i,"@media (min-width: 0px) and (max-width: 400px){.grid-container[data-v-1dcce9f0]{padding:66px 8px 256px 8px}}@media (min-width: 400px) and (max-width: 700px){.grid-container[data-v-1dcce9f0]{padding:66px 8px 256px 8px}}@media (min-width: 700px) and (max-width: 1024px){.grid-container[data-v-1dcce9f0]{padding:66px 44px 256px 44px}}@media (min-width: 1024px) and (max-width: 1280px){.grid-container[data-v-1dcce9f0]{padding:66px 44px 256px 44px}}@media (min-width: 1280px) and (max-width: 1440px){.grid-container[data-v-1dcce9f0]{padding:88px 66px 256px 66px}}@media (min-width: 1440px) and (max-width: 1600px){.grid-container[data-v-1dcce9f0]{padding:88px 66px 256px 66px}}@media (min-width: 1600px) and (max-width: 2048px){.grid-container[data-v-1dcce9f0]{padding:88px 66px 256px 66px}}@media (min-width: 2048px) and (max-width: 2560px){.grid-container[data-v-1dcce9f0]{padding:88px 88px 256px 88px}}@media (min-width: 2560px) and (max-width: 3440px){.grid-container[data-v-1dcce9f0]{padding:88px 88px 256px 88px}}@media (min-width: 3440px){.grid-container[data-v-1dcce9f0]{padding:88px 88px 256px 88px}}\n","",{version:3,sources:["webpack://src/views/Albums.vue"],names:[],mappings:"AAsQC,+CACC,iCACC,0BAAgE,CAChE,CAHF,iDACC,iCACC,0BAAgE,CAChE,CAHF,kDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,mDACC,iCACC,4BAAgE,CAChE,CAHF,2BACC,iCACC,4BAAgE,CAChE",sourcesContent:["\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\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\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\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$previous: 0;\n@each $size, $config in get('sizes') {\n\t$marginTop: map-get($config, 'marginTop');\n\t$marginW: map-get($config, 'marginW');\n\t// if this is the last entry, only use min-width\n\t$rule: '(min-width: #{$previous}px) and (max-width: #{$size}px)';\n\t@if $size == 'max' {\n\t\t$rule: '(min-width: #{$previous}px)';\n\t}\n\t@media #{$rule} {\n\t\t.grid-container {\n\t\t\tpadding: #{$marginTop}px #{$marginW}px 256px #{$marginW}px;\n\t\t}\n\t}\n\t$previous: $size;\n}\n"],sourceRoot:""}]),e.a=i},682:function(n,e,t){"use strict";t.r(e);var r=t(62),i=t(61),o=t.n(i),a=t(13),c=t(35),d=t(95);function l(n,e){var t;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return s(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){t=n[Symbol.iterator]()},n:function(){var n=t.next();return a=n.done,n},e:function(n){c=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw o}}}}function s(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function f(n,e,t,r,i,o,a){try{var c=n[o](a),d=c.value}catch(n){return void t(n)}c.done?e(d):Promise.resolve(d).then(r,i)}function u(n){return function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(n){f(o,r,i,a,c,"next",n)}function c(n){f(o,r,i,a,c,"throw",n)}a(void 0)}))}}
/**
 * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */var A=function(){return p.apply(this,arguments)};function p(){return(p=u(regeneratorRuntime.mark((function n(){var e,t,r,i,s,f,u,A,p,v,h,m=arguments;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=m.length>0&&void 0!==m[0]?m[0]:"/",t=m.length>1&&void 0!==m[1]?m[1]:{},r=Object(a.generateUrl)("/apps/photos/api/v1/".concat(t.shared?"shared":"albums")),n.next=5,o.a.get(r+Object(c.a)(e),t);case 5:i=n.sent,s=i.data.map((function(n){return Object(c.b)(n)})),f={},u=[],A=[],p=l(s);try{for(p.s();!(v=p.n()).done;)(h=v.value).filename===e?f=h:"file"!==h.type?u.push(h):d.b.indexOf(h.mime)>-1&&A.push(h)}catch(n){p.e(n)}finally{p.f()}return n.abrupt("return",{folder:f,folders:u,files:A});case 13:case"end":return n.stop()}}),n)})))).apply(this,arguments)}var v=t(273),h=t.n(v),m=t(301),C=t(258);function g(n,e,t,r,i,o,a){try{var c=n[o](a),d=c.value}catch(n){return void t(n)}c.done?e(d):Promise.resolve(d).then(r,i)}function B(n){return function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(n){g(o,r,i,a,c,"next",n)}function c(n){g(o,r,i,a,c,"throw",n)}a(void 0)}))}}function b(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function w(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?b(Object(t),!0).forEach((function(e){y(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function y(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var x={name:"Folder",components:{FolderTagPreview:t(304).a},inheritAttrs:!1,props:{item:{type:Object,required:!0}},data:function(){return{cancelRequest:null,previewFolder:this.item.injected.fileid}},computed:w(w({},Object(r.c)(["files","folders"])),{},{folderContent:function(){return this.folders[this.item.injected.fileid]},previewFiles:function(){var n=this,e=this.folders[this.previewFolder],t=e?e.map((function(e){return n.files[e]})).slice(0,4):[];if(0===t.length&&this.files[this.previewFolder].folders&&this.previewFolder===this.item.injected.fileid){var r=this.files[this.previewFolder].folders[0];this.updatePreviewFolder(r),this.folders[this.previewFolder]||this.getFolderData(this.files[this.previewFolder].filename)}return t}}),created:function(){var n=this;return B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.folderContent){e.next=3;break}return e.next=3,n.getFolderData(n.item.injected.filename);case 3:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){this.cancelRequest&&this.cancelRequest("Navigated away")},methods:{getFolderData:function(n){var e=this;return B(regeneratorRuntime.mark((function t(){var r,i,o,a,c,d,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(C.a)(A),i=r.request,o=r.cancel,e.cancelRequest=o,t.prev=2,t.next=5,i(n,{shared:e.item.injected.showShared});case 5:a=t.sent,c=a.folder,d=a.folders,l=a.files,e.$store.dispatch("updateFolders",{fileid:c.fileid,files:l,folders:d}),e.$store.dispatch("updateFiles",{folder:c,files:l,folders:d}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),t.t0.response&&t.t0.response.status&&console.error("Failed to get folder content",n,t.t0.response);case 16:return t.prev=16,e.cancelRequest=null,t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})))()},updatePreviewFolder:function(n){this.previewFolder=n}}},k=t(93),j=t.n(k),F=t(529),O={insert:"head",singleton:!1},E=(j()(F.a,O),F.a.locals,t(43)),D=Object(E.a)(x,(function(){var n=this.$createElement;return(this._self._c||n)("FolderTagPreview",{attrs:{id:this.item.injected.fileid,name:this.item.injected.basename,path:this.item.injected.filename,"file-list":this.previewFiles}})}),[],!1,null,"95e00322",null).exports,_=t(302),S=t(303),U=t(305);function P(n,e,t,r,i,o,a){try{var c=n[o](a),d=c.value}catch(n){return void t(n)}c.done?e(d):Promise.resolve(d).then(r,i)}function q(n){return function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(n){P(o,r,i,a,c,"next",n)}function c(n){P(o,r,i,a,c,"throw",n)}a(void 0)}))}}function $(n){return function(n){if(Array.isArray(n))return W(n)}(n)||function(n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(n))return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"==typeof n)return W(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return W(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function R(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function I(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?R(Object(t),!0).forEach((function(e){L(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function L(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var T={name:"Albums",components:{VirtualGrid:h.a,EmptyContent:m.a,Navigation:S.a},mixins:[U.a],props:{rootTitle:{type:String,required:!0},path:{type:String,default:"/"},loading:{type:Boolean,required:!0},showShared:{type:Boolean,default:!1}},data:function(){return{error:null,cancelRequest:function(){}}},computed:I(I({},Object(r.c)(["files","folders"])),{},{folderId:function(){return this.$store.getters.folderId(this.path)},folder:function(){return this.files[this.folderId]},folderContent:function(){return this.folders[this.folderId]},fileList:function(){var n=this;return this.folderContent&&this.folderContent.map((function(e){return n.files[e]})).filter((function(n){return!!n}))},subFolders:function(){return this.folderId&&this.files[this.folderId]&&this.files[this.folderId].folders},folderList:function(){var n=this;return this.subFolders&&this.subFolders.map((function(e){return n.files[e]})).filter((function(n){return!!n}))},contentList:function(){var n,e,t=this,r=null===(n=this.folderList)||void 0===n?void 0:n.map((function(n){return{id:"folder-".concat(n.fileid),injected:I(I({},n),{},{showShared:t.showShared}),width:256,height:256,columnSpan:1,renderComponent:D}})),i=null===(e=this.fileList)||void 0===e?void 0:e.map((function(n){return{id:"file-".concat(n.fileid),injected:I(I({},n),{},{list:t.fileList}),width:256,height:256,columnSpan:1,renderComponent:_.a}}));return[].concat($(r||[]),$(i||[]))},isEmpty:function(){return!this.haveFiles&&!this.haveFolders},haveFiles:function(){return!!this.fileList&&0!==this.fileList.length},haveFolders:function(){return!!this.folderList&&0!==this.folderList.length}}),watch:{path:function(){this.fetchFolderContent()},showShared:function(){this.fetchFolderContent()}},beforeMount:function(){var n=this;return q(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.fetchFolderContent();case 1:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){this.cancelRequest("Changed view")},methods:{fetchFolderContent:function(){var n=this;return q(regeneratorRuntime.mark((function e(){var t,r,i,o,a,c,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.cancelRequest("Changed folder"),OCA.Viewer&&OCA.Viewer.close&&OCA.Viewer.close(),OCA.Files&&OCA.Files.Sidebar.close&&OCA.Files.Sidebar.close(),n.files[n.folderId]&&n.folders[n.folderId]||n.$emit("update:loading",!0),n.error=null,t=Object(C.a)(A),r=t.request,i=t.cancel,n.cancelRequest=i,e.prev=7,e.next=10,r(n.path,{shared:n.showShared});case 10:o=e.sent,a=o.folder,c=o.folders,d=o.files,n.$store.dispatch("addPath",{path:n.path,fileid:a.fileid}),n.$store.dispatch("updateFolders",{fileid:a.fileid,files:d,folders:c}),n.$store.dispatch("updateFiles",{folder:a,files:d,folders:c}),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(7),e.t0.response&&e.t0.response.status&&(404===e.t0.response.status?(n.error=404,setTimeout((function(){n.$router.push({name:n.$route.name})}),3e3)):n.error=e.t0),console.error("Error fetching album data",e.t0);case 23:return e.prev=23,n.$emit("update:loading",!1),e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[7,19,23,26]])})))()}}},G=t(534),z={insert:"head",singleton:!1},N=(j()(G.a,z),G.a.locals,Object(E.a)(T,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return 404===n.error?t("EmptyContent",{attrs:{"illustration-name":"folder"}},[n._v("\n\t"+n._s(n.t("photos","This folder does not exists"))+"\n")]):n.error?t("EmptyContent",[n._v("\n\t"+n._s(n.t("photos","An error occurred"))+"\n")]):n.loading?n._e():t("div",[n.folder?t("Navigation",n._b({key:"navigation",attrs:{"root-title":n.rootTitle,"show-actions":!0}},"Navigation",n.folder,!1)):n._e(),n._v(" "),n.isEmpty?t("EmptyContent",{key:"emptycontent",attrs:{"illustration-name":"empty"}},[n._v("\n\t\t"+n._s(n.t("photos","No photos in here"))+"\n\t")]):t("div",{staticClass:"grid-container"},[t("VirtualGrid",{ref:"virtualgrid",attrs:{items:n.contentList,"get-column-count":function(){return n.gridConfig.count},"get-grid-gap":function(){return n.gridConfig.gap}}})],1)],1)}),[],!1,null,"1dcce9f0",null));e.default=N.exports}}]);
//# sourceMappingURL=photos-7.js.map?v=c9ebaa966fe517fba183