%PDF- %PDF-
Direktori : /www/varak.net/nextcloud.varak.net/apps/photos/js/ |
Current File : //www/varak.net/nextcloud.varak.net/apps/photos/js/photos-src_views_SharedAlbumContent_vue.js |
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_SharedAlbumContent_vue"],{65333:(t,e,o)=>{o.d(e,{A:()=>s});var l=o(71354),a=o.n(l),n=o(76314),i=o.n(n)()(a());i.push([t.id,".album[data-v-3ba35108]{display:flex;flex-direction:column}.album__title[data-v-3ba35108]{width:100%}.album__name[data-v-3ba35108]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.album__location[data-v-3ba35108]{margin-left:-4px;display:flex;color:var(--color-text-lighter)}","",{version:3,sources:["webpack://./src/views/SharedAlbumContent.vue"],names:[],mappings:"AAEA,wBACC,YAAA,CACA,qBAAA,CAEA,+BACC,UAAA,CAGD,8BACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAGD,kCACC,gBAAA,CACA,YAAA,CACA,+BAAA",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\tdisplay: flex;\n\tflex-direction: column;\n\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'],sourceRoot:""}]);const s=i},61372:(t,e,o)=>{o.r(e),o.d(e,{default:()=>I});var l=o(95353),a=o(76333),n=o(52129),i=o(53334),s=o(47912),c=o(10798),r=o(68170),m=o(63984),u=o(4372),d=o(96285),h=o(19326),A=o(83675),b=o(16482),p=o(39590);const C={name:"SharedAlbumContent",components:{MapMarker:s.A,Plus:c.A,Close:u.A,Delete:r.A,ImagePlus:m.A,NcEmptyContent:a.yI,NcActions:a.B6,NcActionButton:a.Ko,NcActionSeparator:a.z,NcButton:a.x1,NcUserBubble:a.Z9,CollectionContent:A.A,PhotosPicker:p.A,HeaderNavigation:b.A},mixins:[h.A,d.A,a.Fr],props:{albumName:{type:String,default:"/"}},data:()=>({showAddPhotosModal:!1,loadingCount:0,loadingAddFilesToAlbum:!1,collaboratorTypes:n.Z}),computed:{...(0,l.L8)(["files","sharedAlbumsFiles"]),album(){return this.$store.getters.getSharedAlbum(this.albumName)},albumFileIds(){return this.$store.getters.getSharedAlbumFiles(this.albumName)},albumOriginalName(){return this.albumName.replace(new RegExp(`\\(${this.album.collaborators[0].id}\\)$`),"")},albumFileName(){return this.$store.getters.getSharedAlbumName(this.albumName)}},async mounted(){this.fetchAlbum(),this.fetchAlbumContent()},methods:{...(0,l.i0)(["addFilesToCollection","removeFilesFromCollection","deleteCollection"]),async fetchAlbum(){await this.fetchCollection(this.albumFileName,["<nc:location />","<nc:dateRange />","<nc:collaborators />"])},async fetchAlbumContent(){await this.fetchCollectionFiles(this.albumFileName)},async handleFilesPicked(t){this.showAddPhotosModal=!1,await this.addFilesToCollection({collectionFileName:this.album.filename,fileIdsToAdd:t}),await this.fetchAlbumContent()},async handleRemoveFilesFromAlbum(t){this.$refs.collectionContent.onUncheckFiles(t),await this.removeFilesFromCollection({collectionFileName:this.album.filename,fileIdsToRemove:t})},async handleDeleteAlbum(){await this.deleteCollection({collectionFileName:this.album.filename}),this.$router.push("/sharedalbums")},t:i.Tl}};var g=o(85072),_=o.n(g),f=o(97825),v=o.n(f),N=o(77659),y=o.n(N),F=o(55056),w=o.n(F),k=o(10540),T=o.n(k),P=o(41113),x=o.n(P),B=o(65333),S={};S.styleTagTransform=x(),S.setAttributes=w(),S.insert=y().bind(null,"head"),S.domAPI=v(),S.insertStyleElement=T();_()(B.A,S);B.A&&B.A.locals&&B.A.locals;const I=(0,o(14486).A)(C,(function(){var t=this,e=t._self._c;return e("div",[e("CollectionContent",{ref:"collectionContent",attrs:{collection:t.album,"collection-file-ids":t.albumFileIds,loading:t.loadingCollection||t.loadingCollectionFiles,error:t.errorFetchingCollection||t.errorFetchingCollectionFiles},scopedSlots:t._u([{key:"header",fn:function(o){let{selectedFileIds:l,resetSelection:a}=o;return e("HeaderNavigation",{key:"navigation",attrs:{loading:t.loadingCollectionFiles,params:{albumName:t.albumName},path:"/"+t.albumName,title:t.albumOriginalName},on:{refresh:t.fetchAlbumContent}},[void 0!==t.album&&""!==t.album.location?e("div",{staticClass:"album__location",attrs:{slot:"subtitle"},slot:"subtitle"},[e("MapMarker"),t._v(t._s(t.album.location)+" ⸱ "+t._s(t.t("photos","Shared by"))+" "),e("NcUserBubble",{attrs:{"display-name":t.album.collaborators[0].label,user:t.album.collaborators[0].id}})],1):t._e(),t._v(" "),e("template",{slot:"default"},[l.length>0?e("NcButton",{attrs:{"aria-label":t.t("photos","Unselect all")},on:{click:a},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("NcButton",{attrs:{type:"secondary","aria-label":t.t("photos","Add photos to this album")},on:{click:function(e){t.showAddPhotosModal=!0}}},[e("Plus",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Add"))+"\n\t\t\t\t")],1):t._e(),t._v(" "),e("NcActions",{attrs:{"force-menu":!0,"aria-label":t.t("photos","Open actions menu")}},[t.album.collaborators[0].type===t.collaboratorTypes.SHARE_TYPE_USER?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._e(),t._v(" "),l.length>0?[e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){return t.handleRemoveFilesFromAlbum(l)}}},[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,284801126)},[t._v(" "),void 0===t.album||0!==t.album.nbItems||t.loadingCollectionFiles||t.loadingCollection?t._e():e("NcEmptyContent",{staticClass:"album__empty",attrs:{slot:"empty-content",name: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(" "),e("PhotosPicker",{attrs:{open:t.showAddPhotosModal,name:t.t("photos","Add photos to {albumName}",{albumName:t.albumOriginalName}),destination:t.album.basename,"blacklist-ids":t.albumFileIds,loading:t.loadingAddFilesToAlbum},on:{"update:open":function(e){t.showAddPhotosModal=e},"files-picked":t.handleFilesPicked}})],1)}),[],!1,null,"3ba35108",null).exports}}]); //# sourceMappingURL=photos-src_views_SharedAlbumContent_vue.js.map?v=21e1ab7d8d2b1e5073f9