akkoma/priv/static/packs/flavours/glitch/async/mute_modal.js

2 lines
2.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{679:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return g});var o,c=n(1),i=n(7),s=n(0),u=n(2),a=n(3),r=n.n(a),l=n(20),d=n(6),b=n(394),f=n.n(b),m=n(88),O=n(45),j=n(14),p=n(68),g=Object(l.connect)(function(t){return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:t.getIn(["mutes","new","account"]),notifications:t.getIn(["mutes","new","notifications"])}},function(n){return{onConfirm:function(t,e){n(Object(j.O)(t.get("id"),e))},onClose:function(){n(Object(O.c)())},onToggleNotifications:function(){n(Object(p.h)())}}})(o=Object(d.g)(o=function(a){function t(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=a.call.apply(a,[this].concat(n))||this,Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleClick",function(){e.props.onClose(),e.props.onConfirm(e.props.account,e.props.notifications)}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleCancel",function(){e.props.onClose()}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"setRef",function(t){e.button=t}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"toggleNotifications",function(){e.props.onToggleNotifications()}),e}Object(i.a)(t,a);var e=t.prototype;return e.componentDidMount=function(){this.button.focus()},e.render=function(){var t=this.props,e=t.account,n=t.notifications;return Object(c.a)("div",{className:"modal-root__modal mute-modal"},void 0,Object(c.a)("div",{className:"mute-modal__container"},void 0,Object(c.a)("p",{},void 0,Object(c.a)(d.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:Object(c.a)("strong",{},void 0,"@",e.get("acct"))}})),Object(c.a)("div",{},void 0,Object(c.a)("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,Object(c.a)(d.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",Object(c.a)(f.a,{id:"mute-modal__hide-notifications-checkbox",checked:n,onChange:this.toggleNotifications})))),Object(c.a)("div",{className:"mute-modal__action-bar"},void 0,Object(c.a)(m.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,Object(c.a)(d.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),r.a.createElement(m.a,{onClick:this.handleClick,ref:this.setRef},Object(c.a)(d.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},t}(r.a.PureComponent))||o)||o}}]);
//# sourceMappingURL=mute_modal.js.map