mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Revert "Disable Ledger Live toggle for Firefox users (#11169)"
This reverts commit dec34fa4c6
.
This commit is contained in:
parent
7365f87f9e
commit
6e0da428ac
@ -33,8 +33,4 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -47,19 +47,15 @@ const colors = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const ToggleButton = (props) => {
|
const ToggleButton = (props) => {
|
||||||
const { value, onToggle, offLabel, onLabel, disabled } = props;
|
const { value, onToggle, offLabel, onLabel } = props;
|
||||||
|
|
||||||
const modifier = value ? 'on' : 'off';
|
const modifier = value ? 'on' : 'off';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className={classnames('toggle-button', `toggle-button--${modifier}`)}>
|
||||||
className={classnames('toggle-button', `toggle-button--${modifier}`, {
|
|
||||||
'toggle-button--disabled': disabled,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<ReactToggleButton
|
<ReactToggleButton
|
||||||
value={value}
|
value={value}
|
||||||
onToggle={disabled ? undefined : onToggle}
|
onToggle={onToggle}
|
||||||
activeLabel=""
|
activeLabel=""
|
||||||
inactiveLabel=""
|
inactiveLabel=""
|
||||||
trackStyle={value ? trackStyle : offTrackStyle}
|
trackStyle={value ? trackStyle : offTrackStyle}
|
||||||
@ -80,7 +76,6 @@ ToggleButton.propTypes = {
|
|||||||
onToggle: PropTypes.func,
|
onToggle: PropTypes.func,
|
||||||
offLabel: PropTypes.string,
|
offLabel: PropTypes.string,
|
||||||
onLabel: PropTypes.string,
|
onLabel: PropTypes.string,
|
||||||
disabled: PropTypes.bool,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ToggleButton;
|
export default ToggleButton;
|
||||||
|
@ -7,9 +7,6 @@ import TextField from '../../../components/ui/text-field';
|
|||||||
import Button from '../../../components/ui/button';
|
import Button from '../../../components/ui/button';
|
||||||
import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes';
|
import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes';
|
||||||
|
|
||||||
import { getPlatform } from '../../../../app/scripts/lib/util';
|
|
||||||
import { PLATFORM_FIREFOX } from '../../../../shared/constants/app';
|
|
||||||
|
|
||||||
export default class AdvancedTab extends PureComponent {
|
export default class AdvancedTab extends PureComponent {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
t: PropTypes.func,
|
t: PropTypes.func,
|
||||||
@ -408,7 +405,6 @@ export default class AdvancedTab extends PureComponent {
|
|||||||
onToggle={(value) => setLedgerLivePreference(!value)}
|
onToggle={(value) => setLedgerLivePreference(!value)}
|
||||||
offLabel={t('off')}
|
offLabel={t('off')}
|
||||||
onLabel={t('on')}
|
onLabel={t('on')}
|
||||||
disabled={getPlatform() === PLATFORM_FIREFOX}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user