diff options
author | Starfall <us@starfall.systems> | 2022-05-04 12:00:22 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-05-04 12:00:22 -0500 |
commit | e9b2e11520056d0ec822ac0862923d00c6a1289c (patch) | |
tree | 53b22a4fecda9846fc6c77cf4067c071a6287df0 /app/javascript/flavours | |
parent | 9ec0ecda66745c892961a917b18354f42dfc1f19 (diff) | |
parent | 58ac5ae643dc57ffd20017c54e7be523deaef156 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/javascript/flavours')
25 files changed, 42 insertions, 87 deletions
diff --git a/app/javascript/flavours/glitch/components/common_counter.js b/app/javascript/flavours/glitch/components/common_counter.js index e10cd9b76..dd9b62de9 100644 --- a/app/javascript/flavours/glitch/components/common_counter.js +++ b/app/javascript/flavours/glitch/components/common_counter.js @@ -25,7 +25,7 @@ export function counterRenderer(counterType, isBold = true) { return (displayNumber, pluralReady) => ( <FormattedMessage id='account.statuses_counter' - defaultMessage='{count, plural, one {{counter} Toot} other {{counter} Toots}}' + defaultMessage='{count, plural, one {{counter} Post} other {{counter} Posts}}' values={{ count: pluralReady, counter: renderCounter(displayNumber), diff --git a/app/javascript/flavours/glitch/components/status_prepend.js b/app/javascript/flavours/glitch/components/status_prepend.js index 1661ca8f5..d85009362 100644 --- a/app/javascript/flavours/glitch/components/status_prepend.js +++ b/app/javascript/flavours/glitch/components/status_prepend.js @@ -38,7 +38,7 @@ export default class StatusPrepend extends React.PureComponent { switch (type) { case 'featured': return ( - <FormattedMessage id='status.pinned' defaultMessage='Pinned toot' /> + <FormattedMessage id='status.pinned' defaultMessage='Pinned post' /> ); case 'reblogged_by': return ( diff --git a/app/javascript/flavours/glitch/components/status_visibility_icon.js b/app/javascript/flavours/glitch/components/status_visibility_icon.js index e2e0f30b8..07d56c7a8 100644 --- a/app/javascript/flavours/glitch/components/status_visibility_icon.js +++ b/app/javascript/flavours/glitch/components/status_visibility_icon.js @@ -9,7 +9,7 @@ const messages = defineMessages({ public: { id: 'privacy.public.short', defaultMessage: 'Public' }, unlisted: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' }, private: { id: 'privacy.private.short', defaultMessage: 'Followers-only' }, - direct: { id: 'privacy.direct.short', defaultMessage: 'Direct' }, + direct: { id: 'privacy.direct.short', defaultMessage: 'Mentioned people only' }, }); export default @injectIntl diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 4b0494fff..68c6bae8e 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -37,7 +37,7 @@ const messages = defineMessages({ showReblogs: { id: 'account.show_reblogs', defaultMessage: 'Show boosts from @{name}' }, enableNotifications: { id: 'account.enable_notifications', defaultMessage: 'Notify me when @{name} posts' }, disableNotifications: { id: 'account.disable_notifications', defaultMessage: 'Stop notifying me when @{name} posts' }, - pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' }, + pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' }, preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/header.js b/app/javascript/flavours/glitch/features/account_timeline/components/header.js index e70f011b7..d6e607a37 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/header.js +++ b/app/javascript/flavours/glitch/features/account_timeline/components/header.js @@ -128,8 +128,8 @@ export default class Header extends ImmutablePureComponent { {!hideTabs && ( <div className='account__section-headline'> - <NavLink exact to={`/@${account.get('acct')}`}><FormattedMessage id='account.posts' defaultMessage='Toots' /></NavLink> - <NavLink exact to={`/@${account.get('acct')}/with_replies`}><FormattedMessage id='account.posts_with_replies' defaultMessage='Toots with replies' /></NavLink> + <NavLink exact to={`/@${account.get('acct')}`}><FormattedMessage id='account.posts' defaultMessage='Posts' /></NavLink> + <NavLink exact to={`/@${account.get('acct')}/with_replies`}><FormattedMessage id='account.posts_with_replies' defaultMessage='Posts with replies' /></NavLink> <NavLink exact to={`/@${account.get('acct')}/media`}><FormattedMessage id='account.media' defaultMessage='Media' /></NavLink> </div> )} diff --git a/app/javascript/flavours/glitch/features/account_timeline/index.js b/app/javascript/flavours/glitch/features/account_timeline/index.js index 776687486..6d2df5c6f 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/index.js +++ b/app/javascript/flavours/glitch/features/account_timeline/index.js @@ -44,7 +44,7 @@ const mapStateToProps = (state, { params: { acct, id }, withReplies = false }) = }; const RemoteHint = ({ url }) => ( - <TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.statuses' defaultMessage='Older toots' />} /> + <TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.statuses' defaultMessage='Older posts' />} /> ); RemoteHint.propTypes = { @@ -156,7 +156,7 @@ class AccountTimeline extends ImmutablePureComponent { } else if (remote && statusIds.isEmpty()) { emptyMessage = <RemoteHint url={remoteUrl} />; } else { - emptyMessage = <FormattedMessage id='empty_column.account_timeline' defaultMessage='No toots here!' />; + emptyMessage = <FormattedMessage id='empty_column.account_timeline' defaultMessage='No posts found' />; } const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null; diff --git a/app/javascript/flavours/glitch/features/bookmarked_statuses/index.js b/app/javascript/flavours/glitch/features/bookmarked_statuses/index.js index 58b9e6396..ada8fb068 100644 --- a/app/javascript/flavours/glitch/features/bookmarked_statuses/index.js +++ b/app/javascript/flavours/glitch/features/bookmarked_statuses/index.js @@ -70,7 +70,7 @@ class Bookmarks extends ImmutablePureComponent { const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props; const pinned = !!columnId; - const emptyMessage = <FormattedMessage id='empty_column.bookmarked_statuses' defaultMessage="You don't have any bookmarked toots yet. When you bookmark one, it will show up here." />; + const emptyMessage = <FormattedMessage id='empty_column.bookmarked_statuses' defaultMessage="You don't have any bookmarked posts yet. When you bookmark one, it will show up here." />; return ( <Column bindToDocument={!multiColumn} ref={this.setRef} name='bookmarks'> diff --git a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js index c8e783d22..14364b0a0 100644 --- a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js @@ -6,12 +6,12 @@ import Dropdown from './dropdown'; const messages = defineMessages({ public_short: { id: 'privacy.public.short', defaultMessage: 'Public' }, - public_long: { id: 'privacy.public.long', defaultMessage: 'Visible for all, shown in public timelines' }, + public_long: { id: 'privacy.public.long', defaultMessage: 'Visible for all' }, unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' }, - unlisted_long: { id: 'privacy.unlisted.long', defaultMessage: 'Visible for all, but not in public timelines' }, - private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' }, + unlisted_long: { id: 'privacy.unlisted.long', defaultMessage: 'Visible for all, but opted-out of discovery features' }, + private_short: { id: 'privacy.private.short', defaultMessage: 'Followers only' }, private_long: { id: 'privacy.private.long', defaultMessage: 'Visible for followers only' }, - direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' }, + direct_short: { id: 'privacy.direct.short', defaultMessage: 'Only people I mention' }, direct_long: { id: 'privacy.direct.long', defaultMessage: 'Visible for mentioned users only' }, change_privacy: { id: 'privacy.change', defaultMessage: 'Adjust status privacy' }, }); diff --git a/app/javascript/flavours/glitch/features/compose/components/search_results.js b/app/javascript/flavours/glitch/features/compose/components/search_results.js index cbc1f35e5..d92a6bf6b 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search_results.js +++ b/app/javascript/flavours/glitch/features/compose/components/search_results.js @@ -72,10 +72,10 @@ class SearchResults extends ImmutablePureComponent { } else if(results.get('statuses') && results.get('statuses').size === 0 && !searchEnabled && !(searchTerm.startsWith('@') || searchTerm.startsWith('#') || searchTerm.includes(' '))) { statuses = ( <section className='search-results__section'> - <h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Toots' /></h5> + <h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Posts' /></h5> <div className='search-results__info'> - <FormattedMessage id='search_results.statuses_fts_disabled' defaultMessage='Searching toots by their content is not enabled on this Mastodon server.' /> + <FormattedMessage id='search_results.statuses_fts_disabled' defaultMessage='Searching posts by their content is not enabled on this Mastodon server.' /> </div> </section> ); @@ -101,7 +101,7 @@ class SearchResults extends ImmutablePureComponent { count += results.get('statuses').size; statuses = ( <section className='search-results__section'> - <h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Toots' /></h5> + <h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Posts' /></h5> {results.get('statuses').map(statusId => <StatusContainer id={statusId} key={statusId}/>)} diff --git a/app/javascript/flavours/glitch/features/compose/containers/warning_container.js b/app/javascript/flavours/glitch/features/compose/containers/warning_container.js index ab9d2123a..5fccaa442 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/warning_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/warning_container.js @@ -43,13 +43,13 @@ const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning } if (hashtagWarning) { - return <Warning message={<FormattedMessage id='compose_form.hashtag_warning' defaultMessage="This toot won't be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag." />} />; + return <Warning message={<FormattedMessage id='compose_form.hashtag_warning' defaultMessage="This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag." />} />; } if (directMessageWarning) { const message = ( <span> - <FormattedMessage id='compose_form.direct_message_warning' defaultMessage='This toot will only be sent to all the mentioned users.' /> {!!termsLink && <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a>} + <FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> {!!termsLink && <a href={termsLink} target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a>} </span> ); diff --git a/app/javascript/flavours/glitch/features/compose/index.js b/app/javascript/flavours/glitch/features/compose/index.js index cb6c54a48..b9a8e0245 100644 --- a/app/javascript/flavours/glitch/features/compose/index.js +++ b/app/javascript/flavours/glitch/features/compose/index.js @@ -16,7 +16,7 @@ import { cycleElefriendCompose } from 'flavours/glitch/actions/compose'; import HeaderContainer from './containers/header_container'; const messages = defineMessages({ - compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new toot' }, + compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new post' }, }); const mapStateToProps = (state, ownProps) => ({ diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.js b/app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.js index ce14e2a9d..18c3c7e21 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.js +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import SettingToggle from 'flavours/glitch/features/notifications/components/setting_toggle'; import SettingText from '../../../components/setting_text'; const messages = defineMessages({ @@ -23,6 +24,12 @@ class ColumnSettings extends React.PureComponent { return ( <div> + <span className='column-settings__section'><FormattedMessage id='home.column_settings.basic' defaultMessage='Basic' /></span> + + <div className='column-settings__row'> + <SettingToggle settings={settings} settingPath={['conversations']} onChange={onChange} label={<FormattedMessage id='direct.group_by_conversations' defaultMessage='Group by conversation' />} /> + </div> + <span className='column-settings__section'><FormattedMessage id='home.column_settings.advanced' defaultMessage='Advanced' /></span> <div className='column-settings__row'> diff --git a/app/javascript/flavours/glitch/features/direct_timeline/index.js b/app/javascript/flavours/glitch/features/direct_timeline/index.js index 7741c6922..75ca19d17 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/index.js +++ b/app/javascript/flavours/glitch/features/direct_timeline/index.js @@ -10,7 +10,6 @@ import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/col import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ColumnSettingsContainer from './containers/column_settings_container'; import { connectDirectStream } from 'flavours/glitch/actions/streaming'; -import { changeSetting } from 'flavours/glitch/actions/settings'; import ConversationsListContainer from './containers/conversations_list_container'; const messages = defineMessages({ @@ -99,14 +98,6 @@ class DirectTimeline extends React.PureComponent { this.props.dispatch(expandConversations({ maxId })); } - handleTimelineClick = () => { - this.props.dispatch(changeSetting(['direct', 'conversations'], false)); - } - - handleConversationsClick = () => { - this.props.dispatch(changeSetting(['direct', 'conversations'], true)); - } - render () { const { intl, hasUnread, columnId, multiColumn, conversationsMode } = this.props; const pinned = !!columnId; @@ -119,6 +110,7 @@ class DirectTimeline extends React.PureComponent { scrollKey={`direct_timeline-${columnId}`} timelineId='direct' onLoadMore={this.handleLoadMore} + prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>} emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here." />} /> ); @@ -129,6 +121,7 @@ class DirectTimeline extends React.PureComponent { scrollKey={`direct_timeline-${columnId}`} timelineId='direct' onLoadMore={this.handleLoadMoreTimeline} + prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>} emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here." />} /> ); @@ -149,27 +142,6 @@ class DirectTimeline extends React.PureComponent { <ColumnSettingsContainer /> </ColumnHeader> - <div className='notification__filter-bar'> - <button - className={conversationsMode ? 'active' : ''} - onClick={this.handleConversationsClick} - > - <FormattedMessage - id='direct.conversations_mode' - defaultMessage='Conversations' - /> - </button> - <button - className={conversationsMode ? '' : 'active'} - onClick={this.handleTimelineClick} - > - <FormattedMessage - id='direct.timeline_mode' - defaultMessage='Timeline' - /> - </button> - </div> - {contents} </Column> ); diff --git a/app/javascript/flavours/glitch/features/directory/components/account_card.js b/app/javascript/flavours/glitch/features/directory/components/account_card.js index c9ef5850c..6c554336c 100644 --- a/app/javascript/flavours/glitch/features/directory/components/account_card.js +++ b/app/javascript/flavours/glitch/features/directory/components/account_card.js @@ -191,7 +191,7 @@ class AccountCard extends ImmutablePureComponent { <div className='account-card__counters__item'> <ShortNumber value={account.get('statuses_count')} /> <small> - <FormattedMessage id='account.posts' defaultMessage='Toots' /> + <FormattedMessage id='account.posts' defaultMessage='Posts' /> </small> </div> diff --git a/app/javascript/flavours/glitch/features/favourited_statuses/index.js b/app/javascript/flavours/glitch/features/favourited_statuses/index.js index c6470ba74..4df3aaa64 100644 --- a/app/javascript/flavours/glitch/features/favourited_statuses/index.js +++ b/app/javascript/flavours/glitch/features/favourited_statuses/index.js @@ -70,7 +70,7 @@ class Favourites extends ImmutablePureComponent { const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props; const pinned = !!columnId; - const emptyMessage = <FormattedMessage id='empty_column.favourited_statuses' defaultMessage="You don't have any favourite toots yet. When you favourite one, it will show up here." />; + const emptyMessage = <FormattedMessage id='empty_column.favourited_statuses' defaultMessage="You don't have any favourite posts yet. When you favourite one, it will show up here." />; return ( <Column bindToDocument={!multiColumn} ref={this.setRef} name='favourites' label={intl.formatMessage(messages.heading)}> diff --git a/app/javascript/flavours/glitch/features/favourites/index.js b/app/javascript/flavours/glitch/features/favourites/index.js index bd6f782ce..a51562e71 100644 --- a/app/javascript/flavours/glitch/features/favourites/index.js +++ b/app/javascript/flavours/glitch/features/favourites/index.js @@ -68,7 +68,7 @@ class Favourites extends ImmutablePureComponent { ); } - const emptyMessage = <FormattedMessage id='empty_column.favourites' defaultMessage='No one has favourited this toot yet. When someone does, they will show up here.' />; + const emptyMessage = <FormattedMessage id='empty_column.favourites' defaultMessage='No one has favourited this post yet. When someone does, they will show up here.' />; return ( <Column ref={this.setRef}> diff --git a/app/javascript/flavours/glitch/features/getting_started_misc/index.js b/app/javascript/flavours/glitch/features/getting_started_misc/index.js index 570fe78bf..de354d6b1 100644 --- a/app/javascript/flavours/glitch/features/getting_started_misc/index.js +++ b/app/javascript/flavours/glitch/features/getting_started_misc/index.js @@ -18,7 +18,7 @@ const messages = defineMessages({ mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, show_me_around: { id: 'getting_started.onboarding', defaultMessage: 'Show me around' }, - pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' }, + pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' }, info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' }, featured_users: { id: 'navigation_bar.featured_users', defaultMessage: 'Featured users' }, diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js index abc3f468f..481f76763 100644 --- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js @@ -103,7 +103,7 @@ class KeyboardShortcuts extends ImmutablePureComponent { </tr> <tr> <td><kbd>alt</kbd>+<kbd>n</kbd></td> - <td><FormattedMessage id='keyboard_shortcuts.toot' defaultMessage='to start a brand new toot' /></td> + <td><FormattedMessage id='keyboard_shortcuts.toot' defaultMessage='to start a brand new post' /></td> </tr> <tr> <td><kbd>alt</kbd>+<kbd>x</kbd></td> diff --git a/app/javascript/flavours/glitch/features/notifications/components/column_settings.js b/app/javascript/flavours/glitch/features/notifications/components/column_settings.js index 0dad079ad..0be2a7e13 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/column_settings.js +++ b/app/javascript/flavours/glitch/features/notifications/components/column_settings.js @@ -146,7 +146,7 @@ export default class ColumnSettings extends React.PureComponent { </div> <div role='group' aria-labelledby='notifications-status'> - <span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.status' defaultMessage='New toots:' /></span> + <span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.status' defaultMessage='New posts:' /></span> <div className='column-settings__pillbar'> <PillBarButton disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'status']} onChange={onChange} label={alertStr} /> diff --git a/app/javascript/flavours/glitch/features/pinned_statuses/index.js b/app/javascript/flavours/glitch/features/pinned_statuses/index.js index 34d8e465f..518d0294b 100644 --- a/app/javascript/flavours/glitch/features/pinned_statuses/index.js +++ b/app/javascript/flavours/glitch/features/pinned_statuses/index.js @@ -10,7 +10,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - heading: { id: 'column.pins', defaultMessage: 'Pinned toot' }, + heading: { id: 'column.pins', defaultMessage: 'Pinned post' }, }); const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/reblogs/index.js b/app/javascript/flavours/glitch/features/reblogs/index.js index d88916d19..ed646c6ed 100644 --- a/app/javascript/flavours/glitch/features/reblogs/index.js +++ b/app/javascript/flavours/glitch/features/reblogs/index.js @@ -68,7 +68,7 @@ class Reblogs extends ImmutablePureComponent { ); } - const emptyMessage = <FormattedMessage id='status.reblogs.empty' defaultMessage='No one has boosted this toot yet. When someone does, they will show up here.' />; + const emptyMessage = <FormattedMessage id='status.reblogs.empty' defaultMessage='No one has boosted this post yet. When someone does, they will show up here.' />; return ( <Column ref={this.setRef}> diff --git a/app/javascript/flavours/glitch/features/ui/components/boost_modal.js b/app/javascript/flavours/glitch/features/ui/components/boost_modal.js index c23aec5ee..8d9496bb9 100644 --- a/app/javascript/flavours/glitch/features/ui/components/boost_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/boost_modal.js @@ -14,14 +14,11 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import PrivacyDropdown from 'flavours/glitch/features/compose/components/privacy_dropdown'; import classNames from 'classnames'; import { changeBoostPrivacy } from 'flavours/glitch/actions/boosts'; +import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; const messages = defineMessages({ cancel_reblog: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' }, reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, - public_short: { id: 'privacy.public.short', defaultMessage: 'Public' }, - unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' }, - private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' }, - direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' }, }); const mapStateToProps = state => { @@ -85,15 +82,6 @@ class BoostModal extends ImmutablePureComponent { const { status, missingMediaDescription, privacy, intl } = this.props; const buttonText = status.get('reblogged') ? messages.cancel_reblog : messages.reblog; - const visibilityIconInfo = { - 'public': { icon: 'globe', text: intl.formatMessage(messages.public_short) }, - 'unlisted': { icon: 'unlock', text: intl.formatMessage(messages.unlisted_short) }, - 'private': { icon: 'lock', text: intl.formatMessage(messages.private_short) }, - 'direct': { icon: 'envelope', text: intl.formatMessage(messages.direct_short) }, - }; - - const visibilityIcon = visibilityIconInfo[status.get('visibility')]; - return ( <div className='modal-root__modal boost-modal'> <div className='boost-modal__container'> @@ -101,7 +89,7 @@ class BoostModal extends ImmutablePureComponent { <div className='boost-modal__status-header'> <div className='boost-modal__status-time'> <a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener noreferrer'> - <span className='status__visibility-icon'><Icon id={visibilityIcon.icon} title={visibilityIcon.text} /></span> + <VisibilityIcon visibility={status.get('visibility')} /> <RelativeTimestamp timestamp={status.get('created_at')} /></a> </div> diff --git a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js index 9b7f9d1fb..4d02be29b 100644 --- a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js @@ -11,13 +11,10 @@ import AttachmentList from 'flavours/glitch/components/attachment_list'; import Icon from 'flavours/glitch/components/icon'; import ImmutablePureComponent from 'react-immutable-pure-component'; import classNames from 'classnames'; +import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; const messages = defineMessages({ favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, - public_short: { id: 'privacy.public.short', defaultMessage: 'Public' }, - unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' }, - private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' }, - direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' }, }); export default @injectIntl @@ -60,15 +57,6 @@ class FavouriteModal extends ImmutablePureComponent { render () { const { status, intl } = this.props; - const visibilityIconInfo = { - 'public': { icon: 'globe', text: intl.formatMessage(messages.public_short) }, - 'unlisted': { icon: 'unlock', text: intl.formatMessage(messages.unlisted_short) }, - 'private': { icon: 'lock', text: intl.formatMessage(messages.private_short) }, - 'direct': { icon: 'envelope', text: intl.formatMessage(messages.direct_short) }, - }; - - const visibilityIcon = visibilityIconInfo[status.get('visibility')]; - return ( <div className='modal-root__modal favourite-modal'> <div className='favourite-modal__container'> @@ -76,7 +64,7 @@ class FavouriteModal extends ImmutablePureComponent { <div className='favourite-modal__status-header'> <div className='favourite-modal__status-time'> <a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener noreferrer'> - <span className='status__visibility-icon'><Icon id={visibilityIcon.icon} title={visibilityIcon.text} /></span> + <VisibilityIcon visibility={status.get('visibility')} /> <RelativeTimestamp timestamp={status.get('created_at')} /> </a> </div> diff --git a/app/javascript/flavours/glitch/styles/components/columns.scss b/app/javascript/flavours/glitch/styles/components/columns.scss index 512a04376..96e292d8b 100644 --- a/app/javascript/flavours/glitch/styles/components/columns.scss +++ b/app/javascript/flavours/glitch/styles/components/columns.scss @@ -579,7 +579,7 @@ } & > span { - max-width: 400px; + max-width: 500px; } a { diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index 016e31c63..373280fc4 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -1566,7 +1566,7 @@ button.icon-button.active i.fa-retweet { .loading-bar { background-color: $ui-highlight-color; height: 3px; - position: absolute; + position: fixed; top: 0; left: 0; z-index: 9999; |