Condense menu (#818)
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "^5.9.1",
|
||||
"@polkadot/api": "^5.9.2-2",
|
||||
"@polkadot/extension-dapp": "^0.39.4-12",
|
||||
"@polkadot/extension-inject": "^0.39.4-12",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/phishing": "^0.6.289",
|
||||
"@polkadot/ui-keyring": "^0.85.4-2"
|
||||
"@polkadot/phishing": "^0.6.290",
|
||||
"@polkadot/ui-keyring": "^0.85.4-3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
"@polkadot/hw-ledger": "^7.3.1",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/networks": "^7.3.1",
|
||||
"@polkadot/react-identicon": "^0.85.4-2",
|
||||
"@polkadot/react-qr": "^0.85.4-2",
|
||||
"@polkadot/react-identicon": "^0.85.4-3",
|
||||
"@polkadot/react-qr": "^0.85.4-3",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"file-saver": "^2.0.5",
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Props extends ThemeProps {
|
||||
|
||||
function MenuItem ({ children, className = '', title }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={`${className}${title ? ' isTitled' : ''}`}>
|
||||
{title && (
|
||||
<div className='itemTitle'>{title}</div>
|
||||
)}
|
||||
@@ -30,13 +30,17 @@ export default styled(MenuItem)(({ theme }: ThemeProps) => `
|
||||
max-width: 100%;
|
||||
|
||||
> .itemTitle {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: ${theme.inputLabelFontSize};
|
||||
line-height: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: ${theme.textColor};
|
||||
opacity: 0.65;
|
||||
}
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: ${theme.inputLabelFontSize};
|
||||
line-height: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: ${theme.textColor};
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
&+&.isTitled {
|
||||
margin-top: 16px;
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -102,28 +102,6 @@ function MenuSettings ({ className, reference }: Props): React.ReactElement<Prop
|
||||
uncheckedLabel={t<string>('Light')}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem className='setting'>
|
||||
<ActionText
|
||||
className='manageWebsiteAccess'
|
||||
icon={faTasks}
|
||||
onClick={_goToAuthList}
|
||||
text={t<string>('Manage Website Access')}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
className='setting'
|
||||
title={t<string>('External accounts and Access')}
|
||||
>
|
||||
<Checkbox
|
||||
checked={camera}
|
||||
className='checkbox camera'
|
||||
label={t<string>('Allow QR Camera Access')}
|
||||
onChange={setCamera}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
className='setting'
|
||||
title={t<string>('Display address format for')}
|
||||
@@ -136,7 +114,6 @@ function MenuSettings ({ className, reference }: Props): React.ReactElement<Prop
|
||||
value={`${prefix}`}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
className='setting'
|
||||
title={t<string>('Language')}
|
||||
@@ -149,7 +126,6 @@ function MenuSettings ({ className, reference }: Props): React.ReactElement<Prop
|
||||
value={settings.i18nLang}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
className='setting'
|
||||
title={t<string>('Notifications')}
|
||||
@@ -162,18 +138,35 @@ function MenuSettings ({ className, reference }: Props): React.ReactElement<Prop
|
||||
value={notification}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
className='setting'
|
||||
title={t<string>('External accounts and Access')}
|
||||
>
|
||||
<Checkbox
|
||||
checked={camera}
|
||||
className='checkbox camera'
|
||||
label={t<string>('Allow QR Camera Access')}
|
||||
onChange={setCamera}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuDivider />
|
||||
<MenuItem className='setting'>
|
||||
<ActionText
|
||||
className='manageWebsiteAccess'
|
||||
icon={faTasks}
|
||||
onClick={_goToAuthList}
|
||||
text={t<string>('Manage Website Access')}
|
||||
/>
|
||||
</MenuItem>
|
||||
{isPopup && (
|
||||
<>
|
||||
<MenuDivider />
|
||||
<MenuItem className='setting'>
|
||||
<ActionText
|
||||
className='openWindow'
|
||||
icon={faExpand}
|
||||
onClick={_onWindowOpen}
|
||||
text={t<string>('Open extension in new window')}
|
||||
/>
|
||||
</MenuItem>
|
||||
</>
|
||||
<MenuItem className='setting'>
|
||||
<ActionText
|
||||
className='openWindow'
|
||||
icon={faExpand}
|
||||
onClick={_onWindowOpen}
|
||||
text={t<string>('Open extension in new window')}
|
||||
/>
|
||||
</MenuItem>
|
||||
)}
|
||||
</Menu>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user