Update Account SubTab Routing / Token Scanner CSS Updates (#1276)
* Redirect user to subtab after logging in * Update token balances styles * Adjust routing for readOnly wallets
This commit is contained in:
parent
56943232a0
commit
4788381641
|
@ -1,4 +1,4 @@
|
||||||
@import "common/sass/variables";
|
@import 'common/sass/variables';
|
||||||
|
|
||||||
.AddCustom {
|
.AddCustom {
|
||||||
&-field {
|
&-field {
|
||||||
|
@ -11,23 +11,20 @@
|
||||||
|
|
||||||
&-buttons {
|
&-buttons {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
&-help {
|
&-help {
|
||||||
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-btn {
|
&-btn {
|
||||||
margin-right: 10px;
|
padding: 0.5rem 1.5rem;
|
||||||
|
margin: 0.25rem 0.5rem;
|
||||||
&.btn-primary {
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.btn-default {
|
|
||||||
width: 110px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,22 +83,22 @@ export default class AddCustomTokenForm extends React.PureComponent<Props, State
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
<HelpLink article={HELP_ARTICLE.ADDING_NEW_TOKENS} className="AddCustom-buttons-help">
|
||||||
|
{translate('Need help? Learn how to add custom tokens.')}
|
||||||
|
</HelpLink>
|
||||||
<div className="AddCustom-buttons">
|
<div className="AddCustom-buttons">
|
||||||
<HelpLink article={HELP_ARTICLE.ADDING_NEW_TOKENS} className="AddCustom-buttons-help">
|
|
||||||
{translate('Need help? Learn how to add custom tokens.')}
|
|
||||||
</HelpLink>
|
|
||||||
<button
|
|
||||||
className="AddCustom-buttons-btn btn btn-primary btn-sm"
|
|
||||||
disabled={!this.isValid()}
|
|
||||||
>
|
|
||||||
{translate('x_Save')}
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
className="AddCustom-buttons-btn btn btn-sm btn-default"
|
className="AddCustom-buttons-btn btn btn-sm btn-default"
|
||||||
onClick={this.props.toggleForm}
|
onClick={this.props.toggleForm}
|
||||||
>
|
>
|
||||||
{translate('x_Cancel')}
|
{translate('x_Cancel')}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className="AddCustom-buttons-btn btn btn-primary btn-sm"
|
||||||
|
disabled={!this.isValid()}
|
||||||
|
>
|
||||||
|
{translate('x_Save')}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import "common/sass/variables";
|
@import 'common/sass/variables';
|
||||||
|
|
||||||
.TokenBalances {
|
.TokenBalances {
|
||||||
&-title {
|
&-title {
|
||||||
|
@ -34,6 +34,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&-buttons {
|
&-buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
& > &-btn {
|
||||||
|
margin: 0.25rem 0.5rem;
|
||||||
|
}
|
||||||
&-help {
|
&-help {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { UnlockHeader } from 'components/ui';
|
||||||
import { SideBar } from './components/index';
|
import { SideBar } from './components/index';
|
||||||
import { getWalletInst } from 'selectors/wallet';
|
import { getWalletInst } from 'selectors/wallet';
|
||||||
import { AppState } from 'reducers';
|
import { AppState } from 'reducers';
|
||||||
import { RouteComponentProps, Route, Switch } from 'react-router';
|
import { RouteComponentProps, Route, Switch, Redirect } from 'react-router';
|
||||||
import { RedirectWithQuery } from 'components/RedirectWithQuery';
|
import { RedirectWithQuery } from 'components/RedirectWithQuery';
|
||||||
import {
|
import {
|
||||||
WalletInfo,
|
WalletInfo,
|
||||||
|
@ -74,7 +74,13 @@ class SendTransaction extends React.Component<Props> {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Route exact={true} path={`${currentPath}/send`} component={Send} />
|
<Route
|
||||||
|
exact={true}
|
||||||
|
path={`${currentPath}/send`}
|
||||||
|
render={() => {
|
||||||
|
return wallet.isReadOnly ? <Redirect to={`${currentPath}/info`} /> : <Send />;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<Route
|
<Route
|
||||||
path={`${currentPath}/info`}
|
path={`${currentPath}/info`}
|
||||||
exact={true}
|
exact={true}
|
||||||
|
|
Loading…
Reference in New Issue