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

1 line
42 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/page/item/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/page/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/navigation/index.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/index.js"],"names":["LocalSettingsPageItem","e","target","_this$props","_this","props","item","onChange","options","placeholder","length","value","checked","render","handleChange","this","_this$props2","settings","id","children","dependsOn","dependsOnNot","enabled","i","getIn","currentValue","optionElems","map","opt","optionId","Object","jsx","htmlFor","type","name","onBlur","disabled","message","hint","class","className","React","PureComponent","messages","defineMessages","layout_auto","defaultMessage","layout_desktop","layout_mobile","side_arm_none","side_arm_keep","side_arm_copy","side_arm_restrict","regexp","LocalSettingsPage","injectIntl","_ref","intl","index_es","item_LocalSettingsPageItem","formatMessage","_ref2","_ref3","_ref4","_ref5","pages","index","CurrentPage","onNavigate","preventDefault","handleClick","active","href","icon","textIcon","title","finalClassName","classNames","iconElem","onClick","role","tabIndex","general","compose","content_warnings","collapsed","media","preferences","close","LocalSettingsNavigation","onClose","item_LocalSettingsPage","preferencesLink","LocalSettings","currentIndex","setState","navigateTo","state","navigation_LocalSettingsNavigation","page_LocalSettingsPage","connect","get","dispatch","setting","changeLocalSetting","closeModal"],"mappings":"qKAOqBA,+LAkBJ,SAAAC,GAAK,IACVC,EAAWD,EAAXC,OADUC,EAE+BC,EAAKC,MAA9CC,EAFUH,EAEVG,KAAMC,EAFIJ,EAEJI,SAAUC,EAFNL,EAEMK,QAASC,EAFfN,EAEeM,YAC7BD,GAA4B,EAAjBA,EAAQE,OAAYH,EAASD,EAAMJ,EAAOS,OACnCJ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1B,UAAU,QACV0B,MAAO,EACPE,WAAYsB,EACZjB,KAAK,QACLE,MAAOlB,EAAKG,cAAcjB,EAAS6C,cA/DQ/C,IAAMC,oCCGrDmD,wLAQI,CACNC,aAAc,4CAGH,SAAC5B,GAAD,OACX9D,EAAK2F,SAAS,CAAED,cAAe5B,4CAEjCrD,OAAA,WAAU,IAEAmF,EAAejF,KAAfiF,WAFA7F,EAGgCY,KAAKV,MAArCE,EAHAJ,EAGAI,SAAUmF,EAHVvF,EAGUuF,QAASzE,EAHnBd,EAGmBc,SACnB6E,EAAiB/E,KAAKkF,MAAtBH,aAER,OACEhE,OAAAC,EAAA,EAAAD,CAAA,OAAKU,UAAU,gDAAf,EACEV,OAAAC,EAAA,EAAAD,CAACoE,EAAD,CACEhC,MAAO4B,EACPJ,QAASA,EACTtB,WAAY4B,IAEdlE,OAAAC,EAAA,EAAAD,CAACqE,EAAD,CACEjC,MAAO4B,EACPvF,SAAUA,EACVU,SAAUA,SA/BQwB,IAAMC,eAuCnB0D,4BApDS,SAAAH,GAAK,MAAK,CAChChF,SAAUgF,EAAMI,IAAI,oBAGK,SAAAC,GAAQ,MAAK,CACtC/F,SADsC,SAC5BgG,EAAS5F,GACjB2F,EAASE,YAAmBD,EAAS5F,KAEvC+E,QAJsC,WAKpCY,EAASG,kBA2CEL,CAA6CP","file":"flavours/glitch/async/settings_modal.js","sourcesContent":["// Package imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\n\n// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\nexport default class LocalSettingsPageItem extends React.PureComponent {\n\n static propTypes = {\n children: PropTypes.element.isRequired,\n dependsOn: PropTypes.array,\n dependsOnNot: PropTypes.array,\n id: PropTypes.string.isRequired,\n item: PropTypes.array.isRequired,\n onChange: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.string.isRequired,\n message: PropTypes.string.isRequired,\n hint: PropTypes.string,\n })),\n settings: ImmutablePropTypes.map.isRequired,\n placeholder: PropTypes.string,\n };\n\n handleChange = e => {\n const { target } = e;\n const { item, onChange, options, placeholder } = this.props;\n if (options && options.length > 0) onChange(item, target.value);\n else if (placeholder) onChange(item, target.value);\n else onChange(item, target.checked);\n }\n\n render () {\n const { handleChange } = this;\n const { settings, item, id, options, children, dependsOn, dependsOnNot, placeholder } = this.props;\n let enabled = true;\n\n if (dependsOn) {\n for (let i = 0; i < dependsOn.length; i++) {\n enabled = enabled && settings.getIn(dependsOn[i]);\n }\n }\n if (dependsOnNot) {\n for (let i = 0; i < dependsOnNot.length; i++) {\n enabled = enabled && !settings.getIn(dependsOnNot[i]);\n }\n }\n\n if (options && options.length > 0) {\n const currentValue = settings.getIn(item);\n const optionElems = options && options.length > 0 && options.map((opt) => {\n let optionId = `${id}--${opt.value}`;\n return (\n <label htmlFor={optionId}>\n <input type='radio'\n name={id}\n id={optionId}\n value={opt.value}\n onBlur={handleChange}\n onChange={handleChange}\n checked={ currentValue === opt.value }\n disabled={!enabled}\n />\n {opt.message}\n {opt.hint && <span class='hint'>{opt.hint}</span>}\n </label>\n );\n });\n return (\n <div class='glitch local-settings__page__item radio_buttons'>\n <fieldset>\n <legend>{children}</legend>\n {optionElems}\n </fieldset>\n </div>\n );\n } else if (placeholder) {\n return (\n <div className='glitch local-settings__page__item string'>\n <label htmlFor={id}>\n <p>{children}</p>\n <p>\n <input\n id={id}\n type='text'\n value={settings.getIn(item)}\n placeholder={placeholder}\n onChange={handleChange}\n disabled={!enabled}\n />\n </p>\n </label>\n </div>\n );\n } else return (\n <div className='glitch local-settings__page__item boolean'>\n <label htmlFor={id}>\n <input\n id={id}\n type='checkbox'\n checked={settings.getIn(item)}\n onChange={handleChange}\n disabled={!enabled}\n />\n {children}\n </label>\n </div>\n );\n }\n\n}\n","// Package imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\n\n// Our imports\nimport LocalSettingsPageItem from './item';\n\n// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\nconst messages = defineMessages({\n layout_auto: { id: 'layout.auto', defaultMessage: 'Auto' },\n layout_desktop: { id: 'layout.desktop', defaultMessage: 'Desktop' },\n layout_mobile: { id: 'layout.single', defaultMessage: 'Mobile' },\n side_arm_none: { id: 'settings.side_arm.none', defaultMessage: 'None' },\n side_arm_keep: { id: 'settings.side_arm_reply_mode.keep', defaultMessage: 'Keep secondary toot button to set privacy' },\n side_arm_copy: { id: 'settings.side_arm_reply_mode.copy', defaultMessage: 'Copy privacy setting of the toot being replied to' },\n side_arm_restrict: { id: 'settings.side_arm_reply_mode.restrict', defaultMessage: 'Restrict privacy setting to that of the toot being replied to' },\n regexp: { id: 'settings.content_warnings.regexp', defaultMessage: 'Regular expression' },\n});\n\n@injectIntl\nexport default class LocalSettingsPage extends React.PureComponent {\n\n static propTypes = {\n index : PropTypes.number,\n intl : PropTypes.object.isRequired,\n onChange : PropTypes.func.isRequired,\n settings : ImmutablePropTypes.map.isRequired,\n };\n\n pages = [\n ({ intl, onChange, settings }) => (\n <div className='glitch local-settings__page general'>\n <h1><FormattedMessage id='settings.general' defaultMessage='General' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['show_reply_count']}\n id='mastodon-settings--reply-count'\n onChange={onChange}\n >\n <FormattedMessage id='settings.show_reply_counter' defaultMessage='Display an estimate of the reply count' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['hicolor_privacy_icons']}\n id='mastodon-settings--hicolor_privacy_icons'\n onChange={onChange}\n >\n <FormattedMessage id='settings.hicolor_privacy_icons' defaultMessage='High color privacy icons' />\n <span className='hint'><FormattedMessage id='settings.hicolor_privacy_icons.hint' defaultMessage=\"Display privacy icons in bright and easily distinguishable colors\" /></span>\n </LocalSettingsPageItem>\n <section>\n <h2><FormattedMessage id='settings.notifications_opts' defaultMessage='Notifications options' /></h2>\n <LocalSettingsPageItem\n settings={settings}\n item={['notifications', 'tab_badge']}\n id='mastodon-settings--notifications-tab_badge'\n onChange={onChange}\n >\n <FormattedMessage id='settings.notifications.tab_badge' defaultMessage=\"Unread notifications badge\" />\n <span className='hint'><FormattedMessage id='settings.notifications.tab_badge.hint' defaultMessage=\"Display a badge for unread notifications in the column icons when the notifications column isn't open\" /></span>\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['notifications', 'favicon_badge']}\n id='mastodon-settings--notifications-favicon_badge'\n onChange={onChange}\n >\n <FormattedMessage id='settings.notifications.favicon_badge' defaultMessage='Unread notifications favicon badge' />\n <span className='hint'><FormattedMessage id='settings.notifications.favicon_badge.hint' defaultMessage=\"Add a badge for unread notifications to the favicon\" /></span>\n </LocalSettingsPageItem>\n </section>\n <section>\n <h2><FormattedMessage id='settings.layout_opts' defaultMessage='Layout options' /></h2>\n <LocalSettingsPageItem\n settings={settings}\n item={['layout']}\n id='mastodon-settings--layout'\n options={[\n { value: 'auto', message: intl.formatMessage(messages.layout_auto) },\n { value: 'multiple', message: intl.formatMessage(messages.layout_desktop) },\n { value: 'single', message: intl.formatMessage(messages.layout_mobile) },\n ]}\n onChange={onChange}\n >\n <FormattedMessage id='settings.layout' defaultMessage='Layout:' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['stretch']}\n id='mastodon-settings--stretch'\n onChange={onChange}\n >\n <FormattedMessage id='settings.wide_view' defaultMessage='Wide view (Desktop mode only)' />\n <span className='hint'><FormattedMessage id='settings.wide_view_hint' defaultMessage='Stretches columns to better fill the available space.' /></span>\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['navbar_under']}\n id='mastodon-settings--navbar_under'\n onChange={onChange}\n >\n <FormattedMessage id='settings.navbar_under' defaultMessage='Navbar at the bottom (Mobile only)' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['swipe_to_change_columns']}\n id='mastodon-settings--swipe_to_change_columns'\n onChange={onChange}\n >\n <FormattedMessage id='settings.swipe_to_change_columns' defaultMessage='Allow swiping to change columns (Mobile only)' />\n </LocalSettingsPageItem>\n </section>\n </div>\n ),\n ({ intl, onChange, settings }) => (\n <div className='glitch local-settings__page compose_box_opts'>\n <h1><FormattedMessage id='settings.compose_box_opts' defaultMessage='Compose box' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['always_show_spoilers_field']}\n id='mastodon-settings--always_show_spoilers_field'\n onChange={onChange}\n >\n <FormattedMessage id='settings.always_show_spoilers_field' defaultMessage='Always enable the Content Warning field' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['preselect_on_reply']}\n id='mastodon-settings--preselect_on_reply'\n onChange={onChange}\n >\n <FormattedMessage id='settings.preselect_on_reply' defaultMessage='Pre-select usernames on reply' />\n <span className='hint'><FormattedMessage id='settings.preselect_on_reply_hint' defaultMessage='When replying to a conversation with multiple participants, pre-select usernames past the first' /></span>\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['confirm_missing_media_description']}\n id='mastodon-settings--confirm_missing_media_description'\n onChange={onChange}\n >\n <FormattedMessage id='settings.confirm_missing_media_description' defaultMessage='Show confirmation dialog before sending toots lacking media descriptions' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['confirm_before_clearing_draft']}\n id='mastodon-settings--confirm_before_clearing_draft'\n onChange={onChange}\n >\n <FormattedMessage id='settings.confirm_before_clearing_draft' defaultMessage='Show confirmation dialog before overwriting the message being composed' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['side_arm']}\n id='mastodon-settings--side_arm'\n options={[\n { value: 'none', message: intl.formatMessage(messages.side_arm_none) },\n { value: 'direct', message: intl.formatMessage({ id: 'privacy.direct.short' }) },\n { value: 'private', message: intl.formatMessage({ id: 'privacy.private.short' }) },\n { value: 'unlisted', message: intl.formatMessage({ id: 'privacy.unlisted.short' }) },\n { value: 'public', message: intl.formatMessage({ id: 'privacy.public.short' }) },\n ]}\n onChange={onChange}\n >\n <FormattedMessage id='settings.side_arm' defaultMessage='Secondary toot button:' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['side_arm_reply_mode']}\n id='mastodon-settings--side_arm_reply_mode'\n options={[\n { value: 'keep', message: intl.formatMessage(messages.side_arm_keep) },\n { value: 'copy', message: intl.formatMessage(messages.side_arm_copy) },\n { value: 'restrict', message: intl.formatMessage(messages.side_arm_restrict) },\n ]}\n onChange={onChange}\n >\n <FormattedMessage id='settings.side_arm_reply_mode' defaultMessage='When replying to a toot:' />\n </LocalSettingsPageItem>\n </div>\n ),\n ({ intl, onChange, settings }) => (\n <div className='glitch local-settings__page content_warnings'>\n <h1><FormattedMessage id='settings.content_warnings' defaultMessage='Content warnings' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['content_warnings', 'auto_unfold']}\n id='mastodon-settings--content_warnings-auto_unfold'\n onChange={onChange}\n >\n <FormattedMessage id='settings.enable_content_warnings_auto_unfold' defaultMessage='Automatically unfold content-warnings' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['content_warnings', 'filter']}\n id='mastodon-settings--content_warnings-auto_unfold'\n onChange={onChange}\n dependsOn={[['content_warnings', 'auto_unfold']]}\n placeholder={intl.formatMessage(messages.regexp)}\n >\n <FormattedMessage id='settings.content_warnings_filter' defaultMessage='Content warnings to not automatically unfold:' />\n </LocalSettingsPageItem>\n </div>\n ),\n ({ onChange, settings }) => (\n <div className='glitch local-settings__page collapsed'>\n <h1><FormattedMessage id='settings.collapsed_statuses' defaultMessage='Collapsed toots' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'enabled']}\n id='mastodon-settings--collapsed-enabled'\n onChange={onChange}\n >\n <FormattedMessage id='settings.enable_collapsed' defaultMessage='Enable collapsed toots' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'show_action_bar']}\n id='mastodon-settings--collapsed-show-action-bar'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n >\n <FormattedMessage id='settings.show_action_bar' defaultMessage='Show action buttons in collapsed toots' />\n </LocalSettingsPageItem>\n <section>\n <h2><FormattedMessage id='settings.auto_collapse' defaultMessage='Automatic collapsing' /></h2>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'all']}\n id='mastodon-settings--collapsed-auto-all'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n >\n <FormattedMessage id='settings.auto_collapse_all' defaultMessage='Everything' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'notifications']}\n id='mastodon-settings--collapsed-auto-notifications'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n dependsOnNot={[['collapsed', 'auto', 'all']]}\n >\n <FormattedMessage id='settings.auto_collapse_notifications' defaultMessage='Notifications' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'lengthy']}\n id='mastodon-settings--collapsed-auto-lengthy'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n dependsOnNot={[['collapsed', 'auto', 'all']]}\n >\n <FormattedMessage id='settings.auto_collapse_lengthy' defaultMessage='Lengthy toots' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'reblogs']}\n id='mastodon-settings--collapsed-auto-reblogs'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n dependsOnNot={[['collapsed', 'auto', 'all']]}\n >\n <FormattedMessage id='settings.auto_collapse_reblogs' defaultMessage='Boosts' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'replies']}\n id='mastodon-settings--collapsed-auto-replies'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n dependsOnNot={[['collapsed', 'auto', 'all']]}\n >\n <FormattedMessage id='settings.auto_collapse_replies' defaultMessage='Replies' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'auto', 'media']}\n id='mastodon-settings--collapsed-auto-media'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n dependsOnNot={[['collapsed', 'auto', 'all']]}\n >\n <FormattedMessage id='settings.auto_collapse_media' defaultMessage='Toots with media' />\n </LocalSettingsPageItem>\n </section>\n <section>\n <h2><FormattedMessage id='settings.image_backgrounds' defaultMessage='Image backgrounds' /></h2>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'backgrounds', 'user_backgrounds']}\n id='mastodon-settings--collapsed-user-backgrouns'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n >\n <FormattedMessage id='settings.image_backgrounds_users' defaultMessage='Give collapsed toots an image background' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['collapsed', 'backgrounds', 'preview_images']}\n id='mastodon-settings--collapsed-preview-images'\n onChange={onChange}\n dependsOn={[['collapsed', 'enabled']]}\n >\n <FormattedMessage id='settings.image_backgrounds_media' defaultMessage='Preview collapsed toot media' />\n </LocalSettingsPageItem>\n </section>\n </div>\n ),\n ({ onChange, settings }) => (\n <div className='glitch local-settings__page media'>\n <h1><FormattedMessage id='settings.media' defaultMessage='Media' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['media', 'letterbox']}\n id='mastodon-settings--media-letterbox'\n onChange={onChange}\n >\n <FormattedMessage id='settings.media_letterbox' defaultMessage='Letterbox media' />\n <span className='hint'><FormattedMessage id='settings.media_letterbox_hint' defaultMessage='Scale down and letterbox media to fill the image containers instead of stretching and cropping them' /></span>\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['media', 'fullwidth']}\n id='mastodon-settings--media-fullwidth'\n onChange={onChange}\n >\n <FormattedMessage id='settings.media_fullwidth' defaultMessage='Full-width media previews' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['inline_preview_cards']}\n id='mastodon-settings--inline-preview-cards'\n onChange={onChange}\n >\n <FormattedMessage id='settings.inline_preview_cards' defaultMessage='Inline preview cards for external links' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['media', 'reveal_behind_cw']}\n id='mastodon-settings--reveal-behind-cw'\n onChange={onChange}\n >\n <FormattedMessage id='settings.media_reveal_behind_cw' defaultMessage='Reveal sensitive media behind a CW by default' />\n </LocalSettingsPageItem>\n </div>\n ),\n ];\n\n render () {\n const { pages } = this;\n const { index, intl, onChange, settings } = this.props;\n const CurrentPage = pages[index] || pages[0];\n\n return <CurrentPage intl={intl} onChange={onChange} settings={settings} />;\n }\n\n}\n","// Package imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\n// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\nexport default class LocalSettingsPage extends React.PureComponent {\n\n static propTypes = {\n active: PropTypes.bool,\n className: PropTypes.string,\n href: PropTypes.string,\n icon: PropTypes.string,\n textIcon: PropTypes.string,\n index: PropTypes.number.isRequired,\n onNavigate: PropTypes.func,\n title: PropTypes.string,\n };\n\n handleClick = (e) => {\n const { index, onNavigate } = this.props;\n if (onNavigate) {\n onNavigate(index);\n e.preventDefault();\n }\n }\n\n render () {\n const { handleClick } = this;\n const {\n active,\n className,\n href,\n icon,\n textIcon,\n onNavigate,\n title,\n } = this.props;\n\n const finalClassName = classNames('glitch', 'local-settings__navigation__item', {\n active,\n }, className);\n\n const iconElem = icon ? <i className={`fa fa-fw fa-${icon}`} /> : (textIcon ? <span className='text-icon-button'>{textIcon}</span> : null);\n\n if (href) return (\n <a\n href={href}\n className={finalClassName}\n >\n {iconElem} <span>{title}</span>\n </a>\n );\n else if (onNavigate) return (\n <a\n onClick={handleClick}\n role='button'\n tabIndex='0'\n className={finalClassName}\n >\n {iconElem} <span>{title}</span>\n </a>\n );\n else return null;\n }\n\n}\n","// Package imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\n\n// Our imports\nimport LocalSettingsNavigationItem from './item';\nimport { preferencesLink } from 'flavours/glitch/util/backend_links';\n\n// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\nconst messages = defineMessages({\n general: { id: 'settings.general', defaultMessage: 'General' },\n compose: { id: 'settings.compose_box_opts', defaultMessage: 'Compose box' },\n content_warnings: { id: 'settings.content_warnings', defaultMessage: 'Content Warnings' },\n collapsed: { id: 'settings.collapsed_statuses', defaultMessage: 'Collapsed toots' },\n media: { id: 'settings.media', defaultMessage: 'Media' },\n preferences: { id: 'settings.preferences', defaultMessage: 'Preferences' },\n close: { id: 'settings.close', defaultMessage: 'Close' },\n});\n\n@injectIntl\nexport default class LocalSettingsNavigation extends React.PureComponent {\n\n static propTypes = {\n index : PropTypes.number,\n intl : PropTypes.object.isRequired,\n onClose : PropTypes.func.isRequired,\n onNavigate : PropTypes.func.isRequired,\n };\n\n render () {\n\n const { index, intl, onClose, onNavigate } = this.props;\n\n return (\n <nav className='glitch local-settings__navigation'>\n <LocalSettingsNavigationItem\n active={index === 0}\n index={0}\n onNavigate={onNavigate}\n icon='cogs'\n title={intl.formatMessage(messages.general)}\n />\n <LocalSettingsNavigationItem\n active={index === 1}\n index={1}\n onNavigate={onNavigate}\n icon='pencil'\n title={intl.formatMessage(messages.compose)}\n />\n <LocalSettingsNavigationItem\n active={index === 2}\n index={2}\n onNavigate={onNavigate}\n textIcon='CW'\n title={intl.formatMessage(messages.content_warnings)}\n />\n <LocalSettingsNavigationItem\n active={index === 3}\n index={3}\n onNavigate={onNavigate}\n icon='angle-double-up'\n title={intl.formatMessage(messages.collapsed)}\n />\n <LocalSettingsNavigationItem\n active={index === 4}\n index={4}\n onNavigate={onNavigate}\n icon='image'\n title={intl.formatMessage(messages.media)}\n />\n <LocalSettingsNavigationItem\n active={index === 5}\n href={ preferencesLink }\n index={5}\n icon='sliders'\n title={intl.formatMessage(messages.preferences)}\n />\n <LocalSettingsNavigationItem\n active={index === 6}\n className='close'\n index={6}\n onNavigate={onClose}\n icon='times'\n title={intl.formatMessage(messages.close)}\n />\n </nav>\n );\n }\n\n}\n","// Package imports.\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\n// Our imports\nimport LocalSettingsPage from './page';\nimport LocalSettingsNavigation from './navigation';\nimport { closeModal } from 'flavours/glitch/actions/modal';\nimport { changeLocalSetting } from 'flavours/glitch/actions/local_settings';\n\nconst mapStateToProps = state => ({\n settings: state.get('local_settings'),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onChange (setting, value) {\n dispatch(changeLocalSetting(setting, value));\n },\n onClose () {\n dispatch(closeModal());\n },\n});\n\nclass LocalSettings extends React.PureComponent {\n\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n settings: ImmutablePropTypes.map.isRequired,\n };\n\n state = {\n currentIndex: 0,\n };\n\n navigateTo = (index) =>\n this.setState({ currentIndex: +index });\n\n render () {\n\n const { navigateTo } = this;\n const { onChange, onClose, settings } = this.props;\n const { currentIndex } = this.state;\n\n return (\n <div className='glitch modal-root__modal local-settings'>\n <LocalSettingsNavigation\n index={currentIndex}\n onClose={onClose}\n onNavigate={navigateTo}\n />\n <LocalSettingsPage\n index={currentIndex}\n onChange={onChange}\n settings={settings}\n />\n </div>\n );\n }\n\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LocalSettings);\n"],"sourceRoot":""}