photos/js/photos-src_views_AlbumConte...

3 lines
22 KiB
JavaScript

/*! For license information please see photos-src_views_AlbumContent_vue.js.LICENSE.txt */
(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_AlbumContent_vue","_0cc0-_aeb7"],{28391:(t,e,o)=>{"use strict";o.d(e,{Z:()=>i});const i={name:"FilesByMonthMixin",computed:{fileIdsByMonth(){const t={};for(const o of this.fetchedFileIds){const i=this.files[o];var e;if(i)t[i.month]=null!==(e=t[i.month])&&void 0!==e?e:[],t[i.month].push(i.fileid)}return Object.keys(t).forEach((e=>t[e].sort(this.sortFilesByTimestamp))),t},monthsList(){return Object.keys(this.fileIdsByMonth).sort(((t,e)=>t>e?-1:1))}},methods:{sortFilesByTimestamp(t,e){return this.files[t].timestamp>this.files[e].timestamp?-1:1}}}},96507:(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var i=o(87537),n=o.n(i),a=o(23645),l=o.n(a)()(n());l.push([t.id,".file-picker[data-v-47d60cb6]{display:flex;flex-direction:column;padding:12px}.file-picker__content[data-v-47d60cb6]{display:flex;align-items:flex-start;flex-grow:1;height:500px}.file-picker__navigation[data-v-47d60cb6]{flex-basis:200px;overflow:scroll;margin-right:8px;padding-right:8px;height:100%}@media only screen and (max-width: 1200px){.file-picker__navigation[data-v-47d60cb6]{flex-basis:100px}}.file-picker__navigation--placeholder[data-v-47d60cb6]{background:var(--color-primary-light);border-radius:var(--border-radius-large)}.file-picker__navigation__month[data-v-47d60cb6]{font-weight:bold;font-size:16px;border-radius:var(--border-radius-pill);padding:8px 16px;margin:4px 0;cursor:pointer}@media only screen and (max-width: 1200px){.file-picker__navigation__month[data-v-47d60cb6]{text-align:center}}.file-picker__navigation__month[data-v-47d60cb6]:hover{background:var(--color-background-dark)}.file-picker__navigation__month.selected[data-v-47d60cb6]{background:var(--color-primary-element-lighter)}.file-picker__file-list[data-v-47d60cb6]{flex-grow:1;min-width:0;height:100%}.file-picker__file-list--placeholder[data-v-47d60cb6]{background:var(--color-primary-light);border-radius:var(--border-radius-large)}.file-picker__file-list .section-header[data-v-47d60cb6]{font-weight:bold;font-size:20px;padding:8px 0 4px 0}.file-picker__file-list[data-v-47d60cb6] .empty-content{position:absolute;width:100%;margin-top:0;height:100%;display:flex;flex-direction:column;justify-content:center}.file-picker__actions[data-v-47d60cb6]{display:flex;justify-content:space-between;justify-items:center;padding-top:16px}","",{version:3,sources:["webpack://./src/components/FilesPicker.vue"],names:[],mappings:"AAEA,8BACC,YAAA,CACA,qBAAA,CACA,YAAA,CAEA,uCACC,YAAA,CACA,sBAAA,CACA,WAAA,CACA,YAAA,CAGD,0CACC,gBAAA,CACA,eAAA,CACA,gBAAA,CACA,iBAAA,CACA,WAAA,CAEA,2CAPD,0CAQE,gBAAA,CAAA,CAGD,uDACC,qCAAA,CACA,wCAAA,CAGD,iDACC,gBAAA,CACA,cAAA,CACA,uCAAA,CACA,gBAAA,CACA,YAAA,CACA,cAAA,CAEA,2CARD,iDASE,iBAAA,CAAA,CAGD,uDACC,uCAAA,CAGD,0DACC,+CAAA,CAKH,yCACC,WAAA,CACA,WAAA,CACA,WAAA,CAEA,sDACC,qCAAA,CACA,wCAAA,CAGD,yDACC,gBAAA,CACA,cAAA,CACA,mBAAA,CAGD,wDACC,iBAAA,CACA,UAAA,CACA,YAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CAIF,uCACC,YAAA,CACA,6BAAA,CACA,oBAAA,CACA,gBAAA",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.file-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding: 12px;\n\n\t&__content {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tflex-grow: 1;\n\t\theight: 500px;\n\t}\n\n\t&__navigation {\n\t\tflex-basis: 200px;\n\t\toverflow: scroll;\n\t\tmargin-right: 8px;\n\t\tpadding-right: 8px;\n\t\theight: 100%;\n\n\t\t@media only screen and (max-width: 1200px) {\n\t\t\tflex-basis: 100px;\n\t\t}\n\n\t\t&--placeholder {\n\t\t\tbackground: var(--color-primary-light);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t&__month {\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 16px;\n\t\t\tborder-radius: var(--border-radius-pill);\n\t\t\tpadding: 8px 16px;\n\t\t\tmargin: 4px 0;\n\t\t\tcursor: pointer;\n\n\t\t\t@media only screen and (max-width: 1200px) {\n\t\t\t\ttext-align: center;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--color-background-dark);\n\t\t\t}\n\n\t\t\t&.selected {\n\t\t\t\tbackground: var(--color-primary-element-lighter);\n\t\t\t}\n\t\t}\n\t}\n\n\t&__file-list {\n\t\tflex-grow: 1;\n\t\tmin-width: 0;\n\t\theight: 100%;\n\n\t\t&--placeholder {\n\t\t\tbackground: var(--color-primary-light);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t.section-header {\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 20px;\n\t\t\tpadding: 8px 0 4px 0;\n\t\t}\n\n\t\t:deep(.empty-content) {\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 0;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tjustify-items: center;\n\t\tpadding-top: 16px;\n\t}\n}\n'],sourceRoot:""}]);const s=l},67844:(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var i=o(87537),n=o.n(i),a=o(23645),l=o.n(a)()(n());l.push([t.id,".album__title[data-v-64603c73]{width:100%}.album__name[data-v-64603c73]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.album__location[data-v-64603c73]{margin-left:-4px;display:flex;color:var(--color-text-lighter)}.photos-navigation[data-v-64603c73]{position:relative}.photos-navigation--uploading[data-v-64603c73]{margin-bottom:30px}[data-v-64603c73] .upload-picker .upload-picker__progress{position:absolute;bottom:-30px;left:64px;margin:0}[data-v-64603c73] .upload-picker .upload-picker__cancel{position:absolute;bottom:-24px;right:50px}","",{version:3,sources:["webpack://./src/views/AlbumContent.vue"],names:[],mappings:"AAGC,+BACC,UAAA,CAGD,8BACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAGD,kCACC,gBAAA,CACA,YAAA,CACA,+BAAA,CAIF,oCACC,iBAAA,CAEA,+CACC,kBAAA,CAKD,0DACC,iBAAA,CACA,YAAA,CACA,SAAA,CACA,QAAA,CAED,wDACC,iBAAA,CACA,YAAA,CACA,UAAA",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.album {\n\t&__title {\n\t\twidth: 100%;\n\t}\n\n\t&__name {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t&__location {\n\t\tmargin-left: -4px;\n\t\tdisplay: flex;\n\t\tcolor: var(--color-text-lighter);\n\t}\n}\n\n.photos-navigation {\n\tposition: relative;\n\t// Add space at the bottom for the progress bar.\n\t&--uploading {\n\t\tmargin-bottom: 30px;\n\t}\n}\n\n:deep(.upload-picker) {\n\t.upload-picker__progress {\n\t\tposition: absolute;\n\t\tbottom: -30px;\n\t\tleft: 64px;\n\t\tmargin: 0;\n\t}\n\t.upload-picker__cancel {\n\t\tposition: absolute;\n\t\tbottom: -24px;\n\t\tright: 50px;\n\t}\n}\n'],sourceRoot:""}]);const s=l},36361:(t,e,o)=>{"use strict";o.d(e,{Z:()=>l});var i=o(20629),n=o(79753);const a={name:"ActionDownload",components:{NcActionLink:o(15961).ih},props:{title:{type:String,required:!0},selectedFileIds:{type:Array,required:!0}},computed:{...(0,i.Se)(["files"]),downloadUrl(){const t=new URLSearchParams,e=this.fileNames.map((t=>"/"+t.split("/").splice(3).join("/")));return t.append("files",JSON.stringify(e)),(0,n.generateUrl)("/apps/files/ajax/download.php?".concat(t))},fileNames(){return this.selectedFileIds.map((t=>this.files[t].filename))}}};const l=(0,o(51900).Z)(a,(function(){var t=this;return(0,t._self._c)("NcActionLink",{attrs:{"close-after-click":!0,href:t.downloadUrl,download:t.downloadUrl,"aria-label":t.title}},[t._v("\n\t"+t._s(t.title)+"\n\t"),t._t("icon",null,{slot:"icon"})],2)}),[],!1,null,null,null).exports},65723:(t,e,o)=>{"use strict";o.d(e,{Z:()=>s});var i=o(20629),n=o(33870),a=o(15961);const l={name:"ActionFavorite",components:{Star:n.default,NcActionButton:a.Js},props:{selectedFileIds:{type:Array,required:!0}},computed:{...(0,i.Se)(["files"]),shouldFavoriteSelection(){return this.selectedFileIds.some((t=>0===this.files[t].favorite))}},methods:{...(0,i.nv)(["toggleFavoriteForFiles"]),async favoriteSelection(){await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:1})},async unFavoriteSelection(){await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:0})}}};const s=(0,o(51900).Z)(l,(function(){var t=this,e=t._self._c;return t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[t._v("\n\t"+t._s(t.t("photos","Add selection to favorites"))+"\n\t"),e("Star",{attrs:{slot:"icon"},slot:"icon"})],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[t._v("\n\t"+t._s(t.t("photos","Remove selection from favorites"))+"\n\t"),e("Star",{attrs:{slot:"icon"},slot:"icon"})],1)}),[],!1,null,null,null).exports},37788:(t,e,o)=>{"use strict";o.d(e,{Z:()=>S});var i=o(20629),n=o(15961),a=o(52587),l=o(80351),s=o.n(l),r=o(38712),c=o(8399),d=o(57688),A=o(66951),u=o(98171),m=o(28391),p=o(81090),h=o(3301);const b={name:"FilesPicker",components:{File:d.Z,FilesListViewer:c.Z,ImagePlus:r.Z,NcButton:n.P2,NcLoadingIcon:n.lb,UploadPicker:a.e},filters:{dateMonthAndYear:t=>s()(t,"YYYYMM").format("MMMM YYYY")},mixins:[A.Z,m.Z,u.Z,p.Z],props:{destination:{type:String,required:!0},blacklistIds:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},data:()=>({allowedMimes:h.ZP,targetMonth:null,uploadContext:{route:"albumpicker"}}),computed:{...(0,i.Se)(["files"])},watch:{monthsList(t){null===this.targetMonth&&(this.targetMonth=t[0])}},methods:{getFiles(){this.fetchFiles("",{},this.blacklistIds)},refreshFiles(){this.fetchFiles("",{firstResult:0},[...this.blacklistIds,...this.fetchedFileIds],!0)},emitPickedEvent(){this.$emit("files-picked",this.selectedFileIds)}}};var g=o(93379),f=o.n(g),C=o(7795),v=o.n(C),_=o(90569),k=o.n(_),w=o(3565),y=o.n(w),F=o(19216),x=o.n(F),N=o(44589),M=o.n(N),Z=o(96507),B={};B.styleTagTransform=M(),B.setAttributes=y(),B.insert=k().bind(null,"head"),B.domAPI=v(),B.insertStyleElement=x();f()(Z.Z,B);Z.Z&&Z.Z.locals&&Z.Z.locals;const S=(0,o(51900).Z)(b,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"file-picker"},[e("div",{staticClass:"file-picker__content"},[e("div",{staticClass:"file-picker__navigation",class:{"file-picker__navigation--placeholder":0===t.monthsList.length}},t._l(t.monthsList,(function(o){return e("div",{key:o,staticClass:"file-picker__navigation__month",class:{selected:t.targetMonth===o},on:{click:function(e){t.targetMonth=o}}},[t._v("\n\t\t\t\t"+t._s(t._f("dateMonthAndYear")(o))+"\n\t\t\t")])})),0),t._v(" "),e("FilesListViewer",{staticClass:"file-picker__file-list",class:{"file-picker__file-list--placeholder":0===t.monthsList.length},attrs:{"file-ids-by-section":t.fileIdsByMonth,"empty-message":t.t("photos","There are no photos or videos yet!"),sections:t.monthsList,loading:t.loadingFiles,"base-height":100,"section-header-height":50,"scroll-to-section":t.targetMonth},on:{"need-content":t.getFiles},scopedSlots:t._u([{key:"default",fn:function(o){let{file:i,height:n,visibility:a}=o;return[i.sectionHeader?e("h3",{staticClass:"section-header",style:{height:"".concat(n,"px")},attrs:{id:"file-picker-section-header-".concat(i.id)}},[t._v("\n\t\t\t\t\t"+t._s(t._f("dateMonthAndYear")(i.id))+"\n\t\t\t\t")]):e("File",{attrs:{file:t.files[i.id],"allow-selection":!0,selected:!0===t.selection[i.id],visibility:a,semaphore:t.semaphore},on:{"select-toggled":t.onFileSelectToggle}})]}}])})],1),t._v(" "),e("div",{staticClass:"file-picker__actions"},[e("UploadPicker",{attrs:{accept:t.allowedMimes,context:t.uploadContext,destination:t.photosLocation,multiple:!0},on:{uploaded:t.refreshFiles}}),t._v(" "),e("NcButton",{attrs:{type:"primary",disabled:t.loading||0===t.selectedFileIds.length},on:{click:t.emitPickedEvent},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?t._e():e("ImagePlus"),t._v(" "),t.loading?e("NcLoadingIcon"):t._e()]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.t("photos","Add to {destination}",{destination:t.destination}))+"\n\t\t")])],1)])}),[],!1,null,"47d60cb6",null).exports},43323:(e,o,i)=>{"use strict";i.r(o),i.d(o,{default:()=>Q});var n=i(84319),a=i(77958),l=i(20629),s=i(15961),r=i(52587),c=i(20296),d=i.n(c),A=i(71546),u=i(78627),m=i(90150),p=i(33613),h=i(38712),b=i(67983),g=i(64550),f=i(23902),C=i(44244),v=i(17419),_=i(69363),k=i(12945),w=i(66951),y=i(81090),F=i(36361),x=i(65723),N=i(99732),M=i(21373),Z=i(33034),B=i(37788),S=i(67635),I=i(94236),D=i(3301),E=i(81067),P=i(2161),T=i(59537);const W={name:"AlbumContent",components:{ActionDownload:F.Z,ActionFavorite:x.Z,AlbumForm:N.Z,Close:A.default,CollaboratorsSelectionForm:M.Z,CollectionContent:Z.Z,Delete:u.Z,Download:m.Z,DownloadMultiple:p.Z,FilesPicker:B.Z,HeaderNavigation:S.Z,ImagePlus:h.Z,MapMarker:b.Z,NcActionButton:s.Js,NcActions:s.O3,NcActionSeparator:s.rr,NcButton:s.P2,NcEmptyContent:s.SL,NcLoadingIcon:s.lb,NcModal:s.Jc,Pencil:g.default,Plus:f.Z,ShareVariant:v.Z,UploadPicker:r.e},mixins:[_.Z,k.Z,w.Z,s.tq,y.Z],props:{albumName:{type:String,default:"/"}},data(){return{allowedMimes:D.ZP,showAddPhotosModal:!1,showManageCollaboratorView:!1,showEditAlbumForm:!1,loadingAddCollaborators:!1,uploader:(0,r.oM)(),newFileMenuEntry:{id:"album-add",displayName:t("photos","Add photos to this album"),templateName:"",if:t=>t.route===this.$route.name,iconSvgInline:C,handler:()=>{this.showAddPhotosModal=!0}}}},computed:{...(0,l.Se)(["albumsFiles"]),album(){return this.albums[this.albumName]||{}},albumFileIds(){return this.albumsFiles[this.albumName]||[]},sharingEnabled:()=>void 0!==OC.Share,uploadContext(){var t;return{...this.album,route:this.$route.name,root:"dav/photos/".concat(null===(t=(0,a.ts)())||void 0===t?void 0:t.uid,"/albums")}},isUploading(){var t;return(null===(t=this.uploader.queue)||void 0===t?void 0:t.length)>0}},watch:{album(t,e){t.filename!==e.filename&&this.fetchAlbumContent()}},mounted(){this.fetchAlbumContent(),(0,n.cd)(this.newFileMenuEntry)},destroyed(){(0,n.oE)(this.newFileMenuEntry)},methods:{...(0,l.nv)(["appendFiles","deleteAlbum","addFilesToAlbum","removeFilesFromAlbum","updateAlbum"]),async fetchAlbumContent(){if(this.loadingFiles||this.showEditAlbumForm)return[];const t=await this.semaphore.acquire((()=>0),"fetchFiles"),e=await this.fetchSemaphore.acquire();try{var o;this.errorFetchingFiles=null,this.loadingFiles=!0,this.semaphoreSymbol=t;const e=(await E.ZP.getDirectoryContents("/photos/".concat(null===(o=(0,a.ts)())||void 0===o?void 0:o.uid,"/albums/").concat(this.albumName),{data:P.Z,details:!0,signal:this.abortController.signal})).data.map((t=>(0,I.AX)(t))).filter((t=>t.fileid)),i=e.map((t=>t.fileid.toString()));this.appendFiles(e),e.length>0&&await this.$store.commit("setAlbumFiles",{albumName:this.albumName,fileIds:i}),T.Z.debug("[AlbumContent] Fetched ".concat(i.length," new files: "),i)}catch(t){var i;if(404===(null===(i=t.response)||void 0===i?void 0:i.status))this.errorFetchingFiles=404;else{if("ERR_CANCELED"===t.code)return;this.errorFetchingFiles=t}T.Z.error("[AlbumContent] Error fetching album files",{error:t})}finally{this.loadingFiles=!1,this.semaphore.release(t),this.fetchSemaphore.release(e)}return[]},redirectToNewName(t){let{album:e}=t;this.showEditAlbumForm=!1,this.album.basename!==e.basename&&this.$router.push("/albums/".concat(e.basename))},async handleFilesPicked(t){this.showAddPhotosModal=!1,await this.addFilesToAlbum({albumName:this.albumName,fileIdsToAdd:t}),await this.fetchAlbumContent()},async handleRemoveFilesFromAlbum(t){this.$refs.collectionContent.onUncheckFiles(t),await this.removeFilesFromAlbum({albumName:this.albumName,fileIdsToRemove:t})},async handleDeleteAlbum(){await this.deleteAlbum({albumName:this.albumName}),this.$router.push("/albums")},async handleSetCollaborators(t){try{this.loadingAddCollaborators=!0,this.showManageCollaboratorView=!1,await this.updateAlbum({albumName:this.albumName,properties:{collaborators:t}})}catch(t){T.Z.error(t)}finally{this.loadingAddCollaborators=!1}},onUpload:d()((function(){this.fetchAlbumContent()}),500)}};var Y=i(93379),L=i.n(Y),U=i(7795),R=i.n(U),q=i(90569),j=i.n(q),G=i(3565),V=i.n(G),$=i(19216),z=i.n($),O=i(44589),H=i.n(O),J=i(67844),K={};K.styleTagTransform=H(),K.setAttributes=V(),K.insert=j().bind(null,"head"),K.domAPI=R(),K.insertStyleElement=z();L()(J.Z,K);J.Z&&J.Z.locals&&J.Z.locals;const Q=(0,i(51900).Z)(W,(function(){var t=this,e=t._self._c;return e("div",[e("CollectionContent",{ref:"collectionContent",attrs:{collection:t.album,"collection-file-ids":t.albumFileIds,semaphore:t.semaphore,loading:t.loadingAlbums||t.loadingFiles,error:t.errorFetchingAlbums||t.errorFetchingFiles},scopedSlots:t._u([{key:"header",fn:function(o){let{selectedFileIds:i,resetSelection:n}=o;return e("HeaderNavigation",{key:"navigation",class:{"photos-navigation--uploading":t.isUploading},attrs:{loading:t.loadingFiles,params:{albumName:t.albumName},path:"/"+t.albumName,title:t.albumName},on:{refresh:t.fetchAlbumContent}},[""!==t.album.location?e("div",{staticClass:"album__location",attrs:{slot:"subtitle"},slot:"subtitle"},[e("MapMarker"),t._v(t._s(t.album.location)+"\n\t\t\t")],1):t._e(),t._v(" "),e("template",{slot:"default"},[i.length>0?e("NcButton",{attrs:{"aria-label":t.t("photos","Unselect all")},on:{click:n},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Close")]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Unselect all"))+"\n\t\t\t\t")]):t._e()],1),t._v(" "),void 0!==t.album?e("template",{slot:"right"},[0!==t.album.nbItems?e("UploadPicker",{attrs:{accept:t.allowedMimes,context:t.uploadContext,destination:t.album.basename,root:t.uploadContext.root,multiple:!0},on:{uploaded:t.onUpload}}):t._e(),t._v(" "),t.sharingEnabled?e("NcButton",{attrs:{type:"tertiary","aria-label":t.t("photos","Manage collaborators for this album")},on:{click:function(e){t.showManageCollaboratorView=!0}}},[e("ShareVariant",{attrs:{slot:"icon"},slot:"icon"})],1):t._e(),t._v(" "),e("NcActions",{attrs:{"aria-label":t.t("photos","Open actions menu")}},[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Edit album details")},on:{click:function(e){t.showEditAlbumForm=!0}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Edit album details"))+"\n\t\t\t\t\t\t"),e("Pencil",{attrs:{slot:"icon"},slot:"icon"})],1),t._v(" "),t.albumFileIds.length>0?e("ActionDownload",{attrs:{"selected-file-ids":t.albumFileIds,title:t.t("photos","Download all files in album")}},[e("DownloadMultiple",{attrs:{slot:"icon"},slot:"icon"})],1):t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:t.handleDeleteAlbum}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Delete album"))+"\n\t\t\t\t\t\t"),e("Delete",{attrs:{slot:"icon"},slot:"icon"})],1),t._v(" "),i.length>0?[e("NcActionSeparator"),t._v(" "),e("ActionDownload",{attrs:{"selected-file-ids":i,title:t.t("photos","Download selected files")}},[e("Download",{attrs:{slot:"icon"},slot:"icon"})],1),t._v(" "),e("ActionFavorite",{attrs:{"selected-file-ids":i}}),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){return t.handleRemoveFilesFromAlbum(i)}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.t("photos","Remove selection from album"))+"\n\t\t\t\t\t\t\t"),e("Close",{attrs:{slot:"icon"},slot:"icon"})],1)]:t._e()],2)],1):t._e()],2)}}],null,!1,3282022727)},[t._v(" "),void 0===t.album||0!==t.album.nbItems||t.loadingFiles||t.loadingAlbums?t._e():e("NcEmptyContent",{staticClass:"album__empty",attrs:{slot:"empty-content",title:t.t("photos","This album does not have any photos or videos yet!")},slot:"empty-content"},[e("ImagePlus",{attrs:{slot:"icon"},slot:"icon"}),t._v(" "),e("NcButton",{staticClass:"album__empty__button",attrs:{slot:"action",type:"primary","aria-label":t.t("photos","Add photos to this album")},on:{click:function(e){t.showAddPhotosModal=!0}},slot:"action"},[e("Plus",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t"+t._s(t.t("photos","Add"))+"\n\t\t\t")],1)],1)],1),t._v(" "),t.showAddPhotosModal?e("NcModal",{attrs:{size:"large",title:t.t("photos","Add photos to the album")},on:{close:function(e){t.showAddPhotosModal=!1}}},[e("FilesPicker",{attrs:{destination:t.album.basename,"blacklist-ids":t.albumFileIds},on:{"files-picked":t.handleFilesPicked}})],1):t._e(),t._v(" "),t.showManageCollaboratorView?e("NcModal",{attrs:{title:t.t("photos","Manage collaborators")},on:{close:function(e){t.showManageCollaboratorView=!1}}},[e("CollaboratorsSelectionForm",{attrs:{"album-name":t.album.basename,collaborators:t.album.collaborators,"public-link":t.album.publicLink},scopedSlots:t._u([{key:"default",fn:function(o){let{collaborators:i}=o;return[e("NcButton",{attrs:{"aria-label":t.t("photos","Save collaborators for this album."),type:"primary",disabled:t.loadingAddCollaborators},on:{click:function(e){return t.handleSetCollaborators(i)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loadingAddCollaborators?e("NcLoadingIcon"):t._e()]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Save"))+"\n\t\t\t\t")])]}}],null,!1,4058924180)})],1):t._e(),t._v(" "),t.showEditAlbumForm?e("NcModal",{attrs:{title:t.t("photos","Edit album details")},on:{close:function(e){t.showEditAlbumForm=!1}}},[e("AlbumForm",{attrs:{album:t.album},on:{done:t.redirectToNewName}})],1):t._e()],1)}),[],!1,null,"64603c73",null).exports},80950:()=>{},46601:()=>{},89214:()=>{},96419:()=>{},56353:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},69386:()=>{},31616:()=>{},56619:()=>{},77108:()=>{},71408:()=>{},23646:()=>{}}]);
//# sourceMappingURL=photos-src_views_AlbumContent_vue.js.map?v=73d717f8833f97ea2e49