mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 18:36:21 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/getting_started/index.js"],"names":["messages","defineMessages","_defineMessages","heading","id","defaultMessage","home_timeline","notifications","public_timeline","navigation_subheading","settings_subheading","community_timeline","direct","bookmarks","preferences","settings","follow_requests","sign_out","lists","keyboard_shortcuts","lists_subheading","misc","menu","badgeDisplay","number","limit","GettingStarted","connect","getOrderedLists","createSelector","state","get","toList","filter","item","sort","a","b","localeCompare","myAccount","getIn","me","columns","unreadFollowRequests","ImmutableList","size","unreadNotifications","customPanelEnabled","customPanel","dispatch","fetchFollowRequests","fetchLists","openSettings","openModal","fetchPanel","fetchPleromaConfig","injectIntl","componentWillMount","this","props","componentDidMount","_this$props","render","_this$props2","intl","multiColumn","navItems","listItems","find","push","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_features_ui_components_column_link__WEBPACK_IMPORTED_MODULE_5__","icon","text","formatMessage","to","badge","concat","map","list","Number","toString","instance_panel","className","dangerouslySetInnerHTML","__html","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_4__","name","label","hideHeadingOnMobile","flavours_glitch_features_ui_components_column_subheading__WEBPACK_IMPORTED_MODULE_6__","undefined","preferencesLink","href","onClick","signOutLink","method","react_intl__WEBPACK_IMPORTED_MODULE_7__","values","mastofe","rel","target","glitchsoc","mastodon","pleroma","ImmutablePureComponent","PropTypes","object","isRequired","ImmutablePropTypes","bool","func","string"],"mappings":"oUAkBMA,EAAWC,cAAcC,EAAA,CAC7BC,QAAO,CAAAC,GAAA,0BAAAC,eAAA,mBACPC,cAAa,CAAAF,GAAA,gBAAAC,eAAA,QACbE,cAAa,CAAAH,GAAA,yBAAAC,eAAA,iBACbG,gBAAe,CAAAJ,GAAA,iCAAAC,eAAA,sBACfI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UAAWgF,QAAS3C,IAC9EkB,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,CAAYC,KAAK,WAAWC,KAAMV,EAAKW,cAAc3E,EAASiB,UAAW6E,KAAME,IAAaC,OAAO,YAGpGd,EAEDb,OAAAC,EAAA,EAAAD,CAAA,OAAKc,UAAU,2CAAf,EACEd,OAAAC,EAAA,EAAAD,CAAA,cACEA,OAAAC,EAAA,EAAAD,CAAC4B,EAAA,EAAD,CACE9F,GAAG,iCACHC,eAAe,qJACf8F,OAAQ,CACNC,QAAS9B,OAAAC,EAAA,EAAAD,CAAA,KAAGwB,KAAK,6CAA6CO,IAAI,WAAWC,OAAO,eAA3E,aACTC,UAAWjC,OAAAC,EAAA,EAAAD,CAAA,KAAGwB,KAAK,yCAAyCO,IAAI,WAAWC,OAAO,eAAvE,gBACXE,SAAUlC,OAAAC,EAAA,EAAAD,CAAA,KAAGwB,KAAK,wCAAwCO,IAAI,WAAWC,OAAO,eAAtE,cACVG,QAASnC,OAAAC,EAAA,EAAAD,CAAA,KAAGwB,KAAK,yBAAyBO,IAAI,WAAWC,OAAO,eAAvD,uBA3GmBI,+BAEvB,CACjB1C,KAAM2C,IAAUC,OAAOC,WACvBtE,UAAWuE,IAAmB/B,IAAI8B,WAClCnE,QAASoE,IAAmB9B,KAC5Bf,YAAa0C,IAAUI,KACvB7D,oBAAqByD,IAAUK,KAAKH,WACpClE,qBAAsBgE,IAAUnF,OAChCsB,oBAAqB6D,IAAUnF,OAC/BN,MAAO4F,IAAmB9B,KAC1B7B,WAAYwD,IAAUK,KAAKH,WAC3BzD,aAAcuD,IAAUK,KAAKH,WAC7BvD,WAAYqD,IAAUK,KAAKH,WAC3BtD,mBAAoBoD,IAAUK,KAAKH,WACnC9D,mBAAoB4D,IAAUI,KAC9B/D,YAAa2D,IAAUM,OAAOJ","file":"flavours/glitch/async/getting_started.js","sourcesContent":["import React from 'react';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnLink from 'flavours/glitch/features/ui/components/column_link';\nimport ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\nimport { openModal } from 'flavours/glitch/actions/modal';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, invitesEnabled, version } from 'flavours/glitch/util/initial_state';\nimport { fetchFollowRequests } from 'flavours/glitch/actions/accounts';\nimport { List as ImmutableList } from 'immutable';\nimport { createSelector } from 'reselect';\nimport { fetchLists } from 'flavours/glitch/actions/lists';\nimport { preferencesLink, profileLink, signOutLink } from 'flavours/glitch/util/backend_links';\nimport { fetchPanel, fetchPleromaConfig } from 'mastodon/actions/pleroma';\n\nconst messages = defineMessages({\n heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },\n notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' },\n public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },\n navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' },\n settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' },\n community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },\n direct: { id: 'navigation_bar.direct', defaultMessage: 'Direct messages' },\n bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },\n preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },\n settings: { id: 'navigation_bar.app_settings', defaultMessage: 'App settings' },\n follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },\n sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n lists_subheading: { id: 'column_subheading.lists', defaultMessage: 'Lists' },\n misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' },\n menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n});\n\nconst makeMapStateToProps = () => {\n const getOrderedLists = createSelector([state => state.get('lists')], lists => {\n if (!lists) {\n return lists;\n }\n\n return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));\n });\n\n const mapStateToProps = state => ({\n lists: getOrderedLists(state),\n myAccount: state.getIn(['accounts', me]),\n columns: state.getIn(['settings', 'columns']),\n unreadFollowRequests: state.getIn(['user_lists', 'follow_requests', 'items'], ImmutableList()).size,\n unreadNotifications: state.getIn(['notifications', 'unread']),\n customPanelEnabled: state.getIn(['custom_panel', 'enabled']),\n customPanel: state.getIn(['custom_panel', 'panel']),\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = dispatch => ({\n fetchFollowRequests: () => dispatch(fetchFollowRequests()),\n fetchLists: () => dispatch(fetchLists()),\n openSettings: () => dispatch(openModal('SETTINGS', {})),\n fetchPanel: () => dispatch(fetchPanel()),\n fetchPleromaConfig: () => dispatch(fetchPleromaConfig()),\n});\n\nconst badgeDisplay = (number, limit) => {\n if (number === 0) {\n return undefined;\n } else if (limit && number >= limit) {\n return `${limit}+`;\n } else {\n return number;\n }\n};\n\n@connect(makeMapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class GettingStarted extends ImmutablePureComponent {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n columns: ImmutablePropTypes.list,\n multiColumn: PropTypes.bool,\n fetchFollowRequests: PropTypes.func.isRequired,\n unreadFollowRequests: PropTypes.number,\n unreadNotifications: PropTypes.number,\n lists: ImmutablePropTypes.list,\n fetchLists: PropTypes.func.isRequired,\n openSettings: PropTypes.func.isRequired,\n fetchPanel: PropTypes.func.isRequired,\n fetchPleromaConfig: PropTypes.func.isRequired,\n customPanelEnabled: PropTypes.bool,\n customPanel: PropTypes.string.isRequired,\n };\n\n componentWillMount () {\n this.props.fetchLists();\n }\n\n componentDidMount () {\n const { myAccount, fetchFollowRequests, fetchPleromaConfig, fetchPanel } = this.props;\n\n if (myAccount.get('locked')) {\n fetchFollowRequests();\n }\n\n fetchPleromaConfig();\n fetchPanel();\n }\n\n render () {\n const { intl, myAccount, columns, multiColumn, unreadFollowRequests, unreadNotifications, lists, openSettings, customPanelEnabled, customPanel } = this.props;\n\n const navItems = [];\n let listItems = [];\n\n if (multiColumn) {\n if (!columns.find(item => item.get('id') === 'HOME')) {\n navItems.push(<ColumnLink key='0' icon='home' text={intl.formatMessage(messages.home_timeline)} to='/timelines/home' />);\n }\n\n if (!columns.find(item => item.get('id') === 'NOTIFICATIONS')) {\n navItems.push(<ColumnLink key='1' icon='bell' text={intl.formatMessage(messages.notifications)} badge={badgeDisplay(unreadNotifications)} to='/notifications' />);\n }\n\n if (!columns.find(item => item.get('id') === 'COMMUNITY')) {\n navItems.push(<ColumnLink key='2' icon='users' text={intl.formatMessage(messages.community_timeline)} to='/timelines/public/local' />);\n }\n\n if (!columns.find(item => item.get('id') === 'PUBLIC')) {\n navItems.push(<ColumnLink key='3' icon='globe' text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />);\n }\n }\n\n if (!multiColumn || !columns.find(item => item.get('id') === 'DIRECT')) {\n navItems.push(<ColumnLink key='4' icon='envelope' text={intl.formatMessage(messages.direct)} to='/timelines/direct' />);\n }\n\n if (!multiColumn || !columns.find(item => item.get('id') === 'BOOKMARKS')) {\n navItems.push(<ColumnLink key='5' icon='bookmark' text={intl.formatMessage(messages.bookmarks)} to='/bookmarks' />);\n }\n\n if (myAccount.get('locked')) {\n navItems.push(<ColumnLink key='6' icon='users' text={intl.formatMessage(messages.follow_requests)} badge={badgeDisplay(unreadFollowRequests, 40)} to='/follow_requests' />);\n }\n\n navItems.push(<ColumnLink key='7' icon='ellipsis-h' text={intl.formatMessage(messages.misc)} to='/getting-started-misc' />);\n\n listItems = listItems.concat([\n <div key='8'>\n <ColumnLink key='9' icon='bars' text={intl.formatMessage(messages.lists)} to='/lists' />\n {lists.map(list =>\n <ColumnLink key={(9 + Number(list.get('id'))).toString()} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} />\n )}\n </div>,\n ]);\n\n const instance_panel = (customPanelEnabled ? <div className='getting-started getting-started__panel scrollable' dangerouslySetInnerHTML={{__html: customPanel}} /> : null);\n\n return (\n <Column name='getting-started' icon='asterisk' heading={intl.formatMessage(messages.heading)} label={intl.formatMessage(messages.menu)} hideHeadingOnMobile>\n <div className='getting-started__wrapper scrollable'>\n <ColumnSubheading text={intl.formatMessage(messages.navigation_subheading)} />\n {navItems}\n <ColumnSubheading text={intl.formatMessage(messages.lists_subheading)} />\n {listItems}\n <ColumnSubheading text={intl.formatMessage(messages.settings_subheading)} />\n { preferencesLink !== undefined && <ColumnLink icon='cog' text={intl.formatMessage(messages.preferences)} href={preferencesLink} /> }\n <ColumnLink icon='cogs' text={intl.formatMessage(messages.settings)} onClick={openSettings} />\n <ColumnLink icon='sign-out' text={intl.formatMessage(messages.sign_out)} href={signOutLink} method='delete' />\n </div>\n\n {instance_panel}\n\n <div className='getting-started__footer scrollable'>\n <p>\n <FormattedMessage\n id='getting_started.mastofe_notice'\n defaultMessage='Mastofe is a libre distribution of the frontend from {glitchsoc}, a friendly fork of {mastodon}. You can contribute or report issues at {mastofe}.'\n values={{\n mastofe: <a href='https://git.pleroma.social/pleroma/mastofe' rel='noopener' target='_blank'>Mastofe</a>,\n glitchsoc: <a href='https://github.com/glitch-soc/mastodon' rel='noopener' target='_blank'>glitch-soc</a>,\n mastodon: <a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>Mastodon</a>,\n pleroma: <a href='https://pleroma.social' rel='noopener' target='_blank'>Pleroma</a>\n }}\n />\n </p>\n </div>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |