honkoma/priv/static/packs/flavours/glitch/async/settings_modal.js

2 lines
16 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{705:function(e,t,a){"use strict";a.r(t);var s,n,m=a(1),i=a(7),o=a(0),l=a(2),d=a(3),c=a.n(d),g=a(20),r=a(6),b=function(s){function e(){for(var d,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return d=s.call.apply(s,[this].concat(t))||this,Object(l.a)(Object(o.a)(Object(o.a)(d)),"handleChange",function(e){var t=e.target,a=d.props,s=a.item,n=a.onChange,i=a.options,o=a.placeholder;i&&0<i.length?n(s,t.value):n(s,o?t.value:t.checked)}),d}return Object(i.a)(e,s),e.prototype.render=function(){var a=this.handleChange,e=this.props,t=e.settings,s=e.item,n=e.id,i=e.options,o=e.children,d=e.dependsOn,l=e.dependsOnNot,c=e.placeholder,g=!0;if(d)for(var r=0;r<d.length;r++)g=g&&t.getIn(d[r]);if(l)for(var b=0;b<l.length;b++)g=g&&!t.getIn(l[b]);if(i&&0<i.length){var p=t.getIn(s),u=i&&0<i.length&&i.map(function(e){var t=n+"--"+e.value;return Object(m.a)("label",{htmlFor:t},void 0,Object(m.a)("input",{type:"radio",name:n,id:t,value:e.value,onBlur:a,onChange:a,checked:p===e.value,disabled:!g}),e.message,e.hint&&Object(m.a)("span",{class:"hint"},void 0,e.hint))});return Object(m.a)("div",{class:"glitch local-settings__page__item radio_buttons"},void 0,Object(m.a)("fieldset",{},void 0,Object(m.a)("legend",{},void 0,o),u))}return c?Object(m.a)("div",{className:"glitch local-settings__page__item string"},void 0,Object(m.a)("label",{htmlFor:n},void 0,Object(m.a)("p",{},void 0,o),Object(m.a)("p",{},void 0,Object(m.a)("input",{id:n,type:"text",value:t.getIn(s),placeholder:c,onChange:a,disabled:!g})))):Object(m.a)("div",{className:"glitch local-settings__page__item boolean"},void 0,Object(m.a)("label",{htmlFor:n},void 0,Object(m.a)("input",{id:n,type:"checkbox",checked:t.getIn(s),onChange:a,disabled:!g}),o))},e}(c.a.PureComponent),p=Object(r.f)({layout_auto:{id:"layout.auto",defaultMessage:"Auto"},layout_desktop:{id:"layout.desktop",defaultMessage:"Desktop"},layout_mobile:{id:"layout.single",defaultMessage:"Mobile"},side_arm_none:{id:"settings.side_arm.none",defaultMessage:"None"},side_arm_keep:{id:"settings.side_arm_reply_mode.keep",defaultMessage:"Keep secondary toot button to set privacy"},side_arm_copy:{id:"settings.side_arm_reply_mode.copy",defaultMessage:"Copy privacy setting of the toot being replied to"},side_arm_restrict:{id:"settings.side_arm_reply_mode.restrict",defaultMessage:"Restrict privacy setting to that of the toot being replied to"},regexp:{id:"settings.content_warnings.regexp",defaultMessage:"Regular expression"}}),u=Object(r.g)(s=function(n){function e(){for(var e,t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return e=n.call.apply(n,[this].concat(a))||this,Object(l.a)(Object(o.a)(Object(o.a)(e)),"pages",[function(e){var t=e.intl,a=e.onChange,s=e.settings;return Object(m.a)("div",{className:"glitch local-settings__page general"},void 0,Object(m.a)("h1",{},void 0,Object(m.a)(r.b,{id:"settings.general",defaultMessage:"General"})),Object(m.a)(b,{settings:s,item:["show_reply_count"],id:"mastodon-settings--reply-count",onChange:a},void 0,Object(m.a)(r.b,{id:"settings.show_reply_counter",defaultMessage:"Display an estimate of the reply count"})),Object(m.a)("section",{},void 0,Object(m.a)("h2",{},void 0,Object(m.a)(r.b,{id:"settings.notifications_opts",defaultMessage:"Notifications options"})),Object(m.a)(b,{settings:s,item:["notifications","tab_badge"],id:"mastodon-settings--notifications-tab_badge",onChange:a},void 0,Object(m.a)(r.b,{id:"settings.notifications.tab_badge",defaultMessage:"Unread notifications badge"}),Object(m.a)("span",{className:"hint"},void 0,Object(m.a)(r.b,{id:"settings.notifications.tab_badge.hint",defaultMessage:"Display a badge for unread notifications in the column icons when the notifications column isn't open"}))),Object(m.a)(b,{settings:s,item:["notifications","favicon_badge"],id:"mastodon-settings--notifications-favicon_badge",onChange:a},void 0,Object(m.a)(r.b,{id:"settings.notifications.favicon_badge",defaultMessage:"Unread notifications favicon badge"}),Object(m.a)("span",{className:"hint"},void 0,Object(m.a)(r
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=settings_modal.js.map