pleroma/priv/static/adminfe/static/js/chunk-75c1.35b2205f.js

2 lines
5.8 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-75c1"],{"3K/6":function(t,e,r){"use strict";r("wrcb")},ZW2c:function(t,e,r){},cBSX:function(t,e,r){},cEOe:function(t,e,r){"use strict";r.r(e);var s=r("ZhIB"),o=r.n(s),a=r("ExVU"),n=r("dpNl"),i=r("yrTF"),c={name:"Report",components:{ModerateUserDropdown:n.a,ReportContent:i.a},props:{reports:{type:Array,required:!0}},computed:{loading:function(){return this.$store.state.reports.loading},pageSize:function(){return this.$store.state.reports.pageSize},totalReportsCount:function(){return this.$store.state.reports.totalReportsCount},currentPage:function(){return this.$store.state.reports.currentPage}},methods:{capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},changeReportState:function(t,e){this.$store.dispatch("ChangeReportState",[{state:t,id:e}])},getStateType:function(t){switch(t){case"closed":return"info";case"resolved":return"success";default:return"primary"}},handlePageChange:function(t){this.$store.dispatch("FetchReports",t)},parseTimestamp:function(t){return a.DateTime.fromISO(t).toFormat("yyyy-MM-dd HH:mm")},propertyExists:function(t,e,r){return r?t[e]&&t[r]:t[e]}}},l=(r("dOl/"),r("KHd+")),p=Object(l.a)(c,function(){var t=this,e=t._self._c;return e("div",[e("el-timeline",{staticClass:"reports-timeline"},t._l(t.reports,function(r){return e("el-timeline-item",{key:r.id,staticClass:"timeline-item-container",attrs:{timestamp:t.parseTimestamp(r.created_at),placement:"top"}},[e("el-card",{staticClass:"report"},[e("div",{staticClass:"report-header-container"},[e("div",{staticClass:"title-container"},[t.propertyExists(r.account,"nickname")?e("h3",{staticClass:"report-title"},[t._v(t._s(t.$t("reports.reportOn"))+" "+t._s(r.account.nickname))]):e("h3",{staticClass:"report-title"},[t._v(t._s(t.$t("reports.report")))]),t._v(" "),t.propertyExists(r.account,"id")?e("h5",{staticClass:"id"},[t._v(t._s(t.$t("reports.id"))+": "+t._s(r.id))]):t._e()]),t._v(" "),e("div",[e("el-tag",{staticClass:"report-tag",attrs:{type:t.getStateType(r.state),size:"large"}},[t._v(t._s(t.capitalizeFirstLetter(r.state)))]),t._v(" "),e("el-dropdown",{attrs:{trigger:"click"}},[e("el-button",{staticClass:"report-actions-button",attrs:{plain:"",size:"small",icon:"el-icon-edit"}},[t._v(t._s(t.$t("reports.changeState"))),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},["resolved"!==r.state?e("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("resolved",r.id)}}},[t._v(t._s(t.$t("reports.resolve")))]):t._e(),t._v(" "),"open"!==r.state?e("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("open",r.id)}}},[t._v(t._s(t.$t("reports.reopen")))]):t._e(),t._v(" "),"closed"!==r.state?e("el-dropdown-item",{nativeOn:{click:function(e){return t.changeReportState("closed",r.id)}}},[t._v(t._s(t.$t("reports.close")))]):t._e()],1)],1),t._v(" "),t.propertyExists(r.account,"nickname")?e("moderate-user-dropdown",{attrs:{account:r.account,"report-id":r.id,"rendered-from":"reportsPage"}}):t._e()],1)]),t._v(" "),e("el-divider",{staticClass:"divider"}),t._v(" "),e("report-content",{attrs:{report:r}})],1)],1)}),1),t._v(" "),t.loading?t._e():e("div",{staticClass:"reports-pagination"},[e("el-pagination",{attrs:{total:t.totalReportsCount,"current-page":t.currentPage,"page-size":t.pageSize,background:"",layout:"prev, pager, next"},on:{"current-change":t.handlePageChange}})],1)],1)},[],!1,null,null,null).exports,d=r("mSNy"),u={data:function(){return{filter:"open",options:[{value:"open",label:d.a.t("reportsFilter.open")},{value:"closed",label:d.a.t("reportsFilter.closed")},{value:"resolved",label:d.a.t("reportsFilter.resolved")}]}},created:function(){this.$store.dispatch("SetReportsFilter",this.$data.filter)},methods:{toggleFilters:function(){this.$store.dispatch("SetReportsFilter",this.$data.filter),this.$store.dispatch("ClearFetchedReports"),this.$store.dispatch("FetchReports",1)}}},h=(r("3K/6"),Object(l.a)(u,function(){var t=this,e=t._self._c;return e("el-select",{staticCla
//# sourceMappingURL=chunk-75c1.35b2205f.js.map