1
|
{"version":3,"file":"photos-src_views_PublicAlbumContent_vue.js?v=5e450ea5e98d5b71b8b1","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;ACvCA;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack:///photos/src/views/PublicAlbumContent.vue?vue&type=script&lang=js&","webpack:///photos/src/services/Albums.js","webpack:///photos/src/views/PublicAlbumContent.vue?vue&type=style&index=0&id=56b53b66&lang=scss&scoped=true&","webpack://photos/./src/views/PublicAlbumContent.vue?a940","webpack:///photos/node_modules/vue-material-design-icons/MapMarker.vue","webpack:///photos/node_modules/vue-material-design-icons/MapMarker.vue?vue&type=script&lang=js&","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/src/views/PublicAlbumContent.vue","webpack://photos/./src/views/PublicAlbumContent.vue?578b","webpack://photos/./src/views/PublicAlbumContent.vue?7e9b","webpack://photos/./node_modules/vue-material-design-icons/MapMarker.vue?2c39","webpack://photos/./node_modules/vue-material-design-icons/Plus.vue?b153","webpack:///photos/src/views/PublicAlbumContent.vue?vue&type=template&id=56b53b66&scoped=true&","webpack://photos/./node_modules/vue-material-design-icons/MapMarker.vue?2d3a","webpack://photos/./node_modules/vue-material-design-icons/Plus.vue?7104","webpack://photos/./src/views/PublicAlbumContent.vue?12d1"],"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//\nimport { mapActions, mapGetters } from 'vuex';\nimport { createClient, getPatcher } from 'webdav';\nimport MapMarker from 'vue-material-design-icons/MapMarker';\nimport Plus from 'vue-material-design-icons/Plus';\nimport ImagePlus from 'vue-material-design-icons/ImagePlus';\nimport Close from 'vue-material-design-icons/Close'; // import Download from 'vue-material-design-icons/Download'\n// import DownloadMultiple from 'vue-material-design-icons/DownloadMultiple'\n\nimport { NcActions, NcActionButton, NcButton, NcEmptyContent,\n/** NcActionSeparator, */\nisMobile } from '@nextcloud/vue';\nimport { showError } from '@nextcloud/dialogs';\nimport axios from '@nextcloud/axios';\nimport { generateRemoteUrl } from '@nextcloud/router';\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'; // import ActionDownload from '../components/Actions/ActionDownload.vue'\n\nimport { fetchAlbum, fetchAlbumContent } from '../services/Albums.js';\nimport logger from '../services/logger.js';\nconst publicRootPath = 'dav'; // force our axios\n\nconst patcher = getPatcher();\npatcher.patch('request', axios); // init webdav client on default dav endpoint\n\nconst remote = generateRemoteUrl(publicRootPath);\nconst publicRemote = remote;\nexport default {\n name: 'PublicAlbumContent',\n components: {\n MapMarker,\n Plus,\n Close,\n // Download,\n // DownloadMultiple,\n ImagePlus,\n NcEmptyContent,\n NcActions,\n NcActionButton,\n // NcActionSeparator,\n NcButton,\n CollectionContent,\n // ActionDownload,\n HeaderNavigation\n },\n mixins: [FetchFilesMixin, AbortControllerMixin, isMobile],\n props: {\n token: {\n type: String,\n required: true\n }\n },\n\n data() {\n return {\n showAddPhotosModal: false,\n loadingAlbum: false,\n errorFetchingAlbum: null,\n loadingCount: 0,\n loadingAddFilesToAlbum: false,\n albumOriginalName: '',\n publicClient: createClient(publicRemote, {\n username: this.token,\n password: null\n })\n };\n },\n\n computed: { ...mapGetters(['files', 'publicAlbums', 'publicAlbumsFiles']),\n\n /**\n * @return {object} The album information for the current albumName.\n */\n album() {\n return this.publicAlbums[this.albumName] || {};\n },\n\n /**\n * @return {string} The album's name is the token.\n */\n albumName() {\n return this.token;\n },\n\n /**\n * @return {string[]} The list of files for the current albumName.\n */\n albumFileIds() {\n return this.publicAlbumsFiles[this.albumName] || [];\n }\n\n },\n\n async beforeMount() {\n await this.fetchAlbumInfo();\n await this.fetchAlbumContent();\n },\n\n methods: { ...mapActions(['appendFiles', 'addPublicAlbums', 'addFilesToPublicAlbum', 'removeFilesFromPublicAlbum']),\n\n async fetchAlbumInfo() {\n if (this.loadingAlbum) {\n return;\n }\n\n try {\n this.loadingAlbum = true;\n this.errorFetchingAlbum = null;\n const album = await fetchAlbum(`/photospublic/${this.token}`, this.abortController.signal, '<nc:original-name />', this.publicClient);\n this.addPublicAlbums({\n collections: [album]\n });\n this.albumOriginalName = album.originalName;\n } catch (error) {\n if (error.response?.status === 404) {\n this.errorFetchingAlbum = 404;\n return;\n }\n\n this.errorFetchingAlbum = error;\n logger.error('[PublicAlbumContent] Error fetching album', {\n error\n });\n showError(this.t('photos', 'Failed to fetch album.'));\n } finally {\n this.loadingAlbum = false;\n }\n },\n\n async fetchAlbumContent() {\n if (this.loadingFiles || this.showEditAlbumForm) {\n return [];\n }\n\n const semaphoreSymbol = await this.semaphore.acquire(() => 0, 'fetchFiles');\n const fetchSemaphoreSymbol = await this.fetchSemaphore.acquire();\n\n try {\n this.errorFetchingFiles = null;\n this.loadingFiles = true;\n this.semaphoreSymbol = semaphoreSymbol;\n const fetchedFiles = await fetchAlbumContent(`/photospublic/${this.token}`, this.abortController.signal, this.publicClient);\n const fileIds = fetchedFiles.map(file => file.fileid.toString());\n this.appendFiles(fetchedFiles);\n\n if (fetchedFiles.length > 0) {\n await this.$store.commit('addFilesToPublicAlbum', {\n collectionId: this.albumName,\n fileIdsToAdd: fileIds\n });\n }\n\n return fetchedFiles;\n } catch (error) {\n if (error.response?.status === 404) {\n this.errorFetchingFiles = 404;\n return [];\n }\n\n this.errorFetchingFiles = error;\n showError(this.t('photos', 'Failed to fetch albums list.'));\n logger.error('[PublicAlbumContent] Error fetching album files', {\n error\n });\n } finally {\n this.loadingFiles = false;\n this.semaphore.release(semaphoreSymbol);\n this.fetchSemaphore.release(fetchSemaphoreSymbol);\n }\n\n return [];\n },\n\n async handleFilesPicked(fileIds) {\n this.showAddPhotosModal = false;\n await this.addFilesToPublicAlbum({\n collectionId: this.albumName,\n fileIdsToAdd: fileIds\n }); // Re-fetch album content to have the proper filenames.\n\n await this.fetchAlbumContent();\n },\n\n async handleRemoveFilesFromAlbum(fileIds) {\n this.$refs.collectionContent.onUncheckFiles(fileIds);\n await this.removeFilesFromPublicAlbum({\n collectionId: this.albumName,\n fileIdsToRemove: fileIds\n });\n }\n\n }\n};","/**\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 */\nimport moment from '@nextcloud/moment';\nimport { translate } from '@nextcloud/l10n';\nimport defaultClient from '../services/DavClient.js';\nimport logger from '../services/logger.js';\nimport DavRequest from '../services/DavRequest.js';\nimport { genFileInfo } from '../utils/fileUtils.js';\n/**\n * @typedef {object} Album\n * @property {string} id - The id of the album.\n * @property {string} name - The name of the album.\n * @property {number} creationDate - The creation date of the album.\n * @property {string} isShared - Whether the current user as shared the album.\n * @property {string} isCollaborative - Whether the album can be edited by other users.\n * @property {number} itemCount - The number of item in the album.\n * @property {number} cover - The cover of the album.\n */\n\n/**\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @return {string}\n */\n\nfunction getDavRequest() {\n let extraProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t<nc:last-photo />\n\t\t\t\t\t<nc:nbItems />\n\t\t\t\t\t<nc:location />\n\t\t\t\t\t<nc:dateRange />\n\t\t\t\t\t<nc:collaborators />\n\t\t\t\t\t${extraProps}\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`;\n}\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Album|null>}\n */\n\n\nexport async function fetchAlbum(path, options) {\n let extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n let client = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : defaultClient;\n\n try {\n const response = await client.stat(path, {\n data: getDavRequest(extraProps),\n details: true,\n ...options\n });\n logger.debug('[Albums] Fetched an album: ', {\n data: response.data\n });\n return formatAlbum(response.data);\n } catch (error) {\n if (error.code === 'ERR_CANCELED') {\n return null;\n }\n\n throw error;\n }\n}\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Album[]>}\n */\n\nexport async function fetchAlbums(path, options) {\n let extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n let client = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : defaultClient;\n\n try {\n const response = await client.getDirectoryContents(path, {\n data: getDavRequest(extraProps),\n details: true,\n ...options\n });\n logger.debug(`[Albums] Fetched ${response.data.length} albums: `, {\n data: response.data\n });\n return response.data.filter(album => album.filename !== path).map(formatAlbum);\n } catch (error) {\n if (error.code === 'ERR_CANCELED') {\n return [];\n }\n\n throw error;\n }\n}\n/**\n *\n * @param {object} album - An album received from a webdav request.\n * @return {Album}\n */\n\nfunction formatAlbum(album) {\n // Ensure that we have a proper collaborators array.\n if (album.props.collaborators === '') {\n album.props.collaborators = [];\n } else if (typeof album.props.collaborators.collaborator === 'object') {\n if (Array.isArray(album.props.collaborators.collaborator)) {\n album.props.collaborators = album.props.collaborators.collaborator;\n } else {\n album.props.collaborators = [album.props.collaborators.collaborator];\n }\n } // Extract custom props.\n\n\n album = genFileInfo(album); // Compute date range label.\n\n const dateRange = JSON.parse(album.dateRange?.replace(/"/g, '\"') ?? '{}');\n\n if (dateRange.start === null) {\n dateRange.start = moment().unix();\n dateRange.end = moment().unix();\n }\n\n const dateRangeFormatted = {\n startDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n endDate: moment.unix(dateRange.end).format('MMMM YYYY')\n };\n\n if (dateRangeFormatted.startDate === dateRangeFormatted.endDate) {\n album.date = dateRangeFormatted.startDate;\n } else {\n album.date = translate('photos', '{startDate} to {endDate}', dateRangeFormatted);\n }\n\n return album;\n}\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Array>}\n */\n\n\nexport async function fetchAlbumContent(path, options) {\n let client = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultClient;\n\n try {\n const response = await client.getDirectoryContents(path, {\n data: DavRequest,\n details: true,\n ...options\n });\n const fetchedFiles = response.data.map(file => genFileInfo(file)).filter(file => file.fileid);\n logger.debug(`[Albums] Fetched ${fetchedFiles.length} new files: `, fetchedFiles);\n return fetchedFiles;\n } catch (error) {\n if (error.code === 'ERR_CANCELED') {\n return [];\n }\n\n logger.error('Error fetching album files', {\n error\n });\n console.error(error);\n throw error;\n }\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".album[data-v-56b53b66] {\\n display: flex;\\n flex-direction: column;\\n}\\n.album__title[data-v-56b53b66] {\\n width: 100%;\\n}\\n.album__name[data-v-56b53b66] {\\n overflow: hidden;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n}\\n.album__location[data-v-56b53b66] {\\n margin-left: -4px;\\n display: flex;\\n color: var(--color-text-lighter);\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\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!./PublicAlbumContent.vue?vue&type=style&index=0&id=56b53b66&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!./PublicAlbumContent.vue?vue&type=style&index=0&id=56b53b66&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MapMarker.vue?vue&type=template&id=c80f3d8c&\"\nimport script from \"./MapMarker.vue?vue&type=script&lang=js&\"\nexport * from \"./MapMarker.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\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('c80f3d8c')) {\n api.createRecord('c80f3d8c', component.options)\n } else {\n api.reload('c80f3d8c', component.options)\n }\n module.hot.accept(\"./MapMarker.vue?vue&type=template&id=c80f3d8c&\", function () {\n api.rerender('c80f3d8c', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"node_modules/vue-material-design-icons/MapMarker.vue\"\nexport default component.exports","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n name: \"MapMarkerIcon\",\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","import { render, staticRenderFns } from \"./Plus.vue?vue&type=template&id=18bbb6c6&\"\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\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('18bbb6c6')) {\n api.createRecord('18bbb6c6', component.options)\n } else {\n api.reload('18bbb6c6', component.options)\n }\n module.hot.accept(\"./Plus.vue?vue&type=template&id=18bbb6c6&\", function () {\n api.rerender('18bbb6c6', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"node_modules/vue-material-design-icons/Plus.vue\"\nexport default component.exports","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\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","import { render, staticRenderFns } from \"./PublicAlbumContent.vue?vue&type=template&id=56b53b66&scoped=true&\"\nimport script from \"./PublicAlbumContent.vue?vue&type=script&lang=js&\"\nexport * from \"./PublicAlbumContent.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PublicAlbumContent.vue?vue&type=style&index=0&id=56b53b66&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 \"56b53b66\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('56b53b66')) {\n api.createRecord('56b53b66', component.options)\n } else {\n api.reload('56b53b66', component.options)\n }\n module.hot.accept(\"./PublicAlbumContent.vue?vue&type=template&id=56b53b66&scoped=true&\", function () {\n api.rerender('56b53b66', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/PublicAlbumContent.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PublicAlbumContent.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!./PublicAlbumContent.vue?vue&type=script&lang=js&\"","export * from \"-!../../node_modules/style-loader/dist/cjs.js!../../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!./PublicAlbumContent.vue?vue&type=style&index=0&id=56b53b66&lang=scss&scoped=true&\"","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./MapMarker.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./MapMarker.vue?vue&type=script&lang=js&\"","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&\"","export * from \"-!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PublicAlbumContent.vue?vue&type=template&id=56b53b66&scoped=true&\"","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"span\",\n _vm._b(\n {\n staticClass: \"material-design-icon map-marker-icon\",\n attrs: {\n \"aria-hidden\": !_vm.title,\n \"aria-label\": _vm.title,\n role: \"img\",\n },\n on: {\n click: function ($event) {\n return _vm.$emit(\"click\", $event)\n },\n },\n },\n \"span\",\n _vm.$attrs,\n false\n ),\n [\n _c(\n \"svg\",\n {\n staticClass: \"material-design-icon__svg\",\n attrs: {\n fill: _vm.fillColor,\n width: _vm.size,\n height: _vm.size,\n viewBox: \"0 0 24 24\",\n },\n },\n [\n _c(\n \"path\",\n {\n attrs: {\n d: \"M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z\",\n },\n },\n [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()]\n ),\n ]\n ),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"span\",\n _vm._b(\n {\n staticClass: \"material-design-icon plus-icon\",\n attrs: {\n \"aria-hidden\": !_vm.title,\n \"aria-label\": _vm.title,\n role: \"img\",\n },\n on: {\n click: function ($event) {\n return _vm.$emit(\"click\", $event)\n },\n },\n },\n \"span\",\n _vm.$attrs,\n false\n ),\n [\n _c(\n \"svg\",\n {\n staticClass: \"material-design-icon__svg\",\n attrs: {\n fill: _vm.fillColor,\n width: _vm.size,\n height: _vm.size,\n viewBox: \"0 0 24 24\",\n },\n },\n [\n _c(\n \"path\",\n { attrs: { d: \"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\" } },\n [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()]\n ),\n ]\n ),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n [\n _c(\n \"CollectionContent\",\n {\n ref: \"collectionContent\",\n attrs: {\n collection: _vm.album,\n \"collection-file-ids\": _vm.albumFileIds,\n semaphore: _vm.semaphore,\n loading: _vm.loadingAlbum || _vm.loadingFiles,\n error: _vm.errorFetchingAlbum || _vm.errorFetchingFiles,\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"header\",\n fn: function (ref) {\n var selectedFileIds = ref.selectedFileIds\n return _vm.albumOriginalName !== \"\"\n ? _c(\n \"HeaderNavigation\",\n {\n key: \"navigation\",\n attrs: {\n loading: _vm.loadingAlbum || _vm.loadingFiles,\n params: { token: _vm.token },\n path: \"/\",\n \"root-title\": _vm.albumOriginalName,\n title: _vm.albumOriginalName,\n },\n on: { refresh: _vm.fetchAlbumContent },\n },\n [\n _vm.album.location !== \"\"\n ? _c(\n \"div\",\n {\n staticClass: \"album__location\",\n attrs: { slot: \"subtitle\" },\n slot: \"subtitle\",\n },\n [\n _c(\"MapMarker\"),\n _vm._v(\n _vm._s(_vm.album.location) + \"\\n\\t\\t\\t\"\n ),\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.album !== undefined\n ? _c(\n \"template\",\n { slot: \"right\" },\n [\n _c(\n \"NcActions\",\n {\n attrs: {\n \"force-menu\": true,\n \"aria-label\": _vm.t(\n \"photos\",\n \"Open actions menu\"\n ),\n },\n },\n [\n selectedFileIds.length > 0\n ? [\n _c(\n \"NcActionButton\",\n {\n attrs: {\n \"close-after-click\": true,\n },\n on: {\n click: function ($event) {\n return _vm.handleRemoveFilesFromAlbum(\n selectedFileIds\n )\n },\n },\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\\t\\t\\t\" +\n _vm._s(\n _vm.t(\n \"photos\",\n \"Remove selection from album\"\n )\n ) +\n \"\\n\\t\\t\\t\\t\\t\\t\\t\"\n ),\n _c(\"Close\", {\n attrs: { slot: \"icon\" },\n slot: \"icon\",\n }),\n ],\n 1\n ),\n ]\n : _vm._e(),\n ],\n 2\n ),\n ],\n 1\n )\n : _vm._e(),\n ],\n 2\n )\n : _vm._e()\n },\n },\n ],\n null,\n true\n ),\n },\n [\n _vm._v(\" \"),\n _c(\n \"NcEmptyContent\",\n {\n staticClass: \"album__empty\",\n attrs: {\n slot: \"empty-content\",\n title: _vm.t(\n \"photos\",\n \"This album does not have any photos or videos yet!\"\n ),\n },\n slot: \"empty-content\",\n },\n [\n _c(\"ImagePlus\", { attrs: { slot: \"icon\" }, slot: \"icon\" }),\n _vm._v(\" \"),\n _c(\n \"NcButton\",\n {\n attrs: {\n slot: \"action\",\n type: \"primary\",\n \"aria-label\": _vm.t(\"photos\", \"Add photos to this album\"),\n },\n on: {\n click: function ($event) {\n _vm.showAddPhotosModal = true\n },\n },\n slot: \"action\",\n },\n [\n _c(\"Plus\", { attrs: { slot: \"icon\" }, slot: \"icon\" }),\n _vm._v(\n \"\\n\\t\\t\\t\\t\" + _vm._s(_vm.t(\"photos\", \"Add\")) + \"\\n\\t\\t\\t\"\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"],"names":[],"sourceRoot":""}
|