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/groups-page-about.16d96a327...

1 line
57 KiB
JavaScript

"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[8257],{1281:(t,e,a)=>{a.r(e);var s=a(91722),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},2336:(t,e,a)=>{function s(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,s=Array(e);a<e;a++)s[a]=t[a];return s}a.r(e),a.d(e,{default:()=>n});const n={props:{group:{type:Object}},data:function(){return{initalLoad:!1,reports:[],page:1,canLoadMore:!1,tab:"home"}},mounted:function(){this.getReports()},methods:{getReports:function(){var t=this;axios.get("/api/v0/groups/".concat(this.group.id,"/reports/list")).then((function(e){t.reports=e.data,t.initalLoad=!0,t.page++,t.canLoadMore=10==e.data.length}))},loadMoreReports:function(){var t=this;axios.get("/api/v0/groups/".concat(this.group.id,"/reports/list"),{params:{page:this.page}}).then((function(e){var a;(a=t.reports).push.apply(a,s(e.data)),t.page++,t.canLoadMore=10==e.data.length}))},timeago:function(t){return App.util.format.timeAgo(t)},actionMenu:function(t){var e=this;event.currentTarget.blur(),swal({title:"Moderator Action",dangerMode:!0,text:"Please select an action to take, press ESC to close",buttons:{ignore:{text:"Ignore",className:"btn-warning",value:"ignore"},cw:{text:"NSFW",className:"btn-warning",value:"cw"},delete:{text:"Delete",className:"btn-danger",value:"delete"}}}).then((function(a){switch(a){case"ignore":axios.post("/api/v0/groups/".concat(e.group.id,"/report/action"),{action:"ignore",id:e.reports[t].id}).then((function(a){var s=e.reports[t];e.$emit("decrement",s.total_count),e.reports.splice(t,1),e.$bvToast.toast("Ignored and closed moderation report",{title:"Moderation Action",autoHideDelay:5e3,appendToast:!0})}));break;case"cw":axios.post("/api/v0/groups/".concat(e.group.id,"/report/action"),{action:"cw",id:e.reports[t].id}).then((function(a){var s=e.reports[t];e.$emit("decrement",s.total_count),e.reports.splice(t,1),e.$bvToast.toast("Succesfully applied content warning and closed moderation report",{title:"Moderation Action",autoHideDelay:5e3,appendToast:!0})}));break;case"delete":swal("Oops, this is embarassing!","We have not implemented this moderation action yet.","error")}}))}}}},3843:(t,e,a)=>{a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){this._self._c;return this._m(0)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"group-insights-component"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-3 mb-3"},[e("div",{staticClass:"bg-light p-3 border rounded d-flex justify-content-between align-items-center"},[e("p",{staticClass:"h3 font-weight-bold mb-0"},[t._v("124K")]),t._v(" "),e("p",{staticClass:"font-weight-bold text-uppercase text-lighter mb-0"},[t._v("Posts")])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-3 mb-3"},[e("div",{staticClass:"bg-light p-3 border rounded d-flex justify-content-between align-items-center"},[e("p",{staticClass:"h3 font-weight-bold mb-0"},[t._v("9K")]),t._v(" "),e("p",{staticClass:"font-weight-bold text-uppercase text-lighter mb-0"},[t._v("Users")])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-3 mb-3"},[e("div",{staticClass:"bg-light p-3 border rounded d-flex justify-content-between align-items-center"},[e("p",{staticClass:"h3 font-weight-bold mb-0"},[t._v("1.7M")]),t._v(" "),e("p",{staticClass:"font-weight-bold text-uppercase text-lighter mb-0"},[t._v("Interactions")])])])]),t._v(" "),e("div",{staticClass:"row justify-cont