pixelfed/public/js/profile-directory.js

19 lines
8.1 KiB
JavaScript

(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/profile-directory"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js":
/*!*****************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js ***!
\*****************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});const o={data:function(){return{loaded:!1,showLoadMore:!0,profiles:[],page:1}},beforeMount:function(){this.fetchData()},methods:{fetchData:function(){var e=this;axios.get("/api/pixelfed/v2/discover/profiles",{params:{page:this.page}}).then((function(t){if(0==t.data.length)return e.showLoadMore=!1,void(e.loaded=!0);e.profiles=t.data,e.showLoadMore=8==e.profiles.length,e.loaded=!0}))},prettyCount:function(e){return App.util.format.count(e)},loadMore:function(){this.loaded=!1,this.page++,this.fetchData()},thumbUrl:function(e){return e.media_attachments[0].url}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{render:()=>o,staticRenderFns:()=>r});var o=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"col-12"},[t("p",{staticClass:"font-weight-bold text-lighter text-uppercase"},[e._v("Profiles Directory")]),e._v(" "),e.loaded?t("div",{},[t("div",{staticClass:"row"},[e._l(e.profiles,(function(s,o){return t("div",{staticClass:"col-12 col-md-6 p-1"},[t("div",{staticClass:"card card-body border shadow-none py-2"},[t("div",{staticClass:"media"},[t("a",{attrs:{href:s.url}},[t("img",{staticClass:"rounded-circle border mr-3",attrs:{src:s.avatar,alt:"...",width:"40px",height:"40px"}})]),e._v(" "),t("div",{staticClass:"media-body"},[t("p",{staticClass:"mt-0 mb-0 font-weight-bold"},[t("a",{staticClass:"text-dark",attrs:{href:s.url}},[e._v(e._s(s.username))])]),e._v(" "),t("p",{staticClass:"mb-1 small text-lighter d-flex justify-content-between font-weight-bold"},[t("span",[t("span",[e._v(e._s(e.prettyCount(s.statuses_count)))]),e._v(" POSTS\n\t\t\t\t\t\t\t\t\t")]),e._v(" "),t("span",[t("span",[e._v(e._s(e.prettyCount(s.followers_count)))]),e._v(" FOLLOWERS\n\t\t\t\t\t\t\t\t\t")])]),e._v(" "),t("p",{staticClass:"mb-1"},e._l(s.posts,(function(s,o){return t("span",{key:"profile_posts_"+o,staticClass:"shadow-sm"},[t("a",{staticClass:"text-decoration-none mr-1",attrs:{href:s.url}},[t("img",{staticClass:"border rounded",attrs:{src:e.thumbUrl(s),width:"62.3px",height:"62.3px"}})])])})),0)])])])])})),e._v(" "),e.showLoadMore?t("div",{staticClass:"col-12"},[t("p",{staticClass:"text-center mb-0 pt-3"},[t("button",{staticClass:"btn btn-outline-secondary btn-sm px-4 py-1 font-weight-bold",on:{click:function(t){return e.loadMore()}}},[e._v("Load More")])])]):e._e()],2)]):t("div",[e._m(0)])])])},r=[function(){var e=this._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 d-flex justify-content-center align-items-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])])}];o._withStripped=!0},"./resources/assets/js/profile-directory.js":
/*!**************************************************!*\
!*** ./resources/assets/js/profile-directory.js ***!
\**************************************************/(e,t,s)=>{Vue.component("profile-directory",s(/*! ./components/ProfileDirectory.vue */"./resources/assets/js/components/ProfileDirectory.vue").default)},"./resources/assets/js/components/ProfileDirectory.vue":
/*!*************************************************************!*\
!*** ./resources/assets/js/components/ProfileDirectory.vue ***!
\*************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var o=s(/*! ./ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true */"./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true"),r=s(/*! ./ProfileDirectory.vue?vue&type=script&lang=js */"./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js"),a={};for(const e in r)"default"!==e&&(a[e]=()=>r[e]);s.d(t,a);var i=(0,s(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(r.default,o.render,o.staticRenderFns,!1,null,"9cec2a0a",null);i.options.__file="resources/assets/js/components/ProfileDirectory.vue";const l=i.exports},"./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js":
/*!*************************************************************************************!*\
!*** ./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js ***!
\*************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var o=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProfileDirectory.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=script&lang=js"),r={};for(const e in o)"default"!==e&&(r[e]=()=>o[e]);s.d(t,r);const a=o.default},"./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true":
/*!*******************************************************************************************************!*\
!*** ./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true ***!
\*******************************************************************************************************/(e,t,s)=>{"use strict";s.r(t);var o=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ProfileDirectory.vue?vue&type=template&id=9cec2a0a&scoped=true"),r={};for(const e in o)"default"!==e&&(r[e]=()=>o[e]);s.d(t,r)}},e=>{e.O(0,["/js/vendor"],(()=>{return t="./resources/assets/js/profile-directory.js",e(e.s=t);var t}));e.O()}]);