/*! For license information please see photos-src_views_SharedAlbums_vue.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_SharedAlbums_vue"],{49723:(t,e,s)=>{s.d(e,{Z:()=>i});var a=s(20629),o=s(77958),n=s(69363),l=s(99622);const i={name:"FetchSharedAlbumsMixin",data:()=>({errorFetchingAlbums:null,loadingAlbums:!1}),mixins:[n.Z],async beforeMount(){this.fetchAlbums()},computed:{...(0,a.Se)(["sharedAlbums"])},methods:{...(0,a.nv)(["addSharedAlbums"]),async fetchAlbums(){if(!this.loadingAlbums)try{var t;this.loadingAlbums=!0,this.errorFetchingAlbums=null;const e=await(0,l.CE)("/photos/".concat(null===(t=(0,o.ts)())||void 0===t?void 0:t.uid,"/sharedalbums"),this.abortController.signal);this.addSharedAlbums({albums:e})}catch(t){var e;404===(null===(e=t.response)||void 0===e?void 0:e.status)?this.errorFetchingAlbums=404:this.errorFetchingAlbums=t}finally{this.loadingAlbums=!1}}}}},30376:(t,e,s)=>{s.d(e,{Z:()=>i});var a=s(87537),o=s.n(a),n=s(23645),l=s.n(n)()(o());l.push([t.id,".albums-list[data-v-10a1f9c9]{display:flex;flex-direction:column}.albums-list .album__name[data-v-10a1f9c9]{font-weight:normal;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./src/views/SharedAlbums.vue"],names:[],mappings:"AAEA,8BACC,YAAA,CACA,qBAAA,CAEA,2CACC,kBAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.albums-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t.album__name {\n\t\tfont-weight: normal;\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n'],sourceRoot:""}]);const i=l},48059:(t,e,s)=>{s.r(e),s.d(e,{default:()=>T});var a=s(1099),o=s(79753),n=s(15961),l=s(49723),i=s(13103),r=s(48462),m=s(67635),u=s(9944);const c={name:"SharedAlbums",components:{FolderMultipleImage:a.Z,NcEmptyContent:n.SL,CollectionsList:i.Z,CollectionCover:r.Z,HeaderNavigation:m.Z,NcUserBubble:n.uq},filters:{coverUrl:t=>-1===t?"":(0,o.generateUrl)("/apps/photos/api/v1/preview/".concat(t,"?x=",512,"&y=",512)),albumOriginalName:t=>t.basename.replace(new RegExp("\\(".concat(t.collaborators[0].id,"\\)$")),"")},mixins:[l.Z],methods:{t:u.Iu,n:u.uN}};var d=s(93379),b=s.n(d),h=s(7795),A=s.n(h),p=s(90569),g=s.n(p),v=s(3565),f=s.n(v),C=s(19216),_=s.n(C),y=s(44589),w=s.n(y),x=s(30376),S={};S.styleTagTransform=w(),S.setAttributes=f(),S.insert=g().bind(null,"head"),S.domAPI=A(),S.insertStyleElement=_();b()(x.Z,S);x.Z&&x.Z.locals&&x.Z.locals;const T=(0,s(51900).Z)(c,(function(){var t=this,e=t._self._c;return e("CollectionsList",{staticClass:"albums-list",attrs:{collections:t.sharedAlbums,loading:t.loadingAlbums,error:t.errorFetchingAlbums},scopedSlots:t._u([{key:"default",fn:function(s){let{collection:a}=s;return e("CollectionCover",{key:a.basename,attrs:{link:"/sharedalbums/".concat(a.basename),"alt-img":t.t("photos","Cover photo for shared album {albumName}.",{albumName:a.basename}),"data-test":a.basename,"cover-url":t._f("coverUrl")(a.lastPhoto)}},[e("h2",{staticClass:"album__name"},[t._v("\n\t\t\t"+t._s(t._f("albumOriginalName")(a))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"album__details",attrs:{slot:"subtitle"},slot:"subtitle"},[t._v("\n\t\t\t"+t._s(a.date)+" ⸱ "+t._s(t.n("photos","%n item","%n photos and videos",a.nbItems))+"\n\t\t\t"),e("br"),t._v("\n\t\t\t"+t._s(t.t("photos","Shared by"))+" "),e("NcUserBubble",{attrs:{"display-name":a.collaborators[0].label,user:a.collaborators[0].id}})],1)])}}])},[e("HeaderNavigation",{key:"navigation",attrs:{slot:"header",loading:t.loadingAlbums,title:t.t("photos","Shared albums"),"root-title":t.t("photos","Shared albums")},on:{refresh:t.fetchAlbums},slot:"header"}),t._v(" "),t._v(" "),e("NcEmptyContent",{attrs:{slot:"empty-collections-list",title:t.t("photos","There is no album yet!")},slot:"empty-collections-list"},[e("FolderMultipleImage",{attrs:{slot:"icon"},slot:"icon"})],1)],1)}),[],!1,null,"10a1f9c9",null).exports}}]);
//# sourceMappingURL=photos-src_views_SharedAlbums_vue.js.map?v=a6cada93468d2cd5c3cd