akkoma/priv/static/packs/modals/mute_modal.js

2 lines
8.2 KiB
JavaScript
Raw Normal View History

2018-08-12 13:29:30 +00:00
webpackJsonp([29],{835:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return T});var o,a,c=n(2),i=n.n(c),l=n(1),s=n.n(l),r=n(3),u=n.n(r),d=n(4),h=n.n(d),f=n(0),p=n.n(f),v=n(9),m=n(7),k=n(867),g=n.n(k),b=n(100),y=n(26),_=n(22),C=n(90),O=function(e){return{isSubmitting:e.getIn(["reports","new","isSubmitting"]),account:e.getIn(["mutes","new","account"]),notifications:e.getIn(["mutes","new","notifications"])}},E=function(e){return{onConfirm:function(t,n){e(Object(_.A)(t.get("id"),n))},onClose:function(){e(Object(y.c)())},onToggleNotifications:function(){e(Object(C.h)())}}},T=(o=Object(v.connect)(O,E))(a=Object(m.g)(a=function(e){function t(){var n,o,a;s()(this,t);for(var c=arguments.length,i=Array(c),l=0;l<c;l++)i[l]=arguments[l];return n=o=u()(this,e.call.apply(e,[this].concat(i))),o.handleClick=function(){o.props.onClose(),o.props.onConfirm(o.props.account,o.props.notifications)},o.handleCancel=function(){o.props.onClose()},o.setRef=function(e){o.button=e},o.toggleNotifications=function(){o.props.onToggleNotifications()},a=n,u()(o,a)}return h()(t,e),t.prototype.componentDidMount=function(){this.button.focus()},t.prototype.render=function(){var e=this.props,t=e.account,n=e.notifications;return i()("div",{className:"modal-root__modal mute-modal"},void 0,i()("div",{className:"mute-modal__container"},void 0,i()("p",{},void 0,i()(m.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}})),i()("div",{},void 0,i()("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,i()(m.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",i()(g.a,{id:"mute-modal__hide-notifications-checkbox",checked:n,onChange:this.toggleNotifications})))),i()("div",{className:"mute-modal__action-bar"},void 0,i()(b.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,i()(m.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),p.a.createElement(b.a,{onClick:this.handleClick,ref:this.setRef},i()(m.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},t}(p.a.PureComponent))||a)||a},867:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(0),d=o(u),h=n(10),f=o(h),p=n(5),v=o(p),m=n(868),k=o(m),g=n(869),b=o(g),y=n(870),_=function(e){function t(e){c(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.previouslyChecked=!(!e.checked&&!e.defaultChecked),n.state={checked:!(!e.checked&&!e.defaultChecked),hasFocus:!1},n}return l(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){"checked"in e&&th
//# sourceMappingURL=mute_modal.js.map