pixelfed/public/js/components.js

1 line
414 KiB
JavaScript
Raw Normal View History

2018-11-27 09:17:27 +00:00
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=2)}({"/7en":function(t,e,n){var i,r;"undefined"!=typeof window&&window,void 0===(r="function"==typeof(i=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],r=0;r<n.length;r++){var o=n[r];i&&i[o]&&(this.off(t,o),delete i[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})?i.call(e,n,e,t):i)||(t.exports=r)},"/WdB":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{people:{},posts:{},trending:{}}},mounted:function(){this.fetchData()},methods:{followUser:function(t,e){axios.post("/i/follow",{item:t}).then(function(t){var n=$(e.target);n.addClass("btn-outline-secondary").removeClass("btn-primary"),n.text("Unfollow")}).catch(function(t){swal("Whoops! Something went wrong...","An error occured, please try again later.","error")})},fetchData:function(){var t=this;axios.get("/api/v2/discover/people").then(function(e){var n=e.data;t.people=n.people,t.people.length>1&&($(".section-people .loader").hide(),$(".section-people .row.d-none").removeClass("d-none"))}),axios.get("/api/v2/discover/posts").then(function(e){var n=e.data;t.posts=n.posts,t.posts.length>1&&($(".section-explore .loader").hide(),$(".section-explore .row.d-none").removeClass("d-none"))})}}}},"0mse":function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._m(0),t._v(" "),n("div",{staticClass:"postCommentsContainer d-none"},[n("p",{staticClass:"mb-1 text-center load-more-link d-none"},[n("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:t.loadMore}},[t._v("Load more comments")])]),t._v(" "),n("div",{staticClass:"comments",attrs:{"data-min-id":"0","data-max-id":"0"}},t._l(t.results,function(e,i){return n("p",{key:e.id,staticClass:"mb-1",attrs:{"data-id":e.id}},[n("span",{staticClass:"d-flex justify-content-between align-items-center"},[n("span",{staticClass:"pr-3",staticStyle:{overflow:"hidden"}},[n("div",{staticClass:"font-weight-bold pr-1"},[n("bdi",[n("a",{staticClass:"text-dark",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.l(e.account.username)))])])]),t._v(" "),n("div",{staticClass:"read-more",staticStyle:{overflow:"hidden"}},[n("span",{staticClass:"comment-text",staticStyle:{overflow:"hidden"},domProps:{innerHTML:t._s(e.content)}})])]),t._v(" "),n("b-dropdown",{staticClass:"float-right",attrs:{id:e.uri,variant:"link","no-caret":"",right:""}},[n("template",{slot:"button-content"},[n("i",{staticClass:"fas fa-ellipsis-v text-muted"}),n("span",{staticClass:"sr-only"},[t._v("Options")])]),t._v(" "),n("b-dropdown-item",{staticClass:"font-weight-bold",on:{click:function(n){t.reply(e)}}},[t._v("Reply")]),t._v(" "),n("b-dropdown-item",{staticClass:"font-weight-bold",attrs:{href:e.url}},[t._v("Permalink")]),t._v(" "),n("b-dropdown-item",{staticClass:"font-weight-bold",on:{click:function(n){t.embed(e)}}},[t._v("Embed")]),t._v(" "),n("b-dropdown-item",{staticClass:"font-weight-bold",attrs:{href:e.account.url}},[t._v("Profile")]),t._v(" "),n("b-dropdown-divider"),t._v(" "),n("b-dropdown-item",{staticClass:"font-weight-bold"