mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-26 10:46:13 +00:00
1 line
45 KiB
Plaintext
1 line
45 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/page/item/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/page/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/navigation/item/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/navigation/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/local_settings/index.js"],"names":["LocalSettingsPageItem","e","target","props","item","onChange","options","placeholder","length","value","checked","render","handleChange","this","settings","id","children","dependsOn","dependsOnNot","enabled","i","getIn","currentValue","optionElems","map","opt","optionId","htmlFor","type","name","onBlur","disabled","message","hint","className","React","PureComponent","messages","defineMessages","layout_auto","layout_auto_hint","layout_desktop","layout_desktop_hint","layout_mobile","layout_mobile_hint","side_arm_none","side_arm_keep","side_arm_copy","side_arm_restrict","regexp","filters_drop","filters_upstream","filters_hide","filters_cw","rewrite_mentions_no","rewrite_mentions_acct","rewrite_mentions_username","LocalSettingsPage","injectIntl","intl","defaultMessage","formatMessage","pages","index","CurrentPage","onNavigate","preventDefault","handleClick","active","href","icon","textIcon","title","finalClassName","classNames","iconElem","fixedWidth","onClick","role","tabIndex","general","compose","content_warnings","filters","collapsed","media","preferences","close","LocalSettingsNavigation","onClose","preferencesLink","LocalSettings","currentIndex","setState","navigateTo","state","connect","get","dispatch","setting","changeLocalSetting","closeModal"],"mappings":"mLAOqBA,E,yNAkBJ,SAAAC,GAAM,IACXC,EAAWD,EAAXC,OADU,EAE+B,EAAKC,MAA9CC,EAFU,EAEVA,KAAMC,EAFI,EA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,mBA2CEL,CAA6CL","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.node.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 className='hint'>{opt.hint}</span>}\n </label>\n );\n });\n return (\n <div className='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_auto_hint: { id: 'layout.hint.auto', defaultMessage: 'Automatically chose layout based on “Enable advanced web interface” setting and screen size.' },\n layout_desktop: { id: 'layout.desktop', defaultMessage: 'Desktop' },\n layout_desktop_hint: { id: 'layout.hint.desktop', defaultMessage: 'Use multiple-column layout regardless of the “Enable advanced web interface” setting or screen size.' },\n layout_mobile: { id: 'layout.single', defaultMessage: 'Mobile' },\n layout_mobile_hint: { id: 'layout.hint.single', defaultMessage: 'Use single-column layout regardless of the “Enable advanced web interface” setting or screen size.' },\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 filters_drop: { id: 'settings.filtering_behavior.drop', defaultMessage: 'Hide filtered toots completely' },\n filters_upstream: { id: 'settings.filtering_behavior.upstream', defaultMessage: 'Show \"filtered\" like vanilla Mastodon' },\n filters_hide: { id: 'settings.filtering_behavior.hide', defaultMessage: 'Show \"filtered\" and add a button to display why' },\n filters_cw: { id: 'settings.filtering_behavior.cw', defaultMessage: 'Still display the post, and add filtered words to content warning' },\n rewrite_mentions_no: { id: 'settings.rewrite_mentions_no', defaultMessage: 'Do not rewrite mentions' },\n rewrite_mentions_acct: { id: 'settings.rewrite_mentions_acct', defaultMessage: 'Rewrite with username and domain (when the account is remote)' },\n rewrite_mentions_username: { id: 'settings.rewrite_mentions_username', defaultMessage: 'Rewrite with username' },\n});\n\nexport default @injectIntl\nclass 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 <LocalSettingsPageItem\n settings={settings}\n item={['confirm_boost_missing_media_description']}\n id='mastodon-settings--confirm_boost_missing_media_description'\n onChange={onChange}\n >\n <FormattedMessage id='settings.confirm_boost_missing_media_description' defaultMessage='Show confirmation dialog before boosting toots lacking media descriptions' />\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['tag_misleading_links']}\n id='mastodon-settings--tag_misleading_links'\n onChange={onChange}\n >\n <FormattedMessage id='settings.tag_misleading_links' defaultMessage='Tag misleading links' />\n <span className='hint'><FormattedMessage id='settings.tag_misleading_links.hint' defaultMessage=\"Add a visual indication with the link target host to every link not mentioning it explicitly\" /></span>\n </LocalSettingsPageItem>\n <LocalSettingsPageItem\n settings={settings}\n item={['rewrite_mentions']}\n id='mastodon-settings--rewrite_mentions'\n options={[\n { value: 'no', message: intl.formatMessage(messages.rewrite_mentions_no) },\n { value: 'acct', message: intl.formatMessage(messages.rewrite_mentions_acct) },\n { value: 'username', message: intl.formatMessage(messages.rewrite_mentions_username) },\n ]}\n onChange={onChange}\n >\n <FormattedMessage id='settings.rewrite_mentions' defaultMessage='Rewrite mentions in displayed statuses' />\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), hint: intl.formatMessage(messages.layout_auto_hint) },\n { value: 'multiple', message: intl.formatMessage(messages.layout_desktop), hint: intl.formatMessage(messages.layout_desktop_hint) },\n { value: 'single', message: intl.formatMessage(messages.layout_mobile), hint: intl.formatMessage(messages.layout_mobile_hint) },\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={['prepend_cw_re']}\n id='mastodon-settings--prepend_cw_re'\n onChange={onChange}\n >\n <FormattedMessage id='settings.prepend_cw_re' defaultMessage='Prepend “re: ” to content warnings when replying' />\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={['show_content_type_choice']}\n id='mastodon-settings--show_content_type_choice'\n onChange={onChange}\n >\n <FormattedMessage id='settings.show_content_type_choice' defaultMessage='Show content-type choice when authoring toots' />\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 ({ intl, onChange, settings }) => (\n <div className='glitch local-settings__page filters'>\n <h1><FormattedMessage id='settings.filters' defaultMessage='Filters' /></h1>\n <LocalSettingsPageItem\n settings={settings}\n item={['filtering_behavior']}\n id='mastodon-settings--filters-behavior'\n onChange={onChange}\n options={[\n { value: 'drop', message: intl.formatMessage(messages.filters_drop) },\n { value: 'upstream', message: intl.formatMessage(messages.filters_upstream) },\n { value: 'hide', message: intl.formatMessage(messages.filters_hide) },\n { value: 'content_warning', message: intl.formatMessage(messages.filters_cw) }\n ]}\n >\n <FormattedMessage id='settings.filtering_behavior' defaultMessage='Filtering behavior' />\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\nimport Icon from 'flavours/glitch/components/icon';\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 ? <Icon fixedWidth id={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 filters: { id: 'settings.filters', defaultMessage: 'Filters' },\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\nexport default @injectIntl\nclass 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='filter'\n title={intl.formatMessage(messages.filters)}\n />\n <LocalSettingsNavigationItem\n active={index === 4}\n index={4}\n onNavigate={onNavigate}\n icon='angle-double-up'\n title={intl.formatMessage(messages.collapsed)}\n />\n <LocalSettingsNavigationItem\n active={index === 5}\n index={5}\n onNavigate={onNavigate}\n icon='image'\n title={intl.formatMessage(messages.media)}\n />\n <LocalSettingsNavigationItem\n active={index === 6}\n href={ preferencesLink }\n index={6}\n icon='cog'\n title={intl.formatMessage(messages.preferences)}\n />\n <LocalSettingsNavigationItem\n active={index === 7}\n className='close'\n index={7}\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":""} |