Only show Switch menu items when more than 1 account
This commit is contained in:
parent
75853cd8e4
commit
c3eb33e230
1 changed files with 25 additions and 21 deletions
|
@ -110,28 +110,32 @@ function Accounts({ onClose }) {
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<MenuItem
|
{moreThanOneAccount && (
|
||||||
disabled={isCurrent}
|
<>
|
||||||
onClick={() => {
|
<MenuItem
|
||||||
setCurrentAccountID(account.info.id);
|
disabled={isCurrent}
|
||||||
location.reload();
|
onClick={() => {
|
||||||
}}
|
setCurrentAccountID(account.info.id);
|
||||||
>
|
location.reload();
|
||||||
<Icon icon="transfer" />{' '}
|
}}
|
||||||
<Trans>Switch to this account</Trans>
|
>
|
||||||
</MenuItem>
|
<Icon icon="transfer" />{' '}
|
||||||
{!isStandalone && !isCurrent && (
|
<Trans>Switch to this account</Trans>
|
||||||
<MenuLink
|
</MenuItem>
|
||||||
href={`./?account=${account.info.id}`}
|
{!isStandalone && !isCurrent && (
|
||||||
target="_blank"
|
<MenuLink
|
||||||
>
|
href={`./?account=${account.info.id}`}
|
||||||
<Icon icon="external" />
|
target="_blank"
|
||||||
<span>
|
>
|
||||||
<Trans>Switch in new tab/window</Trans>
|
<Icon icon="external" />
|
||||||
</span>
|
<span>
|
||||||
</MenuLink>
|
<Trans>Switch in new tab/window</Trans>
|
||||||
|
</span>
|
||||||
|
</MenuLink>
|
||||||
|
)}
|
||||||
|
<MenuDivider />
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<MenuDivider />
|
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
states.showAccount = `${account.info.username}@${account.instanceURL}`;
|
states.showAccount = `${account.info.username}@${account.instanceURL}`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue