mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-13 20:08:56 +00:00
Merge branch 'styled-components-refactor' of https://github.com/satoshilabs/trezor-wallet into styled-components-refactor
This commit is contained in:
commit
0c58820999
3
.babelrc
3
.babelrc
@ -25,7 +25,8 @@
|
||||
"reducers": "./src/js/reducers",
|
||||
"support": "./src/js/support",
|
||||
"utils": "./src/js/utils",
|
||||
"services": "./src/js/services"
|
||||
"services": "./src/js/services",
|
||||
"views": "./src/js/views"
|
||||
}
|
||||
}],
|
||||
"babel-plugin-styled-components"
|
||||
|
@ -11,6 +11,7 @@
|
||||
"reducers/*": ["./src/js/reducers/*"],
|
||||
"utils/*": ["./src/js/utils/*"],
|
||||
"services/*": ["./src/js/services/*"],
|
||||
"views/*": ["./src/js/views/*"],
|
||||
}
|
||||
}
|
||||
}
|
@ -8,14 +8,10 @@ import { FONT_SIZE } from 'config/variables';
|
||||
const Wrapper = styled.div`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
padding: 8px 28px 8px 24px;
|
||||
|
||||
font-size: ${FONT_SIZE.SMALLER};
|
||||
color: ${colors.TEXT_SECONDARY};
|
||||
|
||||
background: ${colors.GRAY_LIGHT};
|
||||
|
||||
border-top: 1px solid ${colors.DIVIDER};
|
||||
border-bottom: 1px solid ${colors.DIVIDER};
|
||||
`;
|
||||
|
@ -6,13 +6,12 @@ import { NavLink } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import type { TrezorDevice } from 'flowtype';
|
||||
import AsideDivider from './AsideDivider';
|
||||
import AsideRowCoin from './row/coin/AsideRowCoin';
|
||||
|
||||
|
||||
import type { Props } from './index';
|
||||
|
||||
|
||||
class CoinSelection extends Component {
|
||||
getBaseUrl() {
|
||||
const { selectedDevice } = this.props.wallet;
|
||||
|
@ -1,12 +1,11 @@
|
||||
import styled, { css } from 'styled-components';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
import AsideRow from '../AsideRow';
|
||||
|
||||
import colors from 'config/colors';
|
||||
import { FONT_SIZE, BORDER_WIDTH } from 'config/variables';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
|
||||
import AsideRow from '../AsideRow';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
height: 64px;
|
||||
@ -34,7 +33,9 @@ const Wrapper = styled.div`
|
||||
`}
|
||||
`;
|
||||
|
||||
const AsideRowAccount = ({ accountIndex, balance, url, isSelected = false }) => (
|
||||
const AsideRowAccount = ({
|
||||
accountIndex, balance, url, isSelected = false,
|
||||
}) => (
|
||||
<NavLink to={url}>
|
||||
<Wrapper
|
||||
to={url}
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
|
||||
import * as React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Route, withRouter } from 'react-router-dom';
|
||||
@ -16,7 +15,6 @@ import ModalContainer from '../modal';
|
||||
import Notifications from '../common/Notification';
|
||||
import Log from '../common/Log';
|
||||
|
||||
|
||||
type WalletContainerProps = {
|
||||
wallet: $ElementType<State, 'wallet'>,
|
||||
children?: React.Node
|
||||
|
@ -6,11 +6,11 @@ export const FONT_SIZE = {
|
||||
|
||||
export const TRANSITION_TIME = {
|
||||
BASE: '0.3s',
|
||||
}
|
||||
};
|
||||
|
||||
export const ICON_SIZE = {
|
||||
BASE: '20px',
|
||||
}
|
||||
};
|
||||
|
||||
export const BORDER_WIDTH = {
|
||||
SELECTED: '3px',
|
||||
|
@ -4,7 +4,7 @@ import { render } from 'react-dom';
|
||||
import baseStyles from 'support/BaseStyles';
|
||||
import { onBeforeUnload } from 'actions/WalletActions';
|
||||
import 'styles/index.less';
|
||||
import App from './router';
|
||||
import App from 'views/index';
|
||||
import store from './store';
|
||||
|
||||
const root: ?HTMLElement = document.getElementById('root');
|
||||
|
0
src/js/views/Device/index.js
Normal file
0
src/js/views/Device/index.js
Normal file
@ -1,14 +1,12 @@
|
||||
/* @flow */
|
||||
|
||||
|
||||
import React from 'react';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
||||
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||||
import type { State, Dispatch } from 'flowtype';
|
||||
import LandingPage from './LandingPage';
|
||||
import LandingPage from './index';
|
||||
|
||||
export type StateProps = {
|
||||
localStorage: $ElementType<State, 'localStorage'>,
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
import React from 'react';
|
||||
import Loader from '../common/LoaderCircle';
|
||||
import Loader from 'components/common/LoaderCircle';
|
||||
|
||||
export default (props: {}): React$Element<string> => (
|
||||
<section className="landing">
|
@ -1,17 +1,17 @@
|
||||
/* @flow */
|
||||
|
||||
|
||||
import React from 'react';
|
||||
import { H2 } from 'components/common/Heading';
|
||||
import Preloader from './Preloader';
|
||||
import ConnectDevice from './ConnectDevice';
|
||||
import InstallBridge from './InstallBridge';
|
||||
import LocalStorageError from './LocalStorageError';
|
||||
import TrezorConnectError from './TrezorConnectError';
|
||||
import Header from '../common/Header';
|
||||
import Footer from '../common/Footer';
|
||||
import Log from '../common/Log';
|
||||
import Notifications, { Notification } from '../common/Notification';
|
||||
import Header from 'components/common/Header';
|
||||
import Footer from 'components/common/Footer';
|
||||
import Log from 'components/common/Log';
|
||||
import Notifications, { Notification } from 'components/common/Notification';
|
||||
|
||||
import Preloader from './components/Preloader';
|
||||
import ConnectDevice from './components/ConnectDevice';
|
||||
import InstallBridge from './components/InstallBridge';
|
||||
import LocalStorageError from './components/LocalStorageError';
|
||||
import TrezorConnectError from './components/TrezorConnectError';
|
||||
|
||||
import type { Props } from './index';
|
||||
|
0
src/js/views/Settings/index.js
Normal file
0
src/js/views/Settings/index.js
Normal file
@ -6,7 +6,6 @@ import { ConnectedRouter } from 'react-router-redux';
|
||||
|
||||
import ErrorBoundary from 'support/ErrorBoundary';
|
||||
|
||||
import LandingPageContainer from 'components/landing';
|
||||
import WalletContainer from 'components/wallet';
|
||||
import BootloaderContainer from 'components/wallet/pages/Bootloader';
|
||||
import InitializeContainer from 'components/wallet/pages/Initialize';
|
||||
@ -20,15 +19,16 @@ import ReceiveContainer from 'components/wallet/account/receive';
|
||||
import SignVerifyContainer from 'components/wallet/account/sign/SignVerify';
|
||||
import DeviceSettingsContainer from 'components/wallet/pages/DeviceSettings';
|
||||
import WalletSettingsContainer from 'components/wallet/pages/WalletSettings';
|
||||
import LandingContainer from 'views/Landing/Container';
|
||||
import store, { history } from '../store';
|
||||
|
||||
const App = () => (
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Switch>
|
||||
<Route exact path="/" component={LandingPageContainer} />
|
||||
<Route exact path="/bridge" component={LandingPageContainer} />
|
||||
<Route exact path="/import" component={LandingPageContainer} />
|
||||
<Route exact path="/" component={LandingContainer} />
|
||||
<Route exact path="/bridge" component={LandingContainer} />
|
||||
<Route exact path="/import" component={LandingContainer} />
|
||||
<Route>
|
||||
<WalletContainer>
|
||||
<ErrorBoundary>
|
Loading…
Reference in New Issue
Block a user