1 line
3.8 KiB
Plaintext
1 line
3.8 KiB
Plaintext
{"version":3,"file":"PlacesView-DmE6kvTj.chunk.mjs","sources":["../src/views/PlacesView.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div>\n\t\t<CollectionsList\n\t\t\t:collections=\"places\"\n\t\t\t:loading=\"loadingCollections\"\n\t\t\t:error=\"errorFetchingCollections\"\n\t\t\tclass=\"places-list\">\n\t\t\t<HeaderNavigation\n\t\t\t\tkey=\"navigation\"\n\t\t\t\tslot=\"header\"\n\t\t\t\t:loading=\"loadingCollections\"\n\t\t\t\t:title=\"t('photos', 'Places')\"\n\t\t\t\t:root-title=\"t('photos', 'Places')\"\n\t\t\t\t@refresh=\"fetchPlaces\" />\n\n\t\t\t<CollectionCover\n\t\t\t\t:key=\"collection.basename\"\n\t\t\t\tslot-scope=\"{ collection }\"\n\t\t\t\tparent-route=\"/places\"\n\t\t\t\t:collection-name=\"collection.basename\"\n\t\t\t\t:alt-img=\"t('photos', 'Cover photo for place {placeName}', { placeName: collection.basename })\"\n\t\t\t\t:cover-url=\"collection.attributes['last-photo'] | coverUrl\">\n\t\t\t\t<span class=\"place__name\">\n\t\t\t\t\t{{ collection.basename }}\n\t\t\t\t</span>\n\n\t\t\t\t<div slot=\"subtitle\" class=\"place__details\">\n\t\t\t\t\t{{ n('photos', '%n item', '%n photos and videos', collection.attributes.nbItems) }}\n\t\t\t\t</div>\n\t\t\t</CollectionCover>\n\n\t\t\t<NcEmptyContent slot=\"empty-collections-list\" :name=\"t('photos', 'There is no place yet!')\">\n\t\t\t\t<ImageMultipleOutline slot=\"icon\" />\n\t\t\t</NcEmptyContent>\n\t\t</CollectionsList>\n\t</div>\n</template>\n\n<script lang='ts'>\n\nimport { translate, translatePlural } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'\nimport ImageMultipleOutline from 'vue-material-design-icons/ImageMultipleOutline.vue'\nimport CollectionCover from '../components/Collection/CollectionCover.vue'\nimport CollectionsList from '../components/Collection/CollectionsList.vue'\nimport HeaderNavigation from '../components/HeaderNavigation.vue'\nimport FetchCollectionsMixin from '../mixins/FetchCollectionsMixin.js'\nimport { placesPrefix } from '../store/places.js'\n\nexport default {\n\tname: 'PlacesView',\n\tcomponents: {\n\t\tImageMultipleOutline,\n\t\tNcEmptyContent,\n\t\tCollectionsList,\n\t\tCollectionCover,\n\t\tHeaderNavigation,\n\t},\n\n\tfilters: {\n\t\tcoverUrl(fileId: number) {\n\t\t\tif (fileId === -1) {\n\t\t\t\treturn ''\n\t\t\t}\n\n\t\t\treturn generateUrl(`/apps/photos/api/v1/preview/${fileId}?x=${512}&y=${512}`)\n\t\t},\n\t},\n\n\tmixins: [FetchCollectionsMixin],\n\n\tcomputed: {\n\t\tplaces() {\n\t\t\treturn this.$store.getters.places\n\t\t},\n\t},\n\n\tasync beforeMount() {\n\t\tthis.fetchPlaces()\n\t},\n\n\tmethods: {\n\t\tfetchPlaces() {\n\t\t\tthis.fetchCollections(placesPrefix)\n\t\t},\n\n\t\tt: translate,\n\t\tn: translatePlural,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.places-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t.place__name {\n\t\tfont-weight: normal;\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tfont-size: 20px;\n\t\tmargin-bottom: 12px;\n\t\tline-height: 30px;\n\t\tcolor: var(--color-main-text);\n\t}\n}\n</style>\n"],"names":["_sfc_main","ImageMultipleOutline","NcEmptyContent","CollectionsList","CollectionCover","HeaderNavigation","fileId","generateUrl","FetchCollectionsMixin","placesPrefix","translate","translatePlural"],"mappings":"4mBAsDA,MAAAA,EAAA,CACA,KAAA,aACA,WAAA,CACA,qBAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,iBAAAC,CACA,EAEA,QAAA,CACA,SAAAC,EAAA,CACA,OAAAA,IAAA,GACA,GAGAC,EAAA,+BAAAD,CAAA,cAAA,CAAA,CAEA,EAEA,OAAA,CAAAE,CAAA,EAEA,SAAA,CACA,QAAA,CACA,OAAA,KAAA,OAAA,QAAA,MAAA,CAEA,EAEA,MAAA,aAAA,CACA,KAAA,YAAA,CACA,EAEA,QAAA,CACA,aAAA,CACA,KAAA,iBAAAC,CAAA,CACA,EAEA,EAAAC,EACA,EAAAC,CAAA,CAEA"} |