mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-05 15:53:26 +00:00
aa0f9cd455
* Frameless Electron. Separate electron template. Generecize navigation link. Move nav info to config. * Add controls for language and node, network status to sidebar. * Sticky headers * Move custom node modal into standalone component. Render modals via portal. Add custom node modal opening to electron node list. * Conditional styling based on environment. * Fix active node highlight * Add frame back in, draggable only on OSX, fix sidebar scroll. * Remove panel content after delay. * Adjust window sizes * Style desktop help nav icon * Remove unused var * Move style to param * Remove unused * Update snapshot * Fix oversized stretching, zindex fighting * Make electron work better with various screen sizes * Remove not-working https option for electron * Add beta banner * Fix web footer * Address changes
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import React, { Component } from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { AppState } from 'reducers';
|
|
import Notifications from './Notifications';
|
|
import OfflineTab from './OfflineTab';
|
|
import { getOffline } from 'selectors/config';
|
|
import { ElectronNav } from 'components';
|
|
import './ElectronTemplate.scss';
|
|
|
|
interface StateProps {
|
|
isOffline: AppState['config']['meta']['offline'];
|
|
}
|
|
|
|
interface OwnProps {
|
|
isUnavailableOffline?: boolean;
|
|
children: string | React.ReactElement<string> | React.ReactElement<string>[];
|
|
}
|
|
|
|
type Props = OwnProps & StateProps;
|
|
|
|
class ElectronTemplate extends Component<Props, {}> {
|
|
public render() {
|
|
const { isUnavailableOffline, children, isOffline } = this.props;
|
|
|
|
return (
|
|
<div className="ElectronTemplate">
|
|
<div className="ElectronTemplate-sidebar">
|
|
<ElectronNav />
|
|
</div>
|
|
<div className="ElectronTemplate-content">
|
|
<div className="Tab ElectronTemplate-content-tab">
|
|
{isUnavailableOffline && isOffline ? <OfflineTab /> : children}
|
|
</div>
|
|
<Notifications />
|
|
</div>
|
|
<div className="ElectronTemplate-draggable" />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
function mapStateToProps(state: AppState): StateProps {
|
|
return {
|
|
isOffline: getOffline(state)
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, {})(ElectronTemplate);
|