photos/js/photos-3.js.map

1 line
15 KiB
Plaintext
Raw Normal View History

{"version":3,"file":"photos-3.js?v=bd6e74dbcdfcdf4e5596","sources":["webpack:///./src/components/FolderTagPreview.vue?d185","webpack:///./src/components/FolderTagPreview.vue?a7f7","webpack:///./src/components/FolderTagPreview.vue?2462","webpack:///./src/components/FolderTagPreview.vue?f29f","webpack:///./src/components/FolderTagPreview.vue","webpack:///./src/components/FolderTagPreview.vue?c186","webpack:///./src/components/FolderTagPreview.vue?4992","webpack:///./src/components/FolderTagPreview.vue?809e"],"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//\nimport { generateUrl } from '@nextcloud/router';\nexport default {\n name: 'FolderTagPreview',\n props: {\n icon: {\n type: String,\n default: 'icon-folder'\n },\n id: {\n type: Number,\n required: true\n },\n name: {\n type: String,\n required: true\n },\n path: {\n type: String,\n required: true\n },\n fileList: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n loaded: false,\n failed: []\n };\n },\n computed: {\n // folder is empty\n isEmpty: function isEmpty() {\n return this.previewList.length === 0;\n },\n ariaUuid: function ariaUuid() {\n return \"folder-\".concat(this.id);\n },\n ariaLabel: function ariaLabel() {\n return t('photos', 'Open the \"{name}\" sub-directory', {\n name: this.name\n });\n },\n\n /**\n * Previews list without the failed ones\n * @returns {Object[]} the previews fileinfo\n */\n previewList: function previewList() {\n var _this = this;\n\n return this.fileList.filter(function (file) {\n return _this.failed.indexOf(file.fileid) === -1;\n });\n },\n\n /**\n * We do not want encoded slashes when browsing by folder\n * so we generate a new valid route object based on the\n * current named route, get the final url back, decode it\n * and use it as a direct string.\n * Which vue-router does not encode afterwards!\n * @returns {string}\n */\n to: function to() {\n // always remove first slash, the router\n // manage it automatically\n var regex = /^\\/?(.+)/i;\n var path = regex.exec(this.path)[1]; // apply to current route\n\n return Object.assign({}, this.$route, {\n params: {\n path: path\n }\n });\n }\n },\n methods: {\n generateImgSrc: function generateImgSrc(_ref) {\n var fileid = _ref.fileid,\n etag = _ref.etag;\n // use etag to force cache reload if file changed\n return generateUrl(\"/core/preview?fileId=\".concat(fileid, \"&x=\", 256, \"&y=\", 256, \"&a=true&v=\").concat(etag));\n },\n onPreviewFail: function onPreviewFail(_ref2) {\n var fileid = _ref2.fileid;\n this.failed.push(fileid);\n }\n }\n};","// Imports\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license GNU AGPL version 3 or any later version\\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 Publi