mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-09 18:45:38 +00:00
bf6a122e38
* Initial changes to define theme maps, color function, and convert all global styles. * More global styles. * All styles converted, colors uncertain. * Fix tabs, temporary theme toggle button. * Color refinements * Color network selector, introduce shade function * Make palette page * Add theme button and minor styling to nav * Blueify dark theme * A bunch of color adjustments to work better with dark theme * Fix tables * Fix wallet decrypt colors * More misc fixes * Fix up electron colors * Convert web theme to redux state / action * Theme toggle in app, prevent rerenders * Get rid of all variables, fix selects * Fix conf modal, modal close styles * Fix test * Adjust swap colors * Check in breaking out component, changing icons * Check in progress * Theme toggle in footer. New icons * Prevent rerender on theme change * Fix up outstanding merge conflicts * Fix generate colors to be dark mode friendly * Reduce swap color intensity * Make disabled buttons darker in dark mode * Reduce button size by 25%
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import React from 'react';
|
|
import translate from 'translations';
|
|
import { Modal, NewTabLink } from 'components/ui';
|
|
import { isLegacyUser, isBetaUser } from 'utils/localStorage';
|
|
import Logo from 'assets/images/logo-mycrypto-transparent.svg';
|
|
import './WelcomeModal.scss';
|
|
|
|
const LS_KEY = 'acknowledged-welcome';
|
|
|
|
interface State {
|
|
isOpen: boolean;
|
|
}
|
|
|
|
export default class WelcomeModal extends React.PureComponent<{}, State> {
|
|
public state: State = {
|
|
isOpen: false
|
|
};
|
|
|
|
public componentDidMount() {
|
|
if (isLegacyUser() && !localStorage.getItem(LS_KEY)) {
|
|
this.setState({ isOpen: true });
|
|
}
|
|
}
|
|
|
|
public render() {
|
|
return (
|
|
<Modal isOpen={this.state.isOpen} handleClose={this.close} maxWidth={660}>
|
|
<div className="WelcomeModal">
|
|
<img className="WelcomeModal-logo" src={Logo} />
|
|
{isBetaUser() && (
|
|
<p className="WelcomeModal-beta alert alert-success">
|
|
💖 {translate('WELCOME_MODAL_BETA')} 🚀
|
|
</p>
|
|
)}
|
|
<p>{translate('WELCOME_MODAL_INTRO')}</p>
|
|
<ul>
|
|
<li>{translate('WELCOME_MODAL_FEATURE_1')}</li>
|
|
<li>{translate('WELCOME_MODAL_FEATURE_2')}</li>
|
|
<li>{translate('WELCOME_MODAL_FEATURE_3')}</li>
|
|
<li>{translate('WELCOME_MODAL_FEATURE_4')}</li>
|
|
<li>
|
|
<NewTabLink href="https://download.mycrypto.com/">
|
|
{translate('WELCOME_MODAL_FEATURE_5')}
|
|
</NewTabLink>
|
|
</li>
|
|
<li>{translate('WELCOME_MODAL_FEATURE_MORE')}</li>
|
|
</ul>
|
|
<p>{translate('WELCOME_MODAL_LINKS')}</p>
|
|
|
|
<button className="WelcomeModal-continue btn btn-lg btn-primary" onClick={this.close}>
|
|
{translate('WELCOME_MODAL_CONTINUE')}
|
|
</button>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
private close = () => {
|
|
this.setState({ isOpen: false });
|
|
localStorage.setItem(LS_KEY, 'true');
|
|
};
|
|
}
|