pleroma/priv/static/adminfe/static/js/chunk-970d.2457e066.js

2 lines
26 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-970d"],{"07OA":function(t,e,s){"use strict";var a=s("51EY");s.n(a).a},"51EY":function(t,e,s){},"8rU9":function(t,e,s){},Eg1M:function(t,e,s){"use strict";var a=s("8rU9");s.n(a).a},"G/Mk":function(t,e,s){"use strict";var a=s("xdcp");s.n(a).a},Kw8l:function(t,e,s){"use strict";var a=s("cRgN");s.n(a).a},Lbbz:function(t,e,s){"use strict";var a=s("Sxb/");s.n(a).a},RnhZ:function(t,e,s){var a={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-SG":"zavE","./en-SG.js":"zavE","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./ga":"USCx","./ga.js":"USCx","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it-ch":"bxKX","./it-ch.js":"bxKX","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ku":"JCF/","./ku.js":"JCF/","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function n(t){var e=r(t);return s(e)}function r(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}n.keys=function(){return Object.keys(a)},n.resolve=r,t.exports=n,n.id="RnhZ"},"Sxb/":function(t,e,s){},cEOe:function(t,e,s){"use strict";s.r(e);var a=s("ZhIB"),n=s.n(a),r=s("wd/R"),o=s.n(r),i={name:"NoteCard",props:{report:{type:Object,required:!0},note:{type:Object,required:!0}},methods:{parseTimestamp:function(t){return o()(t).format("YYYY-MM-DD HH:mm")},handleNoteDeletion:function(t,e){this.$store.dispatch("DeleteReportNote",{noteID:t,reportID:e})}}},c=(s("G/Mk"),s("KHd+")),l=Object(c.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-card",{staticClass:"note-card"},[s("div",{attrs:{slot:"header"},slot:"header"},[s("div",{staticClass:"note-header"},[s("div",{staticClass:"note-actor-container"},[s("div",{staticClass:"note-actor"},[s("img",{staticClass:"note-avatar-img",attrs:{src:t.note.user.avatar}}),t._v(" "),s("h3",{staticClass:"note-actor-name"},[t._v(t._s(t.note.user.display_name))])]),t._v(" "),s("a",{attrs:{href:t.note.user.url,target:"_blank"}},[t._v("\n @"+t._s(t.note.user.display_name)+"\n ")])]),t._v(" "),s("div",[s("el-popconfirm",{attrs:{title:"Are you sure to delete this?","confirm-button-text":"Yes","cancel-button-text":"No"},on:{onConfirm:function(e){return t.handleNoteDeletion(t.note.id,t.report.id)}}},[s("el-button",{attrs:{slot:"reference",size:"mini"},slot:"reference"},[t._v("\n "+t._s(t.$t("reports.deleteNote"))+"\n ")])],1)],1)])]),t._v(" "),s("div",{staticClass:"note-body"},[s("span",{staticClass:"note-content",domProps:{innerHTML:t._s(t.note.content)}}),t._v("\n "+t._s(t.parseTimestamp(t.note.created_at))+"\n ")])])},[],!1,null,null,null);l.options.__file="NoteCard.vue";var u=l.exports,d=s("ot3S"),p={name:"ModerateUserDropdown",props:{account:{type:Object,required:!0}},computed:{tags:function(){return this.account.tags||[]}},methods:{handleDeactivation:function(t){var e=t.nickname;this.$store.dispatch("ToggleUserActivation",e)},handleDeletion:function(t){this.$store.dispatch("DeleteUser",t)},showDeactivatedButton:function(t){return this.$store.state.user.id!==t},toggleTag:function(t,e){t.tags.includes(e)?this.$store.dispatch("RemoveTag",{users:[t],tag:e}):this.$store.dispatch("AddTag",{users:[t],tag:e})}}},v=Object(c.a)(p,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dropdown",{attrs:{trigger:"click"}},[s("el-button",{attrs:{disabled:!t.account.id,plain:"",size:"small",icon:"el-icon-files"}},[t._v(t._s(t.$t("reports.moderateUser"))+"\n "),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.showDeactivatedButton(t.account)?s("el-dropdown-item",{nativeOn:{click:function(e){return t.handleDeactivation(t.account)}}},[t._v("\n "+t._s(t.account.deactivated?t.$t("users.activateAccount"):t.$t("users.deactivateAccount"))+"\n ")]):t._e(),t._v(" "),t.showDeactivatedButton(t.account.id)?s("el-dropdown-item",{nativeOn:{click:function(e){return t.handleDeletion(t.account.id)}}},[t._v("\n "+t._s(t.$t("users.deleteAccount"))+"\n ")]):t._e(),t._v(" "),s("el-dropdown-item",{class:{"active-tag":t.tags.includes("force_nsfw")},attrs:{divided:!0},nativeOn:{click:function(e){return t.toggleTag(t.account,"force_nsfw")}}},[t._v("\n "+t._s(t.$t("users.forceNsfw"))+"\n "),t.tags.includes("force_nsfw")?s("i",{staticClass:"el-icon-check"}):t._e()]),t._v(" "),s("el-dropdown-item",{class:{"active-tag":t.tags.includes("strip_media")},nativeOn:{click:function(e){return t.toggleTag(t.account,"strip_media")}}},[t._v("\n "+t._s(t.$t("users.stripMedia"))+"\n "),t.tags.includes("strip_media")?s("i",{staticClass:"el-icon-check"}):t._e()]),t._v(" "),s("el-dropdown-item",{class:{"active-tag":t.tags.includes("force_unlisted")},nativeOn:{click:function(e){return t.toggleTag(t.account,"force_unlisted")}}},[t._v("\n "+t._s(t.$t("users.forceUnlisted"))+"\n "),t.tags.includes("force_unlisted")?s("i",{staticClass:"el-icon-check"}):t._e()]),t._v(" "),s("el-dropdown-item",{class:{"active-tag":t.tags.includes("sandbox")},nativeOn:{click:function(e){return t.toggleTag(t.account,"sandbox")}}},[t._v("\n "+t._s(t.$t("users.sandbox"))+"\n "),t.tags.includes("sandbox")?s("i",{staticClass:"el-icon-check"}):t._e()]),t._v(" "),t.account.local?s("el-dropdown-item",{class:{"active-tag":t.tags.includes("disable_remote_subscription")},nativeOn:{click:function(e){return t.toggleTag(t.account,"disable_remote_subscription")}}},[t._v("\n "+t._s(t.$t("users.disableRemoteSubscription"))+"\n "),t.tags.includes("disable_remote_subscription")?s("i",{staticClass:"el-icon-check"}):t._e()]):t._e(),t._v(" "),t.account.local?s("el-dropdown-item",{class:{"active-tag":t.tags.includes("disable_any_subscription")},nativeOn:{click:function(e){return t.toggleTag(t.account,"disable_any_subscription")}}},[t._v("\n "+t._s(t.$t("users.disableAnySubscription"))+"\n "),t.tags.includes("disable_any_subscription")?s("i",{staticClass:"el-icon-check"}):t._e()]):t._e()],1)],1)},[],!1,null,null,null);v.options.__file="ModerateUserDropdown.vue";var _=v.exports,h={name:"Report",components:{Status:d.a,ModerateUserDropdown:_,NoteCard:u},props:{reports:{type:Array,required:!0}},data:function(){return{notes:{}}},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:{accountExists:function(t,e){return t[e]},changeReportState:function(t,e){this.$store.dispatch("ChangeReportState",[{state:t,id:e}])},capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},getStateType:function(t){switch(t){case"closed":return"info";case"resolved":return"success";default:return"primary"}},getStatusesTitle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Reported statuses: ".concat(t.length," item(s)")},getNotesTitle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Notes: ".concat(t.length," item(s)")},handleNewNote:function(t){this.$store.dispatch("CreateReportNote",{content:this.notes[t],reportID:t}),this.notes[t]=""},handlePageChange:function(t){this.$store.dispatch("FetchReports",t)},parseTimestamp:function(t){return o()(t).format("L HH:mm")},showStatuses:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).length>0}}},m=(s("07OA"),Object(c.a)(h,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-timeline",{staticClass:"reports-timeline"},t._l(t.reports,function(e){return s("el-timeline-item",{key:e.id,staticClass:"timeline-item-container",attrs:{timestamp:t.parseTimestamp(e.created_at),placement:"top"}},[s("el-card",{staticClass:"report"},[s("div",{staticClass:"report-header-container"},[s("div",{staticClass:"title-container"},[t.accountExists(e.account,"display_name")?s("h3",{staticClass:"report-title"},[t._v(t._s(t.$t("reports.reportOn"))+" "+t._s(e.account.display_name))]):s("h3",{staticClass:"report-title"},[t._v(t._s(t.$t("reports.report")))]),t._v(" "),s("h5",{staticClass:"id"},[t._v(t._s(t.$t("reports.id"))+": "+t._s(e.id))])]),t._v(" "),s("div",[s("el-tag",{staticClass:"report-tag",attrs:{type:t.getStateType(e.state),size:"large"}},[t._v(t._s(t.capitalizeFirstLetter(e.state)))]),t._v(" "),s("el-dropdown",{attrs:{trigger:"click"}},[s("el-button",{staticClass:"report-actions-button",attrs:{plain:"",size:"small",icon:"el-icon-edit"}},[t._v(t._s(t.$t("reports.changeState"))),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},["resolved"!==e.state?s("el-dropdown-item",{nativeOn:{click:function(s){return t.changeReportState("resolved",e.id)}}},[t._v(t._s(t.$t("reports.resolve")))]):t._e(),t._v(" "),"open"!==e.state?s("el-dropdown-item",{nativeOn:{click:function(s){return t.changeReportState("open",e.id)}}},[t._v(t._s(t.$t("reports.reopen")))]):t._e(),t._v(" "),"closed"!==e.state?s("el-dropdown-item",{nativeOn:{click:function(s){return t.changeReportState("closed",e.id)}}},[t._v(t._s(t.$t("reports.close")))]):t._e()],1)],1),t._v(" "),s("moderate-user-dropdown",{attrs:{account:e.account}})],1)]),t._v(" "),s("div",[s("el-divider",{staticClass:"divider"}),t._v(" "),s("span",{staticClass:"report-row-key"},[t._v(t._s(t.$t("reports.account"))+":")]),t._v(" "),t.accountExists(e.account,"avatar")&&t.accountExists(e.account,"display_name")?s("span",[s("img",{staticClass:"avatar-img",attrs:{src:e.account.avatar,alt:"avatar"}}),t._v(" "),e.account.deactivated?s("span",[t._v("\n "+t._s(e.account.display_name)+"\n "),s("span",{staticClass:"deactivated"},[t._v(" (deactivated)")])]):s("a",{staticClass:"account",attrs:{href:e.account.url,target:"_blank"}},[s("span",[t._v(t._s(e.account.display_name))])])]):s("span",{staticClass:"deactivated"},[t._v("("+t._s(t.$t("reports.notFound"))+")")])],1),t._v(" "),e.content&&e.content.length>0?s("div",[s("el-divider",{staticClass:"divider"}),t._v(" "),s("span",{staticClass:"report-row-key"},[t._v(t._s(t.$t("reports.content"))+":\n "),s("span",[t._v(t._s(e.content))])])],1):t._e(),t._v(" "),s("div",{style:t.showStatuses(e.statuses)?"":"margin-bottom:15px"},[s("el-divider",{staticClass:"divider"}),t._v(" "),s("span",{staticClass:"report-row-key"},[t._v(t._s(t.$t("reports.actor"))+":")]),t._v(" "),t.accountExists(e.actor,"avatar")&&t.accountExists(e.actor,"display_name")?s("span",[s("img",{staticClass:"avatar-img",attrs:{src:e.actor.avatar,alt:"avatar"}}),t._v(" "),s("a",{staticClass:"account",attrs:{href:e.actor.url,target:"_blank"}},[s("span",[t._v(t._s(e.actor.display_name))])])]):s("span",{staticClass:"deactivated"},[t._v("("+t._s(t.$t("reports.notFound"))+")")])],1),t._v(" "),t.showStatuses(e.statuses)?s("div",{staticClass:"statuses"},[s("el-collapse",[s("el-collapse-item",{attrs:{title:t.getStatusesTitle(e.statuses)}},t._l(e.statuses,function(a){return s("div",{key:a.id},[s("status",{attrs:{status:a,account:a.account.display_name?a.account:e.account,"show-checkbox":!1,page:t.currentPage}})],1)}),0)],1)],1):t._e(),t._v(" "),s("div",{staticClass:"report-notes"},[s("el-collapse",[s("el-collapse-item",{attrs:{title:t.getNotesTitle(e.notes)}},t._l(e.notes,function(t,a){return s("note-card",{key:a,attrs:{note:t,report:e}})}),1)],1),t._v(" "),s("div",{staticClass:"report-note-form"},[s("el-input",{attrs:{placeholder:t.$t("reports.leaveNote"),type:"textarea",rows:"2"},model:{value:t.notes[e.id],callback:function(s){t.$set(t.notes,e.id,s)},expression:"notes[report.id]"}}),t._v(" "),s("div",{staticClass:"report-post-note"},[s("el-button",{on:{click:function(s){return t.handleNewNote(e.id)}}},[t._v(t._s(t.$t("reports.postNote")))])],1)],1)],1)])],1)}),1),t._v(" "),t.loading?t._e():s("div",{staticClass:"reports-pagination"},[s("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));m.options.__file="Report.vue";var g=m.exports,f=s("mSNy"),j={data:function(){return{filter:"open",options:[{value:"open",label:f.a.t("reportsFilter.open")},{value:"closed",label:f.a.t("reportsFilter.closed")},{value:"resolved",label:f.a.t("reportsFilter.resolved")}]}},created:function(){this.$store.dispatch("SetFilter",this.$data.filter)},methods:{toggleFilters:function(){this.$store.dispatch("SetFilter",this.$data.filter),this.$store.dispatch("ClearFetchedReports"),this.$store.dispatch("FetchReports",1)}}},b=(s("Eg1M"),Object(c.a)(j,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-select",{staticClass:"select-field",attrs:{placeholder:t.$t("reportsFilter.inputPlaceholder"),clearable:"","value-key":"value"},on:{change:t.toggleFilters},model:{value:t.filter,callback:function(e){t.filter=e},expression:"filter"}},t._l(t.options,function(e){return s("el-option",{key:e.value,attrs:{label:e.label,value:e.value}},[t._v(t._s(e.label))])}),1)},[],!1,null,"ecc36f5a",null));b.options.__file="ReportsFilter.vue";var C=b.exports,y={components:{RebootButton:s("rIUS").a,Report:g,ReportsFilter:C},computed:{loading:function(){return this.$store.state.reports.loading},normalizedReportsCount:function(){return n()(this.$store.state.reports.totalReportsCount).format("0a")},reports:function(){return this.$store.state.reports.fetchedReports}},mounted:function(){this.$store.dispatch("GetNodeInfo"),this.$store.dispatch("NeedReboot"),this.$store.dispatch("FetchReports",1)}},k=(s("Lbbz"),Object(c.a)(y,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"reports-container"},[s("div",{staticClass:"reports-header-container"},[s("h1",[t._v("\n "+t._s(t.$t("reports.reports"))+"\n "),s("span",{staticClass:"report-count"},[t._v("("+t._s(t.normalizedReportsCount)+")")])]),t._v(" "),s("reboot-button")],1),t._v(" "),s("div",{staticClass:"reports-filter-container"},[s("reports-filter")],1),t._v(" "),s("div",{staticClass:"block"},[s("report",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{reports:t.reports}}),t._v(" "),0===t.reports.length?s("div",{staticClass:"no-reports-message"},[s("p",[t._v("There are no reports to display")])]):t._e()],1)])},[],!1,null,"fa601560",null));k.options.__file="index.vue";e.default=k.exports},cRgN:function(t,e,s){},ot3S:function(t,e,s){"use strict";var a=s("wd/R"),n=s.n(a),r={name:"Status",props:{account:{type:Object,required:!1,default:function(){return{}}},fetchStatusesByInstance:{type:Boolean,required:!1,default:!1},showCheckbox:{type:Boolean,required:!0,default:!1},status:{type:Object,required:!0},page:{type:Number,required:!1,default:0},userId:{type:String,required:!1,default:""},godmode:{type:Boolean,required:!1,default:!1}},data:function(){return{showHiddenStatus:!1}},methods:{capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},changeStatus:function(t,e,s){this.$store.dispatch("ChangeStatusScope",{statusId:t,isSensitive:e,visibility:s,reportCurrentPage:this.page,userId:this.userId,godmode:this.godmode,fetchStatusesByInstance:this.fetchStatusesByInstance})},deleteStatus:function(t){var e=this;this.$confirm("Are you sure you want to delete this status?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(function(){e.$store.dispatch("DeleteStatus",{statusId:t,reportCurrentPage:e.page,userId:e.userId,godmode:e.godmode,fetchStatusesByInstance:e.fetchStatusesByInstance}),e.$message({type:"success",message:"Delete completed"})}).catch(function(){e.$message({type:"info",message:"Delete canceled"})})},optionPercent:function(t,e){var s=t.options.reduce(function(t,e){return t+e.votes_count},0);return 0===s?0:+(e.votes_count/s*100).toFixed(1)},parseTimestamp:function(t){return n()(t).format("YYYY-MM-DD HH:mm")},handleStatusSelection:function(t){this.$emit("status-selection",t)}}},o=(s("Kw8l"),s("KHd+")),i=Object(o.a)(r,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.status.deleted?s("el-card",{staticClass:"status-card"},[s("div",{attrs:{slot:"header"},slot:"header"},[s("div",{staticClass:"status-header"},[s("div",{staticClass:"status-account-container"},[s("div",{staticClass:"status-account"},[s("h4",{staticClass:"status-deleted"},[t._v(t._s(t.$t("reports.statusDeleted")))])])])])]),t._v(" "),s("div",{staticClass:"status-body"},[t.status.content?s("span",{staticClass:"status-content",domProps:{innerHTML:t._s(t.status.content)}}):s("span",{staticClass:"status-without-content"},[t._v("no content")])]),t._v(" "),t.status.created_at?s("a",{staticClass:"account",attrs:{href:t.status.url,target:"_blank"}},[t._v("\n "+t._s(t.parseTimestamp(t.status.created_at))+"\n ")]):t._e()]):s("el-card",{staticClass:"status-card"},[s("div",{attrs:{slot:"header"},slot:"header"},[s("div",{staticClass:"status-header"},[s("div",{staticClass:"status-account-container"},[s("div",{staticClass:"status-account"},[t.showCheckbox?s("el-checkbox",{staticClass:"status-checkbox",on:{change:function(e){return t.handleStatusSelection(t.account)}}}):t._e(),t._v(" "),s("img",{staticClass:"status-avatar-img",attrs:{src:t.account.avatar}}),t._v(" "),t.account.deactivated?s("span",[s("h3",{staticClass:"status-account-name"},[t._v(t._s(t.account.display_name))]),t._v(" "),s("h3",{staticClass:"status-account-name deactivated"},[t._v(" (deactivated)")])]):s("a",{staticClass:"account",attrs:{href:t.account.url,target:"_blank"}},[s("h3",{staticClass:"status-account-name"},[t._v(t._s(t.account.display_name))])])],1)]),t._v(" "),s("div",{staticClass:"status-actions"},[t.status.sensitive?s("el-tag",{attrs:{type:"warning",size:"large"}},[t._v(t._s(t.$t("reports.sensitive")))]):t._e(),t._v(" "),s("el-tag",{attrs:{size:"large"}},[t._v(t._s(t.capitalizeFirstLetter(t.status.visibility)))]),t._v(" "),s("el-dropdown",{attrs:{trigger:"click"}},[s("el-button",{staticClass:"status-actions-button",attrs:{plain:"",size:"small",icon:"el-icon-edit"}},[t._v("\n "+t._s(t.$t("reports.changeScope"))),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.status.sensitive?t._e():s("el-dropdown-item",{nativeOn:{click:function(e){return t.changeStatus(t.status.id,!0,t.status.visibility)}}},[t._v("\n "+t._s(t.$t("reports.addSensitive"))+"\n ")]),t._v(" "),t.status.sensitive?s("el-dropdown-item",{nativeOn:{click:function(e){return t.changeStatus(t.status.id,!1,t.status.visibility)}}},[t._v("\n "+t._s(t.$t("reports.removeSensitive"))+"\n ")]):t._e(),t._v(" "),"public"!==t.status.visibility?s("el-dropdown-item",{nativeOn:{click:function(e){return t.changeStatus(t.status.id,t.status.sensitive,"public")}}},[t._v("\n "+t._s(t.$t("reports.public"))+"\n ")]):t._e(),t._v(" "),"private"!==t.status.visibility?s("el-dropdown-item",{nativeOn:{click:function(e){return t.changeStatus(t.status.id,t.status.sensitive,"private")}}},[t._v("\n "+t._s(t.$t("reports.private"))+"\n ")]):t._e(),t._v(" "),"unlisted"!==t.status.visibility?s("el-dropdown-item",{nativeOn:{click:function(e){return t.changeStatus(t.status.id,t.status.sensitive,"unlisted")}}},[t._v("\n "+t._s(t.$t("reports.unlisted"))+"\n ")]):t._e(),t._v(" "),s("el-dropdown-item",{nativeOn:{click:function(e){return t.deleteStatus(t.status.id)}}},[t._v("\n "+t._s(t.$t("reports.deleteStatus"))+"\n ")])],1)],1)],1)])]),t._v(" "),s("div",{staticClass:"status-body"},[t.status.spoiler_text?s("div",[s("strong",[t._v(t._s(t.status.spoiler_text))]),t._v(" "),t.showHiddenStatus?t._e():s("el-button",{staticClass:"show-more-button",attrs:{size:"mini"},on:{click:function(e){t.showHiddenStatus=!0}}},[t._v("Show more")]),t._v(" "),t.showHiddenStatus?s("el-button",{staticClass:"show-more-button",attrs:{size:"mini"},on:{click:function(e){t.showHiddenStatus=!1}}},[t._v("Show less")]):t._e(),t._v(" "),t.showHiddenStatus?s("div",[s("span",{staticClass:"status-content",domProps:{innerHTML:t._s(t.status.content)}}),t._v(" "),t.status.poll?s("div",{staticClass:"poll"},[s("ul",t._l(t.status.poll.options,function(e,a){return s("li",{key:a},[t._v("\n "+t._s(e.title)+"\n "),s("el-progress",{attrs:{percentage:t.optionPercent(t.status.poll,e)}})],1)}),0)]):t._e(),t._v(" "),t._l(t.status.media_attachments,function(t,e){return s("div",{key:e,staticClass:"image"},[s("img",{attrs:{src:t.preview_url}})])})],2):t._e()],1):t._e(),t._v(" "),t.status.spoiler_text?t._e():s("div",[s("span",{staticClass:"status-content",domProps:{innerHTML:t._s(t.status.content)}}),t._v(" "),t.status.poll?s("div",{staticClass:"poll"},[s("ul",t._l(t.status.poll.options,function(e,a){return s("li",{key:a},[t._v("\n "+t._s(e.title)+"\n "),s("el-progress",{attrs:{percentage:t.optionPercent(t.status.poll,e)}})],1)}),0)]):t._e(),t._v(" "),t._l(t.status.media_attachments,function(t,e){return s("div",{key:e,staticClass:"image"},[s("img",{attrs:{src:t.preview_url}})])})],2),t._v(" "),s("a",{staticClass:"account",attrs:{href:t.status.url,target:"_blank"}},[t._v("\n "+t._s(t.parseTimestamp(t.status.created_at))+"\n ")])])])],1)},[],!1,null,null,null);i.options.__file="index.vue";e.a=i.exports},rIUS:function(t,e,s){"use strict";var a=s("o0o1"),n=s.n(a),r=s("yXPU"),o=s.n(r),i=s("mSNy"),c={name:"RebootButton",computed:{needReboot:function(){return this.$store.state.app.needReboot}},methods:{restartApp:function(){var t=o()(n.a.mark(function t(){return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$store.dispatch("RestartApplication");case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return");case 8:this.$message({type:"success",message:i.a.t("settings.restartSuccess")});case 9:case"end":return t.stop()}},t,this,[[0,5]])}));return function(){return t.apply(this,arguments)}}()}},l=s("KHd+"),u=Object(l.a)(c,function(){var t=this.$createElement,e=this._self._c||t;return this.needReboot?e("el-tooltip",{attrs:{content:this.$t("settings.restartApp"),placement:"bottom-end"}},[e("el-button",{staticClass:"reboot-button",attrs:{type:"warning"},on:{click:this.restartApp}},[e("span",[e("i",{staticClass:"el-icon-refresh"}),this._v("\n "+this._s(this.$t("settings.instanceReboot"))+"\n ")])])],1):this._e()},[],!1,null,null,null);u.options.__file="index.vue";e.a=u.exports},xdcp:function(t,e,s){}}]);
//# sourceMappingURL=chunk-970d.2457e066.js.map