photos/js/photos-src_views_SharedAlbu...

1 line
27 KiB
Plaintext

{"version":3,"file":"photos-src_views_SharedAlbumContent_vue.js?v=62826a071963c48df70e","mappings":"mLAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gSAAiS,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,gDAAgD,MAAQ,GAAG,SAAW,0HAA0H,eAAiB,CAAC,o6CAAo/C,WAAa,MAExjE,S,mCCaA,MCpBwG,EDoBxG,CACEC,KAAM,WACNC,MAAO,CAAC,SACRC,MAAO,CACLC,MAAO,CACLC,KAAMC,QAERC,UAAW,CACTF,KAAMC,OACNE,QAAS,gBAEXC,KAAM,CACJJ,KAAMK,OACNF,QAAS,MEff,SAXgB,E,SAAA,GACd,GCRW,WAAa,IAAIG,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAOJ,EAAIM,GAAG,CAACC,YAAY,iCAAiCC,MAAM,CAAC,eAAeR,EAAIP,MAAM,aAAaO,EAAIP,MAAM,KAAO,OAAOgB,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,EAAIW,MAAM,QAASD,EAAO,IAAI,OAAOV,EAAIY,QAAO,GAAO,CAACR,EAAG,MAAM,CAACG,YAAY,4BAA4BC,MAAM,CAAC,KAAOR,EAAIJ,UAAU,MAAQI,EAAIF,KAAK,OAASE,EAAIF,KAAK,QAAU,cAAc,CAACM,EAAG,OAAO,CAACI,MAAM,CAAC,EAAI,8CAA8C,CAAER,EAAS,MAAEI,EAAG,QAAQ,CAACJ,EAAIa,GAAGb,EAAIc,GAAGd,EAAIP,UAAUO,EAAIe,UAAU,GAC3jB,IDUpB,EACA,KACA,KACA,MAI8B,O,gDElBhC,I,wrCC4IA,MC5ImL,ED4InL,CACA,0BACA,YACA,cACA,SACA,gBAGA,WACA,cACA,gCACA,sBACA,gCACA,sCACA,oBACA,kBACA,sBAEA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yC,EAAE,SAAU,4BAA4BhC,GAAG,CAAC,MAAQ,SAASC,GAAQV,EAAI0C,oBAAqB,CAAK,IAAI,CAACtC,EAAG,cAAc,CAACI,MAAM,CAAC,YAAcR,EAAIuB,MAAMwB,SAAS,gBAAgB/C,EAAIwB,aAAa,QAAUxB,EAAIgD,wBAAwBvC,GAAG,CAAC,eAAeT,EAAIiD,sBAAsB,GAAGjD,EAAIe,MAAM,EAAE,GAC/4E,IISpB,EACA,KACA,WACA,MAI8B,O","sources":["webpack:///photos/src/views/SharedAlbumContent.vue?vue&type=style&index=0&id=3bbb078a&lang=scss&scoped=true&","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Plus.vue?80b4","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue?vue&type=template&id=968bec46&","webpack:///photos/src/views/SharedAlbumContent.vue?vue&type=template&id=3bbb078a&scoped=true&","webpack:///photos/src/views/SharedAlbumContent.vue","webpack:///photos/src/views/SharedAlbumContent.vue?vue&type=script&lang=js&","webpack://photos/./src/views/SharedAlbumContent.vue?7675","webpack://photos/./src/views/SharedAlbumContent.vue?a937"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".album[data-v-3bbb078a]{display:flex;flex-direction:column}.album__title[data-v-3bbb078a]{width:100%}.album__name[data-v-3bbb078a]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.album__location[data-v-3bbb078a]{margin-left:-4px;display:flex;color:var(--color-text-lighter)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/views/SharedAlbumContent.vue\"],\"names\":[],\"mappings\":\"AAwSA,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\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Plus.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Plus.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Plus.vue?vue&type=template&id=968bec46&\"\nimport script from \"./Plus.vue?vue&type=script&lang=js&\"\nexport * from \"./Plus.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({staticClass:\"material-design-icon plus-icon\",attrs:{\"aria-hidden\":!_vm.title,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(true)?_c('CollectionContent',{ref:\"collectionContent\",attrs:{\"collection\":_vm.album,\"collection-file-ids\":_vm.albumFileIds,\"semaphore\":_vm.semaphore,\"loading\":_vm.loadingAlbums || _vm.loadingFiles,\"error\":_vm.errorFetchingAlbums || _vm.errorFetchingFiles},scopedSlots:_vm._u([{key:\"header\",fn:function(ref){\nvar selectedFileIds = ref.selectedFileIds;\nreturn _c('HeaderNavigation',{key:\"navigation\",attrs:{\"loading\":_vm.loadingFiles,\"params\":{ albumName: _vm.albumName },\"path\":'/' + _vm.albumName,\"title\":_vm.albumName},on:{\"refresh\":_vm.fetchAlbumContent}},[(_vm.album.location !== '')?_c('div',{staticClass:\"album__location\",attrs:{\"slot\":\"subtitle\"},slot:\"subtitle\"},[_c('MapMarker'),_vm._v(_vm._s(_vm.album.location)+\"\\n\\t\\t\\t\")],1):_vm._e(),_vm._v(\" \"),(_vm.album !== undefined)?_c('template',{slot:\"right\"},[(_vm.album.nbItems !== 0)?_c('NcButton',{attrs:{\"type\":\"tertiary\",\"aria-label\":_vm.t('photos', 'Add photos to this album')},on:{\"click\":function($event){_vm.showAddPhotosModal = true}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('Plus')]},proxy:true}],null,true)}):_vm._e(),_vm._v(\" \"),_c('NcActions',{attrs:{\"force-menu\":true,\"aria-label\":_vm.t('photos', 'Open actions menu')}},[_c('NcActionButton',{attrs:{\"close-after-click\":true},on:{\"click\":_vm.handleDeleteAlbum}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Delete album'))+\"\\n\\t\\t\\t\\t\\t\\t\"),_c('Delete',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1),_vm._v(\" \"),(selectedFileIds.length > 0)?[_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":true},on:{\"click\":function($event){return _vm.handleRemoveFilesFromAlbum(selectedFileIds)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Remove selection from album'))+\"\\n\\t\\t\\t\\t\\t\\t\\t\"),_c('Close',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1)]:_vm._e()],2)],1):_vm._e()],2)}}],null,false,1317108920)},[_vm._v(\" \"),_c('NcEmptyContent',{staticClass:\"album__empty\",attrs:{\"slot\":\"empty-content\",\"title\":_vm.t('photos', 'This album does not have any photos or videos yet!')},slot:\"empty-content\"},[_c('ImagePlus',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\" \"),_c('NcButton',{attrs:{\"slot\":\"action\",\"type\":\"primary\",\"aria-label\":_vm.t('photos', 'Add photos to this album')},on:{\"click\":function($event){_vm.showAddPhotosModal = true}},slot:\"action\"},[_c('Plus',{attrs:{\"slot\":\"icon\"},slot:\"icon\"}),_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', \"Add\"))+\"\\n\\t\\t\\t\")],1)],1)],1):_vm._e(),_vm._v(\" \"),(_vm.showAddPhotosModal)?_c('NcModal',{attrs:{\"size\":\"large\",\"title\":_vm.t('photos', 'Add photos to the album')},on:{\"close\":function($event){_vm.showAddPhotosModal = false}}},[_c('FilesPicker',{attrs:{\"destination\":_vm.album.basename,\"blacklist-ids\":_vm.albumFileIds,\"loading\":_vm.loadingAddFilesToAlbum},on:{\"files-picked\":_vm.handleFilesPicked}})],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\n -\n - @license AGPL-3.0-or-later\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<template>\n\t<div>\n\t\t<CollectionContent v-if=\"true\"\n\t\t\tref=\"collectionContent\"\n\t\t\t:collection=\"album\"\n\t\t\t:collection-file-ids=\"albumFileIds\"\n\t\t\t:semaphore=\"semaphore\"\n\t\t\t:loading=\"loadingAlbums || loadingFiles\"\n\t\t\t:error=\"errorFetchingAlbums || errorFetchingFiles\">\n\t\t\t<!-- Header -->\n\t\t\t<HeaderNavigation key=\"navigation\"\n\t\t\t\tslot=\"header\"\n\t\t\t\tslot-scope=\"{selectedFileIds}\"\n\t\t\t\t:loading=\"loadingFiles\"\n\t\t\t\t:params=\"{ albumName }\"\n\t\t\t\t:path=\"'/' + albumName\"\n\t\t\t\t:title=\"albumName\"\n\t\t\t\t@refresh=\"fetchAlbumContent\">\n\t\t\t\t<!-- <UploadPicker :accept=\"allowedMimes\"\n\t\t\t\t:destination=\"folder.filename\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t@uploaded=\"onUpload\" /> -->\n\t\t\t\t<div v-if=\"album.location !== ''\" slot=\"subtitle\" class=\"album__location\">\n\t\t\t\t\t<MapMarker />{{ album.location }}\n\t\t\t\t</div>\n\t\t\t\t<template v-if=\"album !== undefined\" slot=\"right\">\n\t\t\t\t\t<NcButton v-if=\"album.nbItems !== 0\"\n\t\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t\t:aria-label=\"t('photos', 'Add photos to this album')\"\n\t\t\t\t\t\t@click=\"showAddPhotosModal = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Plus />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\n\t\t\t\t\t<NcActions :force-menu=\"true\" :aria-label=\"t('photos', 'Open actions menu')\">\n\t\t\t\t\t\t<!-- <ActionDownload v-if=\"albumFileIds.length > 0\"\n\t\t\t\t\t\t\t:selected-file-ids=\"albumFileIds\"\n\t\t\t\t\t\t\t:title=\"t('photos', 'Download all files in album')\">\n\t\t\t\t\t\t\t<DownloadMultiple slot=\"icon\" />\n\t\t\t\t\t\t</ActionDownload> -->\n\n\t\t\t\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t\t\t\t@click=\"handleDeleteAlbum\">\n\t\t\t\t\t\t\t{{ t('photos', 'Delete album') }}\n\t\t\t\t\t\t\t<Delete slot=\"icon\" />\n\t\t\t\t\t\t</NcActionButton>\n\n\t\t\t\t\t\t<template v-if=\"selectedFileIds.length > 0\">\n\t\t\t\t\t\t\t<NcActionSeparator />\n\n\t\t\t\t\t\t\t<!-- <ActionDownload :selected-file-ids=\"selectedFileIds\" :title=\"t('photos', 'Download selected files')\">\n\t\t\t\t\t\t\t\t<Download slot=\"icon\" />\n\t\t\t\t\t\t\t</ActionDownload> -->\n\n\t\t\t\t\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t\t\t\t\t@click=\"handleRemoveFilesFromAlbum(selectedFileIds)\">\n\t\t\t\t\t\t\t\t{{ t('photos', 'Remove selection from album') }}\n\t\t\t\t\t\t\t\t<Close slot=\"icon\" />\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActions>\n\t\t\t\t</template>\n\t\t\t</HeaderNavigation>\n\n\t\t\t<!-- No content -->\n\t\t\t<NcEmptyContent slot=\"empty-content\"\n\t\t\t\t:title=\"t('photos', 'This album does not have any photos or videos yet!')\"\n\t\t\t\tclass=\"album__empty\">\n\t\t\t\t<ImagePlus slot=\"icon\" />\n\n\t\t\t\t<NcButton slot=\"action\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t:aria-label=\"t('photos', 'Add photos to this album')\"\n\t\t\t\t\t@click=\"showAddPhotosModal = true\">\n\t\t\t\t\t<Plus slot=\"icon\" />\n\t\t\t\t\t{{ t('photos', \"Add\") }}\n\t\t\t\t</NcButton>\n\t\t\t</NcEmptyContent>\n\t\t</CollectionContent>\n\n\t\t<!-- Modals -->\n\t\t<NcModal v-if=\"showAddPhotosModal\"\n\t\t\tsize=\"large\"\n\t\t\t:title=\"t('photos', 'Add photos to the album')\"\n\t\t\t@close=\"showAddPhotosModal = false\">\n\t\t\t<FilesPicker :destination=\"album.basename\"\n\t\t\t\t:blacklist-ids=\"albumFileIds\"\n\t\t\t\t:loading=\"loadingAddFilesToAlbum\"\n\t\t\t\t@files-picked=\"handleFilesPicked\" />\n\t\t</NcModal>\n\t</div>\n</template>\n\n<script>\nimport { mapActions, mapGetters } from 'vuex'\nimport MapMarker from 'vue-material-design-icons/MapMarker'\nimport Plus from 'vue-material-design-icons/Plus'\nimport Delete from 'vue-material-design-icons/Delete'\nimport ImagePlus from 'vue-material-design-icons/ImagePlus'\nimport Close from 'vue-material-design-icons/Close'\n// import Download from 'vue-material-design-icons/Download'\n// import DownloadMultiple from 'vue-material-design-icons/DownloadMultiple'\n\nimport { NcActions, NcActionButton, NcButton, NcModal, NcEmptyContent, NcActionSeparator, isMobile } from '@nextcloud/vue'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nimport FetchSharedAlbumsMixin from '../mixins/FetchSharedAlbumsMixin.js'\nimport FetchFilesMixin from '../mixins/FetchFilesMixin.js'\nimport AbortControllerMixin from '../mixins/AbortControllerMixin.js'\nimport CollectionContent from '../components/Collection/CollectionContent.vue'\nimport HeaderNavigation from '../components/HeaderNavigation.vue'\n// import ActionDownload from '../components/Actions/ActionDownload.vue'\nimport FilesPicker from '../components/FilesPicker.vue'\nimport logger from '../services/logger.js'\nimport client from '../services/DavClient.js'\nimport DavRequest from '../services/DavRequest.js'\nimport { genFileInfo } from '../utils/fileUtils.js'\n\nexport default {\n\tname: 'SharedAlbumContent',\n\tcomponents: {\n\t\tMapMarker,\n\t\tPlus,\n\t\tClose,\n\t\t// Download,\n\t\t// DownloadMultiple,\n\t\tDelete,\n\t\tImagePlus,\n\t\tNcEmptyContent,\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionSeparator,\n\t\tNcButton,\n\t\tNcModal,\n\t\tCollectionContent,\n\t\t// ActionDownload,\n\t\tFilesPicker,\n\t\tHeaderNavigation,\n\t},\n\n\tmixins: [\n\t\tFetchSharedAlbumsMixin,\n\t\tFetchFilesMixin,\n\t\tAbortControllerMixin,\n\t\tisMobile,\n\t],\n\n\tprops: {\n\t\talbumName: {\n\t\t\ttype: String,\n\t\t\tdefault: '/',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowAddPhotosModal: false,\n\t\t\tloadingCount: 0,\n\t\t\tloadingAddFilesToAlbum: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'sharedAlbumsFiles',\n\t\t]),\n\n\t\t/**\n\t\t * @return {object} The album information for the current albumName.\n\t\t */\n\t\talbum() {\n\t\t\treturn this.sharedAlbums[this.albumName] || {}\n\t\t},\n\n\t\t/**\n\t\t * @return {string[]} The list of files for the current albumName.\n\t\t */\n\t\talbumFileIds() {\n\t\t\treturn this.sharedAlbumsFiles[this.albumName] || []\n\t\t},\n\t},\n\n\twatch: {\n\t\talbum() {\n\t\t\tthis.fetchAlbumContent()\n\t\t},\n\t},\n\n\tmethods: {\n\t\t...mapActions([\n\t\t\t'appendFiles',\n\t\t\t'deleteSharedAlbum',\n\t\t\t'addFilesToSharedAlbum',\n\t\t\t'removeFilesFromSharedAlbum',\n\t\t]),\n\n\t\tasync fetchAlbumContent() {\n\t\t\tif (this.loadingFiles || this.showEditAlbumForm) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tconst semaphoreSymbol = await this.semaphore.acquire(() => 0, 'fetchFiles')\n\t\t\tconst fetchSemaphoreSymbol = await this.fetchSemaphore.acquire()\n\n\t\t\ttry {\n\t\t\t\tthis.errorFetchingFiles = null\n\t\t\t\tthis.loadingFiles = true\n\t\t\t\tthis.semaphoreSymbol = semaphoreSymbol\n\n\t\t\t\tconst response = await client.getDirectoryContents(\n\t\t\t\t\t`/photos/${getCurrentUser()?.uid}/sharedalbums/${this.albumName}`,\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: DavRequest,\n\t\t\t\t\t\tdetails: true,\n\t\t\t\t\t\tsignal: this.abortController.signal,\n\t\t\t\t\t}\n\t\t\t\t)\n\n\t\t\t\tconst fetchedFiles = response.data\n\t\t\t\t\t.map(file => genFileInfo(file))\n\n\t\t\t\tconst fileIds = fetchedFiles\n\t\t\t\t\t.map(file => file.fileid)\n\t\t\t\t\t.map((fileId) => fileId.toString())\n\n\t\t\t\tthis.appendFiles(fetchedFiles)\n\n\t\t\t\tif (fetchedFiles.length > 0) {\n\t\t\t\t\tawait this.$store.commit('addFilesToSharedAlbum', { albumName: this.albumName, fileIdsToAdd: fileIds })\n\t\t\t\t}\n\n\t\t\t\tlogger.debug(`[SharedAlbumContent] Fetched ${fileIds.length} new files: `, fileIds)\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingFiles = 404\n\t\t\t\t} else if (error.code === 'ERR_CANCELED') {\n\t\t\t\t\treturn\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorFetchingFiles = error\n\t\t\t\t}\n\n\t\t\t\t// cancelled request, moving on...\n\t\t\t\tlogger.error('Error fetching shared album files', error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingFiles = false\n\t\t\t\tthis.semaphore.release(semaphoreSymbol)\n\t\t\t\tthis.fetchSemaphore.release(fetchSemaphoreSymbol)\n\t\t\t}\n\n\t\t\treturn []\n\t\t},\n\n\t\tasync handleFilesPicked(fileIds) {\n\t\t\tthis.showAddPhotosModal = false\n\t\t\tawait this.addFilesToSharedAlbum({ albumName: this.albumName, fileIdsToAdd: fileIds })\n\t\t\t// Re-fetch album content to have the proper filenames.\n\t\t\tawait this.fetchAlbumContent()\n\t\t},\n\n\t\tasync handleRemoveFilesFromAlbum(fileIds) {\n\t\t\tthis.$refs.collectionContent.onUncheckFiles(fileIds)\n\t\t\tawait this.removeFilesFromSharedAlbum({ albumName: this.albumName, fileIdsToRemove: fileIds })\n\t\t},\n\n\t\tasync handleDeleteAlbum() {\n\t\t\tawait this.deleteSharedAlbum({ albumName: this.albumName })\n\t\t\tthis.$router.push('/sharedalbums')\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\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</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SharedAlbumContent.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!./SharedAlbumContent.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SharedAlbumContent.vue?vue&type=style&index=0&id=3bbb078a&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SharedAlbumContent.vue?vue&type=style&index=0&id=3bbb078a&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./SharedAlbumContent.vue?vue&type=template&id=3bbb078a&scoped=true&\"\nimport script from \"./SharedAlbumContent.vue?vue&type=script&lang=js&\"\nexport * from \"./SharedAlbumContent.vue?vue&type=script&lang=js&\"\nimport style0 from \"./SharedAlbumContent.vue?vue&type=style&index=0&id=3bbb078a&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 \"3bbb078a\",\n null\n \n)\n\nexport default component.exports"],"names":["___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_h","$createElement","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","ref","album","albumFileIds","semaphore","loadingAlbums","loadingFiles","errorFetchingAlbums","errorFetchingFiles","scopedSlots","_u","key","fn","selectedFileIds","albumName","fetchAlbumContent","location","slot","undefined","nbItems","t","showAddPhotosModal","proxy","handleDeleteAlbum","length","handleRemoveFilesFromAlbum","basename","loadingAddFilesToAlbum","handleFilesPicked"],"sourceRoot":""}