Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / priv / static / adminfe / static / js / chunk-6b68.fbc0f684.js
1 (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6b68"],{DMFV:function(t,e,r){},"O/DJ":function(t,e,r){"use strict";var n=r("DMFV");r.n(n).a},i7Kn:function(t,e,r){"use strict";var n=r("o0o1"),s=r.n(n),i=r("yXPU"),a=r.n(i),o={props:{selectedUsers:{type:Array,default:function(){return[]}}},computed:{showDropdownForMultipleUsers:function(){return this.$props.selectedUsers.length>0},isDesktop:function(){return"desktop"===this.$store.state.app.device}},methods:{mappers:function(){var t=this,e=function(){var e=a()(s.a.mark(function e(r,n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(r);case 2:t.$emit("apply-action");case 3:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}();return{grantRight:function(r){return function(){var n=function(){var e=a()(s.a.mark(function e(n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("AddRight",{users:n,right:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),i=t.selectedUsers.filter(function(e){return e.local&&!e.roles[r]&&t.$store.state.user.id!==e.id});e(i,n)}},revokeRight:function(r){return function(){var n=function(){var e=a()(s.a.mark(function e(n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("DeleteRight",{users:n,right:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),i=t.selectedUsers.filter(function(e){return e.local&&e.roles[r]&&t.$store.state.user.id!==e.id});e(i,n)}},activate:function(){var r=t.selectedUsers.filter(function(e){return e.deactivated&&t.$store.state.user.id!==e.id});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("ActivateUsers",{users:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},deactivate:function(){var r=t.selectedUsers.filter(function(e){return!e.deactivated&&t.$store.state.user.id!==e.id});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("DeactivateUsers",{users:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},remove:function(){var r=t.selectedUsers.filter(function(e){return t.$store.state.user.id!==e.id});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("DeleteUsers",{users:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},addTag:function(r){return function(){var n=t.selectedUsers.filter(function(t){return"disable_remote_subscription"===r||"disable_any_subscription"===r?t.local&&!t.tags.includes(r):!t.tags.includes(r)});e(n,function(){var e=a()(s.a.mark(function e(n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("AddTag",{users:n,tag:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())}},removeTag:function(r){return a()(s.a.mark(function n(){var i;return s.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:i=t.selectedUsers.filter(function(t){return"disable_remote_subscription"===r||"disable_any_subscription"===r?t.local&&t.tags.includes(r):t.tags.includes(r)}),e(i,function(){var e=a()(s.a.mark(function e(n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("RemoveTag",{users:n,tag:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return n.stop()}},n)}))},requirePasswordReset:function(){var r=t.selectedUsers.filter(function(t){return t.local});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("RequirePasswordReset",r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},confirmAccounts:function(){var r=t.selectedUsers.filter(function(t){return t.local&&t.confirmation_pending});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("ConfirmUsersEmail",{users:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},resendConfirmation:function(){var r=t.selectedUsers.filter(function(t){return t.local&&t.confirmation_pending});e(r,function(){var e=a()(s.a.mark(function e(r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("ResendConfirmationEmail",r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())}}},grantRightToMultipleUsers:function(t){var e=this.mappers().grantRight;this.confirmMessage(this.$t("users.grantRightConfirmation",{right:t}),e(t))},revokeRightFromMultipleUsers:function(t){var e=this.mappers().revokeRight;this.confirmMessage(this.$t("users.revokeRightConfirmation",{right:t}),e(t))},activateMultipleUsers:function(){var t=this.mappers().activate;this.confirmMessage(this.$t("users.activateMultipleUsersConfirmation"),t)},deactivateMultipleUsers:function(){var t=this.mappers().deactivate;this.confirmMessage(this.$t("users.deactivateMultipleUsersConfirmation"),t)},deleteMultipleUsers:function(){var t=this.mappers().remove;this.confirmMessage(this.$t("users.deleteMultipleUsersConfirmation"),t)},requirePasswordReset:function(){if(this.$store.state.user.nodeInfo.metadata.mailerEnabled){var t=this.mappers().requirePasswordReset;this.confirmMessage(this.$t("users.requirePasswordResetConfirmation"),t)}else this.$alert(this.$t("users.mailerMustBeEnabled"),"Error",{type:"error"})},addTagForMultipleUsers:function(t){var e=this.mappers().addTag;this.confirmMessage(this.$t("users.addTagForMultipleUsersConfirmation"),e(t))},removeTagFromMultipleUsers:function(t){var e=this.mappers().removeTag;this.confirmMessage(this.$t("users.removeTagFromMultipleUsersConfirmation"),e(t))},confirmAccountsForMultipleUsers:function(){var t=this.mappers().confirmAccounts;this.confirmMessage(this.$t("users.confirmAccountsConfirmation"),t)},resendConfirmationForMultipleUsers:function(){var t=this.mappers().resendConfirmation;this.confirmMessage(this.$t("users.resendEmailConfirmation"),t)},confirmMessage:function(t,e){var r=this;this.$confirm(t,{confirmButtonText:this.$t("users.ok"),cancelButtonText:this.$t("users.cancel"),type:"warning"}).then(function(){e()}).catch(function(){r.$message({type:"info",message:r.$t("users.canceled")})})}}},u=(r("O/DJ"),r("KHd+")),c=Object(u.a)(o,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dropdown",{attrs:{size:"small",trigger:"click",placement:"bottom-start"}},[t.isDesktop?r("el-button",{staticClass:"actions-button"},[r("span",{staticClass:"actions-button-container"},[r("span",[r("i",{staticClass:"el-icon-edit"}),t._v("\n "+t._s(t.$t("users.moderateUsers"))+"\n ")]),t._v(" "),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})])]):t._e(),t._v(" "),t.showDropdownForMultipleUsers?r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{nativeOn:{click:function(e){return t.grantRightToMultipleUsers("admin")}}},[t._v("\n "+t._s(t.$t("users.grantAdmin"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.revokeRightFromMultipleUsers("admin")}}},[t._v("\n "+t._s(t.$t("users.revokeAdmin"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.grantRightToMultipleUsers("moderator")}}},[t._v("\n "+t._s(t.$t("users.grantModerator"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.revokeRightFromMultipleUsers("moderator")}}},[t._v("\n "+t._s(t.$t("users.revokeModerator"))+"\n ")]),t._v(" "),r("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(e){return t.confirmAccountsForMultipleUsers(e)}}},[t._v("\n "+t._s(t.$t("users.confirmAccounts"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.resendConfirmationForMultipleUsers(e)}}},[t._v("\n "+t._s(t.$t("users.resendConfirmation"))+"\n ")]),t._v(" "),r("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(e){return t.activateMultipleUsers(e)}}},[t._v("\n "+t._s(t.$t("users.activateAccounts"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.deactivateMultipleUsers(e)}}},[t._v("\n "+t._s(t.$t("users.deactivateAccounts"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.deleteMultipleUsers(e)}}},[t._v("\n "+t._s(t.$t("users.deleteAccounts"))+"\n ")]),t._v(" "),r("el-dropdown-item",{nativeOn:{click:function(e){return t.requirePasswordReset(e)}}},[t._v("\n "+t._s(t.$t("users.requirePasswordReset"))+"\n ")]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover",attrs:{divided:""}},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.forceNsfw")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("force_nsfw")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("force_nsfw")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover"},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.stripMedia")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("strip_media")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("strip_media")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover"},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.forceUnlisted")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("force_unlisted")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("force_unlisted")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover"},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.sandbox")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("sandbox")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("sandbox")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover"},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.disableRemoteSubscriptionForMultiple")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("disable_remote_subscription")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("disable_remote_subscription")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)]),t._v(" "),r("el-dropdown-item",{staticClass:"no-hover"},[r("div",{staticClass:"tag-container"},[r("span",{staticClass:"tag-text"},[t._v(t._s(t.$t("users.disableAnySubscriptionForMultiple")))]),t._v(" "),r("el-button-group",{staticClass:"tag-button-group"},[r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.addTagForMultipleUsers("disable_any_subscription")}}},[t._v("\n "+t._s(t.$t("users.apply"))+"\n ")]),t._v(" "),r("el-button",{attrs:{size:"mini"},nativeOn:{click:function(e){return t.removeTagFromMultipleUsers("disable_any_subscription")}}},[t._v("\n "+t._s(t.$t("users.remove"))+"\n ")])],1)],1)])],1):r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",[t._v("\n "+t._s(t.$t("users.selectUsers"))+"\n ")])],1)],1)},[],!1,null,"3850612b",null);c.options.__file="MultipleUsersMenu.vue";e.a=c.exports},rIUS:function(t,e,r){"use strict";var n=r("o0o1"),s=r.n(n),i=r("yXPU"),a=r.n(i),o=r("mSNy"),u={name:"RebootButton",computed:{needReboot:function(){return this.$store.state.app.needReboot}},methods:{restartApp:function(){var t=a()(s.a.mark(function t(){return s.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:o.a.t("settings.restartSuccess")});case 9:case"end":return t.stop()}},t,this,[[0,5]])}));return function(){return t.apply(this,arguments)}}()}},c=r("KHd+"),l=Object(c.a)(u,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);l.options.__file="index.vue";e.a=l.exports}}]);
2 //# sourceMappingURL=chunk-6b68.fbc0f684.js.map