mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
371e6e327c
* Reorganize files to better match other components. * Initial UI for wallet buttons. * Fix leftover rebase conflict. * Wallet selection, styling, mobile handling. * Initial work on animations. * Adjusted animations. * Adjust wallet unlock forms to be more uniform. Fix view address saying 'unlock' * Adjust tooltips. * Fix embedded decrypt components. * Cover whole sign msg form with decrypt. * Give deploy contract a better unlock treatment like sign msg. * Reset decrypt component on hide / show * Unused var * Fix tooltip hover. * Fix hover lift. * Make spacing better on mobile. * Back button mobile handling. * Redesign mobile button icons. Prevent clicking through when clicking on icons. * TSCheck fixes. * Attempt to unlock MetaMask onClick, and provide existing flow with notification when unlock fails. * Get rid of outline. * Remove decrypt min height. Make view only textarea. * Add change wallet buttons to deploy contract and sign msg. * Standardize
37 lines
971 B
TypeScript
37 lines
971 B
TypeScript
import { UnlockHeader } from 'components/ui';
|
|
import React, { Component } from 'react';
|
|
import translate from 'translations';
|
|
import { isAnyOffline } from 'selectors/config';
|
|
import { connect } from 'react-redux';
|
|
import { AppState } from 'reducers';
|
|
|
|
interface Props {
|
|
disabledWallets?: string[];
|
|
}
|
|
export const OfflineAwareUnlockHeader: React.SFC<Props> = ({ disabledWallets }) => (
|
|
<UnlockHeader title={<Title />} disabledWallets={disabledWallets} />
|
|
);
|
|
|
|
interface StateProps {
|
|
shouldDisplayOffline: boolean;
|
|
}
|
|
|
|
class TitleClass extends Component<StateProps> {
|
|
public render() {
|
|
const { shouldDisplayOffline } = this.props;
|
|
const offlineTitle = shouldDisplayOffline ? (
|
|
<span style={{ color: 'red' }}> (Offline)</span>
|
|
) : null;
|
|
return (
|
|
<div>
|
|
{translate('Account')}
|
|
{offlineTitle}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
const Title = connect((state: AppState) => ({
|
|
shouldDisplayOffline: isAnyOffline(state)
|
|
}))(TitleClass);
|