Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js')
-rw-r--r--js/photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js3
1 files changed, 0 insertions, 3 deletions
diff --git a/js/photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js b/js/photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js
deleted file mode 100644
index 737d5279..00000000
--- a/js/photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! For license information please see photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js.LICENSE.txt */
-"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue"],{49723:(n,o,a)=>{a.d(o,{Z:()=>v});var i=a(20629),e=a(80351),r=a.n(e),s=a(82880),c=a(45994),p=a(81067),l=a(59537),u=a(94236);function g(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.push.apply(o,a)}return o}function A(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){h(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))}))}return n}function h(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function m(n,t,o,a,i,e,r){try{var s=n[e](r),c=s.value}catch(n){return void o(n)}s.done?t(c):Promise.resolve(c).then(a,i)}function d(n){return function(){var t=this,o=arguments;return new Promise((function(a,i){var e=n.apply(t,o);function r(n){m(e,a,i,r,s,"next",n)}function s(n){m(e,a,i,r,s,"throw",n)}r(void 0)}))}}const v={name:"FetchSharedAlbumsMixin",data:function(){return{errorFetchingAlbums:null,loadingAlbums:!1}},mixins:[a(69363).Z],beforeMount:function(){var n=this;return d(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.fetchAlbums();case 1:case"end":return t.stop()}}),t)})))()},computed:A({},(0,i.Se)(["sharedAlbums"])),methods:{fetchAlbums:function(){var n=this;return d(regeneratorRuntime.mark((function o(){var a,i,e,g;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!n.loadingAlbums){o.next=2;break}return o.abrupt("return");case 2:return o.prev=2,n.loadingAlbums=!0,n.errorFetchingAlbums=null,o.next=7,p.ZP.getDirectoryContents("/photos/".concat(null===(a=(0,c.ts)())||void 0===a?void 0:a.uid,"/sharedalbums"),{data:'<?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>',details:!0,signal:n.abortController.signal});case 7:i=o.sent,e=i.data.filter((function(n){var t;return n.filename!=="/photos/".concat(null===(t=(0,c.ts)())||void 0===t?void 0:t.uid,"/sharedalbums")})).map((function(n){return(0,u.AX)(n)})).map((function(t){var o,a;t.collaborators=""===t.collaborators?[]:t.collaborators;var i=JSON.parse(null!==(o=null===(a=t.dateRange)||void 0===a?void 0:a.replace(/&quot;/g,'"'))&&void 0!==o?o:"{}");null===i.start&&(i.start=r()().unix(),i.end=r()().unix());var e={startDate:r().unix(i.start).format("MMMM YYYY"),endDate:r().unix(i.end).format("MMMM YYYY")};return A(A({},t),{},e.startDate===e.endDate?{date:e.startDate}:{date:n.t("photos","{startDate} to {endDate}",e)})})),n.$store.dispatch("addSharedAlbums",{albums:e}),l.Z.debug("[FetchSharedAlbumsMixin] Fetched ".concat(e.length," new files: "),e),o.next=26;break;case 13:if(o.prev=13,o.t0=o.catch(2),404!==(null===(g=o.t0.response)||void 0===g?void 0:g.status)){o.next=19;break}n.errorFetchingAlbums=404,o.next=24;break;case 19:if("ERR_CANCELED"!==o.t0.code){o.next=23;break}return o.abrupt("return");case 23:n.errorFetchingAlbums=o.t0;case 24:l.Z.error(t("photos","Failed to fetch albums list."),o.t0),(0,s.showError)(t("photos","Failed to fetch albums list."));case 26:return o.prev=26,n.loadingAlbums=!1,o.finish(26);case 29:case"end":return o.stop()}}),o,null,[[2,13,26,29]])})))()}}}},6179:(n,t,o)=>{o.d(t,{Z:()=>s});var a=o(87537),i=o.n(a),e=o(23645),r=o.n(e)()(i());r.push([n.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:""}]);const s=r},55620:(n,t,o)=>{o.d(t,{Z:()=>s});var a=o(87537),i=o.n(a),e=o(23645),r=o.n(e)()(i());r.push([n.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:""}]);const s=r},27248:(n,o,a)=>{a.d(o,{Z:()=>y});var i=a(76240),e=a(33476);const r={name:"HeaderNavigation",components:{ArrowLeft:i.default,NcButton:e.NcButton,NcLoadingIcon:e.NcLoadingIcon},inheritAttrs:!1,props:{loading:{type:Boolean,default:!1},path:{type:String,default:"/"},title:{type:String,required:!0},rootTitle:{type:String,default:t("photos","Photos")},params:{type:Object,default:null}},computed:{isRoot:function(){var n="/"===this.path;return this.toggleNavigationButton(!n),n},name:function(){return this.isRoot?this.rootTitle:this.title},parentPath:function(){var n=this.path.split("/");n.pop();var t=n.join("/");return this.isRoot||""===t.trim()?"/":n.join("/")},parentName:function(){return this.parentPath&&this.parentPath.split("/").pop()},backToText:function(){return"/"===this.parentPath?t("photos","Back to {folder}",{folder:this.rootTitle}):t("photos","Back to {folder}",{folder:this.parentName})},to:function(){var n=/^\/?(.*)/i.exec(this.parentPath)[1],t=Object.assign({},this.$route,{params:this.params||{path:n}}),o=t.name,a=t.params;return""===n?{name:o}:decodeURIComponent(this.$router.resolve({name:o,params:a}).resolved.path)}},methods:{folderUp:function(){this.$router.push(this.to)},refresh:function(){this.$emit("refresh")},toggleNavigationButton:function(n){document.querySelector("button.app-navigation-toggle").style.display=n?"none":null}}};var s=a(93379),c=a.n(s),p=a(7795),l=a.n(p),u=a(90569),g=a.n(u),A=a(3565),h=a.n(A),m=a(19216),d=a.n(m),v=a(44589),b=a.n(v),f=a(6179),C={};C.styleTagTransform=b(),C.setAttributes=h(),C.insert=g().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=d();c()(f.Z,C);f.Z&&f.Z.locals&&f.Z.locals;var _=a(55620),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=g().bind(null,"head"),x.domAPI=l(),x.insertStyleElement=d();c()(_.Z,x);_.Z&&_.Z.locals&&_.Z.locals;const y=(0,a(51900).Z)(r,(function(){var n=this,t=n.$createElement,o=n._self._c||t;return o("div",{staticClass:"photos-navigation",class:{"photos-navigation--root":n.isRoot},attrs:{role:"toolbar"}},[n.isRoot?n._e():o("NcButton",{staticClass:"photos-navigation__back",attrs:{type:"tertiary"},on:{click:n.folderUp},scopedSlots:n._u([{key:"icon",fn:function(){return[o("ArrowLeft",{attrs:{size:20}})]},proxy:!0}],null,!1,1821202730)}),n._v(" "),o("div",{staticClass:"photos-navigation__title"},[o("h2",{staticClass:"photos-navigation__title__main",on:{click:n.refresh}},[n._v("\n\t\t\t"+n._s(n.name)+"\n\t\t")]),n._v(" "),o("div",{staticClass:"photos-navigation__title__sub"}),n._v(" "),n._t("subtitle")],2),n._v(" "),n.$slots.default?o("div",{staticClass:"photos-navigation__content"},[n._t("default")],2):n._e(),n._v(" "),o("NcLoadingIcon",{directives:[{name:"show",rawName:"v-show",value:n.loading,expression:"loading"}],staticClass:"photos-navigation__loader"}),n._v(" "),o("div",{staticClass:"photos-navigation__content-right"},[n._t("right")],2)],1)}),[],!1,null,"84bb06ac",null).exports}}]);
-//# sourceMappingURL=photos-src_mixins_FetchSharedAlbumsMixin_js-src_components_HeaderNavigation_vue.js.map?v=9f8218f978fc5570f312 \ No newline at end of file