You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/public/js/discover.chunk.8698471944aa...

1 line
31 KiB
JavaScript

"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[6535],{2428:(t,e,a)=>{a.r(e),a.d(e,{default:()=>i});var s=a(16595),n={};for(const t in s)"default"!==t&&(n[t]=()=>s[t]);a.d(e,n);const i=s.default},5787:(t,e,a)=>{a.r(e),a.d(e,{default:()=>r});var s=a(16286),n=a(80260),i={};for(const t in n)"default"!==t&&(i[t]=()=>n[t]);a.d(e,i);a(89069);const r=(0,a(14486).default)(n.default,s.render,s.staticRenderFns,!1,null,null,null).exports},16286:(t,e,a)=>{a.r(e);var s=a(69831),n={};for(const t in s)"default"!==t&&(n[t]=()=>s[t]);a.d(e,n)},16595:(t,e,a)=>{a.r(e),a.d(e,{default:()=>s});const s={props:{profile:{type:Object}},data:function(){return{loading:!0,trending:[],range:"daily",breadcrumbItems:[{text:"Discover",href:"/i/web/discover"},{text:"Trending",active:!0}]}},mounted:function(){this.loadTrending()},methods:{fetchData:function(){var t=this;axios.get("/api/pixelfed/v2/discover/posts").then((function(e){t.posts=e.data.posts.filter((function(t){return null!=t})),t.recommendedLoading=!1}))},loadTrending:function(){var t=this;this.loading=!0,axios.get("/api/pixelfed/v2/discover/posts/trending",{params:{range:this.range}}).then((function(e){var a=e.data.filter((function(t){return null!==t}));t.trending=a.filter((function(t){return 0==t.sensitive})),"daily"==t.range&&0==a.length&&(t.range="yearly",t.loadTrending()),t.loading=!1}))},formatCount:function(t){return App.util.format.count(t)},goToPost:function(t){this.$router.push({name:"post",params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},rangeToggle:function(t){event.currentTarget.blur(),this.range=t,this.loadTrending()}}}},22699:(t,e,a)=>{a.r(e);var s=a(30916),n={};for(const t in s)"default"!==t&&(n[t]=()=>s[t]);a.d(e,n)},28724:(t,e,a)=>{a.r(e),a.d(e,{default:()=>r});var s=a(5787),n=a(28772),i=a(88675);const r={components:{drawer:s.default,sidebar:n.default,discover:i.default},data:function(){return{profile:void 0}},mounted:function(){this.profile=window._sharedData.user}}},28772:(t,e,a)=>{a.r(e),a.d(e,{default:()=>r});var s=a(22699),n=a(75223),i={};for(const t in n)"default"!==t&&(i[t]=()=>n[t]);a.d(e,i);a(43550);const r=(0,a(14486).default)(n.default,s.render,s.staticRenderFns,!1,null,null,null).exports},30916:(t,e,a)=>{a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>n});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"sidebar-component sticky-top d-none d-md-block"},[e("div",{staticClass:"card shadow-sm mb-3",staticStyle:{"border-radius":"15px"}},[e("div",{staticClass:"card-body p-2"},[e("div",{staticClass:"media user-card user-select-none"},[e("div",{staticStyle:{position:"relative"}},[e("img",{staticClass:"avatar shadow cursor-pointer",attrs:{src:t.user.avatar,draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"},on:{click:function(e){return t.gotoMyProfile()}}}),t._v(" "),e("button",{staticClass:"btn btn-light btn-sm avatar-update-btn",on:{click:function(e){return t.updateAvatar()}}},[e("span",{staticClass:"avatar-update-btn-icon"})])]),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"display-name",domProps:{innerHTML:t._s(t.getDisplayName())}}),t._v(" "),e("p",{staticClass:"username primary"},[t._v("@"+t._s(t.user.username))]),t._v(" "),e("p",{staticClass:"stats"},[e("span",{staticClass:"stats-following"},[e("span",{staticClass:"following-count"},[t._v(t._s(t.formatCount(t.user.following_count)))]),t._v(" Following\n\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"stats-followers"},[e("span",{staticClass:"followers-count"},[t._v(t._s(t.formatCount(t.user.followers_count)))]),t._v(" Followers\n\t\t\t\t\t\t\t")])])])])])]),t._v(" "),e("div",{staticClass:"btn-group btn-group-lg btn-block mb-4"},[e("router-link",{staticClass:"btn btn-primary btn-block font-weight-bold",attrs:{to:"/i/web/compose"}},[e("i",{staticClass:"fal fa-arrow-circle-up mr-1"}),t._v(" "+t._s(t.$t("navmenu.compose"))+" Post\n\t\t\t")]),t._v(" "),t._m(0),t._v(" "),e("div",{staticClass:"dropdown-menu dropdown-menu-right"},[e("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:"/i/c