photos/js/photos-src_services_Albums_...

1 line
30 KiB
XML

{"version":3,"file":"photos-src_services_Albums_js-src_components_HeaderNavigation_vue.js?v=83d6cebc536ff5084bbb","mappings":";8+CA6CA,SAASA,IAA+B,IAAjBC,EAAiB,uDAAJ,GACnC,MAAO,6XAAP,OAWMA,EAXN,2CAcA,CAUM,SAAeC,EAAtB,qFAAO,WAA0BC,EAAMC,GAAhC,6GAAyCH,EAAzC,+BAAsD,GAAII,EAA1D,+BAAmEC,EAAAA,GAAnE,kBAEkBD,EAAOE,KAAKJ,EAAZ,GACtBK,KAAMR,EAAcC,GACpBQ,SAAS,GACNL,IALC,cAECM,EAFD,OAQLC,EAAAA,EAAAA,MAAa,8BAA+B,CAAEH,KAAME,EAASF,OARxD,kBAUEI,EAAYF,EAASF,OAVvB,qCAYc,iBAAf,KAAMK,KAZL,0CAaG,MAbH,qGA4BA,SAAeC,EAAtB,qFAAO,WAA2BX,EAAMC,GAAjC,6GAA0CH,EAA1C,+BAAuD,GAAII,EAA3D,+BAAoEC,EAAAA,GAApE,kBAEkBD,EAAOU,qBAAqBZ,EAA5B,GACtBK,KAAMR,EAAcC,GACpBQ,SAAS,GACNL,IALC,cAECM,EAFD,OAQLC,EAAAA,EAAAA,MAAA,2BAAiCD,EAASF,KAAKQ,OAA/C,aAAkE,CAAER,KAAME,EAASF,OAR9E,kBAUEE,EAASF,KACdS,QAAO,SAAAC,GAAK,OAAIA,EAAMC,WAAahB,CAAvB,IACZiB,IAAIR,IAZD,qCAcc,iBAAf,KAAMC,KAdL,0CAeG,IAfH,qGA2BP,SAASD,EAAYM,GAAO,QAEO,KAA9BA,EAAMG,MAAMC,cACfJ,EAAMG,MAAMC,cAAgB,GACgC,WAAlD,EAAOJ,EAAMG,MAAMC,cAAcC,gBACvCC,MAAMC,QAAQP,EAAMG,MAAMC,cAAcC,cAC3CL,EAAMG,MAAMC,cAAgBJ,EAAMG,MAAMC,cAAcC,aAEtDL,EAAMG,MAAMC,cAAgB,CAACJ,EA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AAIQ,QAAQC,MAAM,CAAC,KAAO,YAAY,CAAGT,EAAIQ,OAAmPR,EAAIU,KAA/ON,EAAG,WAAW,CAACE,YAAY,0BAA0BG,MAAM,CAAC,KAAO,YAAYE,GAAG,CAAC,MAAQX,EAAIY,UAAUC,YAAYb,EAAIc,GAAG,CAAC,CAACC,IAAI,OAAOC,GAAG,WAAW,MAAO,CAACZ,EAAG,YAAY,CAACK,MAAM,CAAC,KAAO,MAAM,EAAEQ,OAAM,IAAO,MAAK,EAAM,cAAuBjB,EAAIkB,GAAG,KAAKd,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,KAAK,CAACE,YAAY,iCAAiCK,GAAG,CAAC,MAAQX,EAAImB,UAAU,CAACnB,EAAIkB,GAAG,WAAWlB,EAAIoB,GAAGpB,EAAIqB,MAAM,YAAYrB,EAAIkB,GAAG,KAAKd,EAAG,MAAM,CAACE,YAAY,kCAAkCN,EAAIkB,GAAG,KAAKlB,EAAIsB,GAAG,aAAa,GAAGtB,EAAIkB,GAAG,KAAMlB,EAAIuB,OAAc,QAAEnB,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACN,EAAIsB,GAAG,YAAY,GAAGtB,EAAIU,KAAKV,EAAIkB,GAAG,KAAKd,EAAG,gBAAgB,CAACoB,WAAW,CAAC,CAACH,KAAK,OAAOI,QAAQ,SAASC,MAAO1B,EAAW,QAAE2B,WAAW,YAAYrB,YAAY,8BAA8BN,EAAIkB,GAAG,KAAKd,EAAG,MAAM,CAACE,YAAY,oCAAoC,CAACN,EAAIsB,GAAG,UAAU,IAAI,EAAE,GACvlC,IKYpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/services/Albums.js","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=style&index=0&lang=scss&","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&lang=scss&scoped=true&","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=template&id=809e621a&scoped=true&","webpack:///photos/src/components/HeaderNavigation.vue","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=script&lang=js&","webpack://photos/./src/components/HeaderNavigation.vue?29e2","webpack://photos/./src/components/HeaderNavigation.vue?747f","webpack://photos/./src/components/HeaderNavigation.vue?6702"],"sourcesContent":["/**\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\nimport moment from '@nextcloud/moment'\nimport { translate } from '@nextcloud/l10n'\n\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/**\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 */\nfunction getDavRequest(extraProps = '') {\n\treturn `<?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 *\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 */\nexport async function fetchAlbum(path, options, extraProps = '', client = defaultClient) {\n\ttry {\n\t\tconst response = await client.stat(path, {\n\t\t\tdata: getDavRequest(extraProps),\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tlogger.debug('[Albums] Fetched an album: ', { data: response.data })\n\n\t\treturn formatAlbum(response.data)\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn null\n\t\t}\n\n\t\tthrow error\n\t}\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 */\nexport async function fetchAlbums(path, options, extraProps = '', client = defaultClient) {\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: getDavRequest(extraProps),\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tlogger.debug(`[Albums] Fetched ${response.data.length} albums: `, { data: response.data })\n\n\t\treturn response.data\n\t\t\t.filter(album => album.filename !== path)\n\t\t\t.map(formatAlbum)\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn []\n\t\t}\n\n\t\tthrow error\n\t}\n}\n\n/**\n *\n * @param {object} album - An album received from a webdav request.\n * @return {Album}\n */\nfunction formatAlbum(album) {\n\t// Ensure that we have a proper collaborators array.\n\tif (album.props.collaborators === '') {\n\t\talbum.props.collaborators = []\n\t} else if (typeof album.props.collaborators.collaborator === 'object') {\n\t\tif (Array.isArray(album.props.collaborators.collaborator)) {\n\t\t\talbum.props.collaborators = album.props.collaborators.collaborator\n\t\t} else {\n\t\t\talbum.props.collaborators = [album.props.collaborators.collaborator]\n\t\t}\n\t}\n\n\t// Extract custom props.\n\talbum = genFileInfo(album)\n\n\t// Compute date range label.\n\tconst dateRange = JSON.parse(album.dateRange?.replace(/&quot;/g, '\"') ?? '{}')\n\tif (dateRange.start === null) {\n\t\tdateRange.start = moment().unix()\n\t\tdateRange.end = moment().unix()\n\t}\n\tconst dateRangeFormatted = {\n\t\tstartDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n\t\tendDate: moment.unix(dateRange.end).format('MMMM YYYY'),\n\t}\n\tif (dateRangeFormatted.startDate === dateRangeFormatted.endDate) {\n\t\talbum.date = dateRangeFormatted.startDate\n\t} else {\n\t\talbum.date = translate('photos', '{startDate} to {endDate}', dateRangeFormatted)\n\t}\n\n\treturn album\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 {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Array>}\n */\nexport async function fetchAlbumContent(path, options, client = defaultClient) {\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: DavRequest,\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tconst fetchedFiles = response.data\n\t\t\t.map(file => genFileInfo(file))\n\t\t\t.filter(file => file.fileid)\n\n\t\tlogger.debug(`[Albums] Fetched ${fetchedFiles.length} new files: `, fetchedFiles)\n\n\t\treturn fetchedFiles\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn []\n\t\t}\n\n\t\tlogger.error('Error fetching album files', { error })\n\t\tconsole.error(error)\n\n\t\tthrow error\n\t}\n}\n","// 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, \":root{--photos-navigation-height: 64px;--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2)}button.app-navigation-toggle{top:0 !important;right:calc(var(--photos-navigation-height)*-1) !important;margin:var(--photos-navigation-spacing) !important}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/HeaderNavigation.vue\"],\"names\":[],\"mappings\":\"AAsLA,MACC,gCAAA,CAEA,+EAAA,CAID,6BAEC,gBAAA,CACA,yDAAA,CACA,kDAAA\",\"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:root {\\n\\t--photos-navigation-height: 64px;\\n\\t// header height - button size\\n\\t--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2);\\n}\\n\\n// Properly position the navigation toggle button\\nbutton.app-navigation-toggle {\\n\\t// App-navigation have a 4px margin top\\n\\ttop: 0 !important;\\n\\tright: calc(var(--photos-navigation-height) * -1) !important;\\n\\tmargin: var(--photos-navigation-spacing) !important;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// 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, \".photos-navigation[data-v-809e621a]{position:-webkit-sticky;position:sticky;z-index:20;top:0;display:flex;align-items:center;width:100%;min-height:var(--photos-navigation-height);padding:0 var(--photos-navigation-height);background:var(--color-main-background)}.photos-navigation__back[data-v-809e621a]{position:absolute !important;left:0;margin:var(--photos-navigation-spacing) !important}.photos-navigation__title[data-v-809e621a]{max-width:50%;margin-right:calc(2*var(--photos-navigation-spacing));display:flex;flex-direction:column}.photos-navigation__title__main[data-v-809e621a]{margin:0;cursor:pointer}.photos-navigation__title__main[data-v-809e621a],.photos-navigation__title__sub[data-v-809e621a]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.photos-navigation__loader[data-v-809e621a]{margin-left:32px}.photos-navigation__content-right[data-v-809e621a]{display:flex;align-items:center;justify-content:center;margin-left:auto}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/HeaderNavigation.vue\"],\"names\":[],\"mappings\":\"AAuMA,oCACC,uBAAA,CAAA,eAAA,CACA,UAAA,CACA,KAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,0CAAA,CACA,yCAAA,CACA,uCAAA,CAEA,0CAEC,4BAAA,CACA,MAAA,CACA,kDAAA,CAGD,2CACC,aAAA,CACA,qDAAA,CACA,YAAA,CACA,qBAAA,CAEA,iDACC,QAAA,CACA,cAAA,CAGD,iGACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,4CACC,gBAAA,CAGD,mDACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,gBAAA\",\"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.photos-navigation {\\n\\tposition: sticky;\\n\\tz-index: 20;\\n\\ttop: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\twidth: 100%;\\n\\tmin-height: var(--photos-navigation-height);\\n\\tpadding: 0 var(--photos-navigation-height);\\n\\tbackground: var(--color-main-background);\\n\\n\\t&__back {\\n\\t\\t// Above the navigation menu\\n\\t\\tposition: absolute !important;\\n\\t\\tleft: 0;\\n\\t\\tmargin: var(--photos-navigation-spacing) !important;\\n\\t}\\n\\n\\t&__title {\\n\\t\\tmax-width: 50%;\\n\\t\\tmargin-right: calc(2 * var(--photos-navigation-spacing));\\n\\t\\tdisplay: flex;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&__main {\\n\\t\\t\\tmargin: 0;\\n\\t\\t\\tcursor: pointer;\\n\\t\\t}\\n\\n\\t\\t&__main, &__sub {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\twhite-space: nowrap;\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t}\\n\\t}\\n\\n\\t&__loader {\\n\\t\\tmargin-left: 32px;\\n\\t}\\n\\n\\t&__content-right {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tjustify-content: center;\\n\\t\\tmargin-left: auto;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"photos-navigation\",class:{'photos-navigation--root': _vm.isRoot},attrs:{\"role\":\"toolbar\"}},[(!_vm.isRoot)?_c('NcButton',{staticClass:\"photos-navigation__back\",attrs:{\"type\":\"tertiary\"},on:{\"click\":_vm.folderUp},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('ArrowLeft',{attrs:{\"size\":20}})]},proxy:true}],null,false,1821202730)}):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__title\"},[_c('h2',{staticClass:\"photos-navigation__title__main\",on:{\"click\":_vm.refresh}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.name)+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__title__sub\"}),_vm._v(\" \"),_vm._t(\"subtitle\")],2),_vm._v(\" \"),(_vm.$slots.default)?_c('div',{staticClass:\"photos-navigation__content\"},[_vm._t(\"default\")],2):_vm._e(),_vm._v(\" \"),_c('NcLoadingIcon',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"photos-navigation__loader\"}),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__content-right\"},[_vm._t(\"right\")],2)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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\n<template>\n\t<div :class=\"{'photos-navigation--root': isRoot}\" class=\"photos-navigation\" role=\"toolbar\">\n\t\t<!-- Back navigation button -->\n\t\t<NcButton v-if=\"!isRoot\"\n\t\t\tclass=\"photos-navigation__back\"\n\t\t\ttype=\"tertiary\"\n\t\t\t@click=\"folderUp\">\n\t\t\t<template #icon>\n\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<!-- Main Navigation title -->\n\t\t<div class=\"photos-navigation__title\">\n\t\t\t<h2 class=\"photos-navigation__title__main\" @click=\"refresh\">\n\t\t\t\t{{ name }}\n\t\t\t</h2>\n\t\t\t<div class=\"photos-navigation__title__sub\" />\n\t\t\t<slot name=\"subtitle\" />\n\t\t</div>\n\n\t\t<!-- Main slot -->\n\t\t<div v-if=\"$slots.default\" class=\"photos-navigation__content\">\n\t\t\t<slot />\n\t\t</div>\n\n\t\t<NcLoadingIcon v-show=\"loading\" class=\"photos-navigation__loader\" />\n\n\t\t<div class=\"photos-navigation__content-right\">\n\t\t\t<slot name=\"right\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\n\nimport { NcButton, NcLoadingIcon } from '@nextcloud/vue'\n\nexport default {\n\tname: 'HeaderNavigation',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\tdefault: '/',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\trootTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: t('photos', 'Photos'),\n\t\t},\n\t\t// The route params\n\t\tparams: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tisRoot() {\n\t\t\tconst isRoot = this.path === '/'\n\t\t\tthis.toggleNavigationButton(!isRoot)\n\t\t\treturn isRoot\n\t\t},\n\n\t\tname() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn this.rootTitle\n\t\t\t}\n\t\t\treturn this.title\n\t\t},\n\n\t\tparentPath() {\n\t\t\tconst path = this.path.split('/')\n\t\t\tpath.pop()\n\t\t\tconst parent = path.join('/')\n\t\t\treturn this.isRoot || parent.trim() === ''\n\t\t\t\t? '/'\n\t\t\t\t: path.join('/')\n\t\t},\n\n\t\tparentName() {\n\t\t\treturn this.parentPath && this.parentPath.split('/').pop()\n\t\t},\n\n\t\tbackToText() {\n\t\t\tif (this.parentPath === '/') {\n\t\t\t\treturn t('photos', 'Back to {folder}', { folder: this.rootTitle })\n\t\t\t}\n\t\t\treturn t('photos', 'Back to {folder}', { folder: this.parentName })\n\t\t},\n\n\t\t/**\n\t\t * We do not want encoded slashes when browsing by folder\n\t\t * so we generate a new valid route object, get the final url back\n\t\t * decode it and use it as a direct string, which vue-router\n\t\t * does not encode afterwards\n\t\t *\n\t\t * @return {string|object}\n\t\t */\n\t\tto() {\n\t\t\t// always remove first slash, the router\n\t\t\t// manage it automatically\n\t\t\tconst regex = /^\\/?(.*)/i\n\t\t\tconst path = regex.exec(this.parentPath)[1]\n\n\t\t\t// apply to current route\n\t\t\tconst { name, params } = Object.assign({}, this.$route, {\n\t\t\t\tparams: this.params || { path },\n\t\t\t})\n\n\t\t\t// return the full object as we don't care about\n\t\t\t// an empty path if this is route\n\t\t\tif (path === '') {\n\t\t\t\treturn { name }\n\t\t\t}\n\n\t\t\t// returning a string prevent vue-router to encode it again\n\t\t\treturn decodeURIComponent(this.$router.resolve({ name, params }).resolved.path)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tfolderUp() {\n\t\t\tthis.$router.push(this.to)\n\t\t},\n\n\t\trefresh() {\n\t\t\tthis.$emit('refresh')\n\t\t},\n\n\t\ttoggleNavigationButton(hide) {\n\t\t\t// Hide the navigation toggle if the back button is shown\n\t\t\tconst navigationToggle = document.querySelector('button.app-navigation-toggle')\n\t\t\tif (navigationToggle !== null) {\n\t\t\t\tnavigationToggle.style.display = hide ? 'none' : null\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n:root {\n\t--photos-navigation-height: 64px;\n\t// header height - button size\n\t--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2);\n}\n\n// Properly position the navigation toggle button\nbutton.app-navigation-toggle {\n\t// App-navigation have a 4px margin top\n\ttop: 0 !important;\n\tright: calc(var(--photos-navigation-height) * -1) !important;\n\tmargin: var(--photos-navigation-spacing) !important;\n}\n\n</style>\n\n<style lang=\"scss\" scoped>\n.photos-navigation {\n\tposition: sticky;\n\tz-index: 20;\n\ttop: 0;\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\tmin-height: var(--photos-navigation-height);\n\tpadding: 0 var(--photos-navigation-height);\n\tbackground: var(--color-main-background);\n\n\t&__back {\n\t\t// Above the navigation menu\n\t\tposition: absolute !important;\n\t\tleft: 0;\n\t\tmargin: var(--photos-navigation-spacing) !important;\n\t}\n\n\t&__title {\n\t\tmax-width: 50%;\n\t\tmargin-right: calc(2 * var(--photos-navigation-spacing));\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&__main {\n\t\t\tmargin: 0;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&__main, &__sub {\n\t\t\toverflow: hidden;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t}\n\n\t&__loader {\n\t\tmargin-left: 32px;\n\t}\n\n\t&__content-right {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tmargin-left: auto;\n\t}\n}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.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!./HeaderNavigation.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!./HeaderNavigation.vue?vue&type=style&index=0&lang=scss&\";\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!./HeaderNavigation.vue?vue&type=style&index=0&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\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!./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&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!./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./HeaderNavigation.vue?vue&type=template&id=809e621a&scoped=true&\"\nimport script from \"./HeaderNavigation.vue?vue&type=script&lang=js&\"\nexport * from \"./HeaderNavigation.vue?vue&type=script&lang=js&\"\nimport style0 from \"./HeaderNavigation.vue?vue&type=style&index=0&lang=scss&\"\nimport style1 from \"./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&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 \"809e621a\",\n null\n \n)\n\nexport default component.exports"],"names":["getDavRequest","extraProps","fetchAlbum","path","options","client","defaultClient","stat","data","details","response","logger","formatAlbum","code","fetchAlbums","getDirectoryContents","length","filter","album","filename","map","props","collaborators","collaborator","Array","isArray","genFileInfo","dateRange","JSON","parse","replace","start","moment","unix","end","dateRangeFormatted","startDate","format","endDate","date","translate","fetchAlbumContent","DavRequest","fetchedFiles","file","fileid","error","console","___CSS_LOADER_EXPORT___","push","module","id","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","staticClass","class","isRoot","attrs","_e","on","folderUp","scopedSlots","_u","key","fn","proxy","_v","refresh","_s","name","_t","$slots","directives","rawName","value","expression"],"sourceRoot":""}