spc-pleroma/priv/static/packs/flavours/glitch/async/settings_modal.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2019-06-26 19:06:28 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{694:function(e,t,a){"use strict";a.r(t);var s,i,m=a(0),n=a(2),o=a(6),l=a(1),d=a(3),c=a.n(d),g=a(21),r=a(7),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(n.a)(d),"handleChange",function(e){var t=e.target,a=d.props,s=a.item,i=a.onChange,n=a.options,o=a.placeholder;n&&0<n.length?i(s,t.value):i(s,o?t.value:t.checked)}),d}return Object(o.a)(e,s),e.prototype.render=function(){var a=this.handleChange,e=this.props,t=e.settings,s=e.item,i=e.id,n=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(n&&0<n.length){var p=t.getIn(s),u=n&&0<n.length&&n.map(function(e){var t=i+"--"+e.value;return Object(m.a)("label",{htmlFor:t},void 0,Object(m.a)("input",{type:"radio",name:i,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:i},void 0,Object(m.a)("p",{},void 0,o),Object(m.a)("p",{},void 0,Object(m.a)("input",{id:i,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:i},void 0,Object(m.a)("input",{id:i,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(i){function e(){for(var e,t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return e=i.call.apply(i,[this].concat(a))||this,Object(l.a)(Object(n.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)(b,{settings:s,item:["hicolor_privacy_icons"],id:"mastodon-settings--hicolor_privacy_icons",onChange:a},void 0,Object(m.a)(r.b,{id:"settings.hicolor_privacy_icons",defaultMessage:"High color privacy icons"}),Object(m.a)("span",{className:"hint"},void 0,Object(m.a)(r.b,{id:"settings.hicolor_privacy_icons.hint",defaultMessage:"Display privacy icons in bright and easily distinguishable colors"}))),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 noti
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=settings_modal.js.map