Add link to remote sign in page
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5bdb406b93
commit
e82c67726e
3 changed files with 14 additions and 5 deletions
|
@ -18,8 +18,6 @@ import type { List as ImmutableList } from 'immutable';
|
|||
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
||||
|
||||
const messages = defineMessages({
|
||||
followers: { id: 'account.followers', defaultMessage: 'Followers' },
|
||||
follows: { id: 'account.follows', defaultMessage: 'Following' },
|
||||
profile: { id: 'account.profile', defaultMessage: 'Profile' },
|
||||
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
|
||||
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocks' },
|
||||
|
@ -28,17 +26,15 @@ const messages = defineMessages({
|
|||
filters: { id: 'navigation_bar.filters', defaultMessage: 'Filters' },
|
||||
followedTags: { id: 'navigation_bar.followed_tags', defaultMessage: 'Followed hashtags' },
|
||||
soapboxConfig: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' },
|
||||
accountMigration: { id: 'navigation_bar.account_migration', defaultMessage: 'Move account' },
|
||||
accountAliases: { id: 'navigation_bar.account_aliases', defaultMessage: 'Account aliases' },
|
||||
logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
|
||||
bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' },
|
||||
lists: { id: 'column.lists', defaultMessage: 'Lists' },
|
||||
groups: { id: 'column.groups', defaultMessage: 'Groups' },
|
||||
events: { id: 'column.events', defaultMessage: 'Events' },
|
||||
invites: { id: 'navigation_bar.invites', defaultMessage: 'Invites' },
|
||||
developers: { id: 'navigation.developers', defaultMessage: 'Developers' },
|
||||
drafts: { id: 'navigation.drafts', defaultMessage: 'Drafts' },
|
||||
addAccount: { id: 'profile_dropdown.add_account', defaultMessage: 'Add an existing account' },
|
||||
addRemoteAccount: { id: 'profile_dropdown.add_remote_account', defaultMessage: 'Add account from remote instance' },
|
||||
followRequests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
});
|
||||
|
@ -367,6 +363,11 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
|||
<Icon className='h-4 w-4 text-primary-500' src={require('@tabler/icons/outline/plus.svg')} />
|
||||
<Text size='sm' weight='medium'>{intl.formatMessage(messages.addAccount)}</Text>
|
||||
</NavLink>
|
||||
|
||||
<NavLink className='flex items-center space-x-1 py-2' to='/login/external' onClick={handleClose}>
|
||||
<Icon className='h-4 w-4 text-primary-500' src={require('@tabler/icons/outline/external-link.svg')} />
|
||||
<Text size='sm' weight='medium'>{intl.formatMessage(messages.addRemoteAccount)}</Text>
|
||||
</NavLink>
|
||||
</div>
|
||||
)}
|
||||
</Stack>
|
||||
|
|
|
@ -17,6 +17,7 @@ import type { Account as AccountEntity } from 'soapbox/types/entities';
|
|||
|
||||
const messages = defineMessages({
|
||||
add: { id: 'profile_dropdown.add_account', defaultMessage: 'Add an existing account' },
|
||||
addRemoteAccount: { id: 'profile_dropdown.add_remote_account', defaultMessage: 'Add account from remote instance' },
|
||||
theme: { id: 'profile_dropdown.theme', defaultMessage: 'Theme' },
|
||||
logout: { id: 'profile_dropdown.logout', defaultMessage: 'Log out @{acct}' },
|
||||
});
|
||||
|
@ -90,6 +91,12 @@ const ProfileDropdown: React.FC<IProfileDropdown> = ({ account, children }) => {
|
|||
icon: require('@tabler/icons/outline/plus.svg'),
|
||||
});
|
||||
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.addRemoteAccount),
|
||||
to: '/login/external',
|
||||
icon: require('@tabler/icons/outline/external-link.svg'),
|
||||
});
|
||||
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.logout, { acct: account.acct }),
|
||||
to: '/logout',
|
||||
|
|
|
@ -1182,6 +1182,7 @@
|
|||
"privacy.unlisted.long": "Do not post to public timelines",
|
||||
"privacy.unlisted.short": "Unlisted",
|
||||
"profile_dropdown.add_account": "Add an existing account",
|
||||
"profile_dropdown.add_remote_account": "Add account from remote instance",
|
||||
"profile_dropdown.logout": "Log out @{acct}",
|
||||
"profile_dropdown.switch_account": "Switch accounts",
|
||||
"profile_dropdown.theme": "Theme",
|
||||
|
|
Loading…
Reference in a new issue