lbry-desktop/ui/modal/modalUpgrade/view.jsx
infinite-persistence d5e8f2d18c
Fix scrollbar in upgrade modal (#7076)
## Issue
5848 Remove scroll-bar in update prompt

## Changes
- Make scrollbars appear only when necessary.
- Style the scrollbar. Similar to other areas, we skip this for Mac (can't recall why we need to skip).
2021-09-13 11:35:26 -04:00

39 lines
1 KiB
JavaScript

// @flow
import React from 'react';
import { Modal } from 'modal/modal';
import LastReleaseChanges from 'component/lastReleaseChanges';
const IS_MAC = navigator.userAgent.indexOf('Mac OS X') !== -1;
type Props = {
downloadUpgrade: () => void,
skipUpgrade: () => void,
};
class ModalUpgrade extends React.PureComponent<Props> {
render() {
const { downloadUpgrade, skipUpgrade } = this.props;
return (
<Modal
className={IS_MAC ? '' : 'main-wrapper--scrollbar'}
isOpen
contentLabel={__('Upgrade available')}
title={__('LBRY leveled up')}
type="confirm"
confirmButtonLabel={__('Upgrade')}
abortButtonLabel={__('Skip')}
onConfirmed={downloadUpgrade}
onAborted={skipUpgrade}
>
<p>
{__('An updated version of LBRY is now available.')}{' '}
{__('Your version is out of date and may be unreliable or insecure.')}
</p>
<LastReleaseChanges hideReleaseVersion />
</Modal>
);
}
}
export default ModalUpgrade;