diff --git a/app/soapbox/__fixtures__/intlMessages.json b/app/soapbox/__fixtures__/intlMessages.json index 4c32e4179..82a489909 100644 --- a/app/soapbox/__fixtures__/intlMessages.json +++ b/app/soapbox/__fixtures__/intlMessages.json @@ -52,11 +52,11 @@ "audio.play": "Play", "audio.unmute": "Unmute", "boost_modal.combo": "You can press {combo} to skip this next time", - "bundle_column_error.body": "Something went wrong while loading this component.", + "bundle_column_error.body": "Something went wrong while loading this page.", "bundle_column_error.retry": "Try again", "bundle_column_error.title": "Network error", "bundle_modal_error.close": "Close", - "bundle_modal_error.message": "Something went wrong while loading this component.", + "bundle_modal_error.message": "Something went wrong while loading this page.", "bundle_modal_error.retry": "Try again", "column.blocks": "Blocked users", "column.community": "Local timeline", @@ -254,7 +254,7 @@ "login.fields.username_placeholder": "Username", "login.log_in": "Log in", "login.reset_password_hint": "Trouble logging in?", - "media_gallery.toggle_visible": "Toggle visibility", + "media_gallery.toggle_visible": "Hide", "missing_indicator.label": "Not found", "missing_indicator.sublabel": "This resource could not be found", "morefollows.followers_label": "…and {count} more {count, plural, one {follower} other {followers}} on remote sites.", @@ -530,11 +530,11 @@ "audio.play": "Play", "audio.unmute": "Unmute", "boost_modal.combo": "You can press {combo} to skip this next time", - "bundle_column_error.body": "Something went wrong while loading this component.", + "bundle_column_error.body": "Something went wrong while loading this page.", "bundle_column_error.retry": "Try again", "bundle_column_error.title": "Network error", "bundle_modal_error.close": "Close", - "bundle_modal_error.message": "Something went wrong while loading this component.", + "bundle_modal_error.message": "Something went wrong while loading this page.", "bundle_modal_error.retry": "Try again", "column.blocks": "Blocked users", "column.community": "Local timeline", @@ -732,7 +732,7 @@ "login.fields.username_placeholder": "Username", "login.log_in": "Log in", "login.reset_password_hint": "Trouble logging in?", - "media_gallery.toggle_visible": "Toggle visibility", + "media_gallery.toggle_visible": "Hide", "missing_indicator.label": "Not found", "missing_indicator.sublabel": "This resource could not be found", "morefollows.followers_label": "…and {count} more {count, plural, one {follower} other {followers}} on remote sites.", diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index af2a35797..d4782d3b1 100644 --- a/app/soapbox/components/media_gallery.js +++ b/app/soapbox/components/media_gallery.js @@ -22,7 +22,7 @@ const ATTACHMENT_LIMIT = 4; const MAX_FILENAME_LENGTH = 45; const messages = defineMessages({ - toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' }, + toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Hide' }, }); const mapStateToItemProps = state => ({ diff --git a/app/soapbox/components/sidebar_menu.tsx b/app/soapbox/components/sidebar_menu.tsx index ad9471e41..3a184661a 100644 --- a/app/soapbox/components/sidebar_menu.tsx +++ b/app/soapbox/components/sidebar_menu.tsx @@ -37,6 +37,7 @@ const messages = defineMessages({ lists: { id: 'column.lists', defaultMessage: 'Lists' }, invites: { id: 'navigation_bar.invites', defaultMessage: 'Invites' }, developers: { id: 'navigation.developers', defaultMessage: 'Developers' }, + addAccount: { id: 'profile_dropdown.add_account', defaultMessage: 'Add an existing account' }, }); interface ISidebarLink { @@ -87,28 +88,29 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { onClose(); }; - const handleSwitchAccount = (account: AccountEntity): React.EventHandler => { + const handleSwitchAccount = (account: AccountEntity): React.MouseEventHandler => { return (e) => { e.preventDefault(); - switchAccount(account); dispatch(switchAccount(account.id)); }; }; - const onClickLogOut: React.EventHandler = (e) => { + const onClickLogOut: React.MouseEventHandler = (e) => { e.preventDefault(); dispatch(logOut(intl)); }; - const handleSwitcherClick: React.EventHandler = (e) => { + const handleSwitcherClick: React.MouseEventHandler = (e) => { e.preventDefault(); setSwitcher((prevState) => (!prevState)); }; const renderAccount = (account: AccountEntity) => ( - - + +
+ +
); @@ -163,26 +165,31 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { - {/* TODO: make this available to everyone */} - {account.staff && ( - - + + + - {switcher && ( -
- {otherAccounts.map(account => renderAccount(account))} -
- )} -
- )} + {switcher && ( +
+ {otherAccounts.map(account => renderAccount(account))} + + + + {intl.formatMessage(messages.addAccount)} + +
+ )} +
{features.media && } + {features.polls && } {features.privacyScopes && } {features.scheduledStatuses && } {features.spoilers && } {features.richText && } -
diff --git a/app/soapbox/features/developers/developers_menu.tsx b/app/soapbox/features/developers/developers_menu.tsx index 545c0a998..139774d53 100644 --- a/app/soapbox/features/developers/developers_menu.tsx +++ b/app/soapbox/features/developers/developers_menu.tsx @@ -63,6 +63,14 @@ const Developers = () => { + + + + + + + +