photos/js/photos-src_mixins_FetchShar...

1 line
28 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js?v=9f8218f978fc5570f312","mappings":";qwCAiCA,SACCA,KAAM,yBAENC,KAHc,WAIb,MAAO,CACNC,oBAAqB,KACrBC,eAAe,EAEhB,EAEDC,OAAQ,UACPC,GAGKC,YAdQ,WAcM,0IACnB,EAAKC,cADc,4CAEnB,EAEDC,SAAU,EAAF,IACJC,EAAAA,EAAAA,IAAW,CACb,kBAIFC,QAAS,CACFH,YADE,WACY,0JACf,EAAKJ,cADU,iEAMlB,EAAKA,eAAgB,EACrB,EAAKD,oBAAsB,KAPT,SASKS,EAAAA,GAAAA,qBAAA,6BAAuCC,EAAAA,EAAAA,aAAvC,aAAuC,EAAkBC,IAAzD,iBAA6E,CACnGZ,KAAM,8hBAcNa,SAAS,EACTC,OAAQ,EAAKC,gBAAgBD,SAzBZ,OASZE,EATY,OA4BZC,EAASD,EAAShB,KACtBkB,QAAO,SAAAC,GAAK,aAAIA,EAAMC,WAAN,6BAA8BT,EAAAA,EAAAA,aAA9B,aAA8B,EAAkBC,IAAhD,gBAAJ,IACZS,KAAI,SAAAF,GAAK,OAAIG,EAAAA,EAAAA,IAAYH,EAAhB,IACTE,KAAI,SAAAF,GAAS,QACbA,EAAMI,cAAwC,KAAxBJ,EAAMI,cAAuB,GAAKJ,EAAMI,cAE9D,IAAMC,EAAYC,KAAKC,MAAL,oBAAWP,EAAMK,iBAAjB,aAAW,EAAiBG,QAAQ,UAAW,YAA/C,QAAuD,MAEjD,OAApBH,EAAUI,QACbJ,EAAUI,MAAQC,MAASC,OAC3BN,EAAUO,IAAMF,MAASC,QAG1B,IAAME,EAAoB,CACzBC,UAAWJ,IAAAA,KAAYL,EAAUI,OAAOM,OAAO,aAC/CC,QAASN,IAAAA,KAAYL,EAAUO,KAAKG,OAAO,cAG5C,OACQ,EAAP,KAAYf,GAAZ,GADGa,EAAkBC,YAAc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IkB,GAAG,KAAKd,EAAG,MAAM,CAACE,YAAY,kCAAkCN,EAAIkB,GAAG,KAAKlB,EAAIqB,GAAG,aAAa,GAAGrB,EAAIkB,GAAG,KAAMlB,EAAIsB,OAAc,QAAElB,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACN,EAAIqB,GAAG,YAAY,GAAGrB,EAAIU,KAAKV,EAAIkB,GAAG,KAAKd,EAAG,gBAAgB,CAACmB,WAAW,CAAC,CAAC/E,KAAK,OAAOgF,QAAQ,SAASC,MAAOzB,EAAW,QAAE0B,WAAW,YAAYpB,YAAY,8BAA8BN,EAAIkB,GAAG,KAAKd,EAAG,MAAM,CAACE,YAAY,oCAAoC,CAACN,EAAIqB,GAAG,UAAU,IAAI,EAAE,GACvlC,IKYpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/mixins/FetchSharedAlbumsMixin.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=84bb06ac&lang=scss&scoped=true&","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=template&id=84bb06ac&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?0c8a","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 { mapGetters } from 'vuex'\n\nimport moment from '@nextcloud/moment'\nimport { showError } from '@nextcloud/dialogs'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nimport client from '../services/DavClient.js'\nimport logger from '../services/logger.js'\nimport { genFileInfo } from '../utils/fileUtils.js'\nimport AbortControllerMixin from './AbortControllerMixin.js'\n\nexport default {\n\tname: 'FetchSharedAlbumsMixin',\n\n\tdata() {\n\t\treturn {\n\t\t\terrorFetchingAlbums: null,\n\t\t\tloadingAlbums: false,\n\t\t}\n\t},\n\n\tmixins: [\n\t\tAbortControllerMixin,\n\t],\n\n\tasync beforeMount() {\n\t\tthis.fetchAlbums()\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'sharedAlbums',\n\t\t]),\n\t},\n\n\tmethods: {\n\t\tasync fetchAlbums() {\n\t\t\tif (this.loadingAlbums) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tthis.loadingAlbums = true\n\t\t\t\tthis.errorFetchingAlbums = null\n\n\t\t\t\tconst response = await client.getDirectoryContents(`/photos/${getCurrentUser()?.uid}/sharedalbums`, {\n\t\t\t\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\t\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t\t<nc:last-photo />\n\t\t\t\t\t\t\t\t\t<nc:nbItems />\n\t\t\t\t\t\t\t\t\t<nc:location />\n\t\t\t\t\t\t\t\t\t<nc:dateRange />\n\t\t\t\t\t\t\t\t\t<nc:collaborators />\n\t\t\t\t\t\t\t\t\t<nc:publicLink />\n\t\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t</d:propfind>`,\n\t\t\t\t\tdetails: true,\n\t\t\t\t\tsignal: this.abortController.signal,\n\t\t\t\t})\n\n\t\t\t\tconst albums = response.data\n\t\t\t\t\t.filter(album => album.filename !== `/photos/${getCurrentUser()?.uid}/sharedalbums`)\n\t\t\t\t\t.map(album => genFileInfo(album))\n\t\t\t\t\t.map(album => {\n\t\t\t\t\t\talbum.collaborators = album.collaborators === '' ? [] : album.collaborators\n\n\t\t\t\t\t\tconst dateRange = JSON.parse(album.dateRange?.replace(/&quot;/g, '\"') ?? '{}')\n\n\t\t\t\t\t\tif (dateRange.start === null) {\n\t\t\t\t\t\t\tdateRange.start = moment().unix()\n\t\t\t\t\t\t\tdateRange.end = moment().unix()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst dateRangeFormated = {\n\t\t\t\t\t\t\tstartDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n\t\t\t\t\t\t\tendDate: moment.unix(dateRange.end).format('MMMM YYYY'),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dateRangeFormated.startDate === dateRangeFormated.endDate) {\n\t\t\t\t\t\t\treturn { ...album, date: dateRangeFormated.startDate }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn { ...album, date: this.t('photos', '{startDate} to {endDate}', dateRangeFormated) }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\tthis.$store.dispatch('addSharedAlbums', { albums })\n\t\t\t\tlogger.debug(`[FetchSharedAlbumsMixin] Fetched ${albums.length} new files: `, albums)\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingAlbums = 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.errorFetchingAlbums = error\n\t\t\t\t}\n\t\t\t\tlogger.error(t('photos', 'Failed to fetch albums list.'), error)\n\t\t\t\tshowError(t('photos', 'Failed to fetch albums list.'))\n\t\t\t} finally {\n\t\t\t\tthis.loadingAlbums = false\n\t\t\t}\n\t\t},\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\":\"AAoLA,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: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-84bb06ac]{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-84bb06ac]{position:absolute !important;left:0;margin:var(--photos-navigation-spacing) !important}.photos-navigation__title[data-v-84bb06ac]{max-width:50%;margin-right:calc(2*var(--photos-navigation-spacing));display:flex;flex-direction:column}.photos-navigation__title__main[data-v-84bb06ac]{margin:0;cursor:pointer}.photos-navigation__title__main[data-v-84bb06ac],.photos-navigation__title__sub[data-v-84bb06ac]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.photos-navigation__loader[data-v-84bb06ac]{margin-left:32px}.photos-navigation__content-right[data-v-84bb06ac]{display:flex;align-items:center;justify-content:center;margin-left:auto}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/HeaderNavigation.vue\"],\"names\":[],\"mappings\":\"AAqMA,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.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\tnavigationToggle.style.display = hide ? 'none' : null\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=84bb06ac&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=84bb06ac&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./HeaderNavigation.vue?vue&type=template&id=84bb06ac&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=84bb06ac&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 \"84bb06ac\",\n null\n \n)\n\nexport default component.exports"],"names":["name","data","errorFetchingAlbums","loadingAlbums","mixins","AbortControllerMixin","beforeMount","fetchAlbums","computed","mapGetters","methods","client","getCurrentUser","uid","details","signal","abortController","response","albums","filter","album","filename","map","genFileInfo","collaborators","dateRange","JSON","parse","replace","start","moment","unix","end","dateRangeFormated","startDate","format","endDate","date","t","$store","dispatch","logger","length","status","code","showError","___CSS_LOADER_EXPORT___","push","module","id","options","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","_t","$slots","directives","rawName","value","expression"],"sourceRoot":""}