mirror of https://github.com/pixelfed/pixelfed.git
1 line
3.0 KiB
JavaScript
1 line
3.0 KiB
JavaScript
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[5273],{52098:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});s(79059),s(66638);var i=s(74692);window.Zuck=s(62175);const o={props:["pid"],data:function(){return{loading:!0,stories:{},preloadIndex:null}},beforeMount:function(){this.fetchStories()},methods:{fetchStories:function(){var t=this;axios.get("/api/stories/v0/profile/"+this.pid).then((function(e){t.stories=e.data,0!=e.data.length?t.preloadImages():window.location.href="/"})).catch((function(t){console.log(t)}))},preloadImages:function(){for(var t=this,e=0;e<this.stories[0].items.length;e++){var s=new Image;i(s).on("load",(function(){t.preloadIndex=e,e!=t.stories[0].items.length||t.loadViewer()})),s.src=t.stories[0].items[e].src}},loadViewer:function(){var t=this.stories;window.stories||(window.stories=new Zuck("storyContainer",{stories:t,localStorage:!1,callbacks:{onOpen:function(t,e){document.body.style.overflow="hidden",e()},onEnd:function(t,e){axios.post("/i/stories/viewed",{id:t}),e()},onClose:function(t,e){document.body.style.overflow="auto",e(),window.location.href="/"}}}),this.loading=!1,document.querySelectorAll("#storyContainer .story")[0].click())}}}},32095:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[t.loading?e("div",{staticClass:"row"},[t._m(0)]):t._e(),t._v(" "),0!=t.stories.length?e("div",[e("div",{staticClass:"d-none m-3",attrs:{id:"storyContainer"}})]):t._e()])},o=[function(){var t=this._self._c;return t("div",{staticClass:"col-12 mt-5 pt-5"},[t("div",{staticClass:"text-center"},[t("div",{staticClass:"spinner-border",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])])])}]},63353:(t,e,s)=>{Vue.component("story-viewer",s(72632).default)},15243:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,"#storyContainer .story{margin-right:2rem;max-width:64px;width:100%}.stories.carousel .story>.item-link>.item-preview{height:64px}#zuck-modal.with-effects{width:100%}.stories.carousel .story>.item-link>.info .name{font-size:12px;font-weight:600}",""]);const n=o},61242:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(85072),o=s.n(i),n=s(15243),r={insert:"head",singleton:!1};o()(n.default,r);const a=n.default.locals||{}},72632:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(72536),o=s(34943),n={};for(const t in o)"default"!==t&&(n[t]=()=>o[t]);s.d(e,n);s(52987);const r=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},34943:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(52098),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const n=i.default},72536:(t,e,s)=>{"use strict";s.r(e);var i=s(32095),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},52987:(t,e,s)=>{"use strict";s.r(e);var i=s(61242),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)}},t=>{t.O(0,[3660],(()=>{return e=63353,t(t.s=e);var e}));t.O()}]); |