Merge branch 'develop' into fix-modals

This commit is contained in:
Daniel Ternyak 2018-06-26 23:58:27 -05:00 committed by GitHub
commit 6696ad9961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
126 changed files with 1675 additions and 1078 deletions

View File

@ -4,7 +4,7 @@ import { Provider, connect } from 'react-redux';
import { withRouter, Switch, HashRouter, Route, BrowserRouter } from 'react-router-dom';
import { AppState } from 'features/reducers';
import { getNetworkUnit } from 'features/config';
import { getNetworkUnit, getTheme } from 'features/config';
import { transactionMetaActions } from 'features/transaction';
// Components
import Contracts from 'containers/Tabs/Contracts';
@ -23,8 +23,10 @@ import QrSignerModal from 'containers/QrSignerModal';
import OnboardModal from 'containers/OnboardModal';
import WelcomeModal from 'components/WelcomeModal';
import NewAppReleaseModal from 'components/NewAppReleaseModal';
import PalettePage from 'components/Palette';
import { RouteNotFound } from 'components/RouteNotFound';
import { RedirectWithQuery } from 'components/RedirectWithQuery';
import { Theme } from 'config';
import 'what-input';
interface OwnProps {
@ -32,7 +34,8 @@ interface OwnProps {
}
interface StateProps {
networkUnit: string;
networkUnit: ReturnType<typeof getNetworkUnit>;
theme: ReturnType<typeof getTheme>;
}
interface DispatchProps {
@ -53,12 +56,19 @@ class RootClass extends Component<Props, State> {
public componentDidMount() {
this.props.setUnitMeta(this.props.networkUnit);
this.addBodyClasses();
this.updateTheme(this.props.theme);
}
public componentDidCatch(error: Error) {
this.setState({ error });
}
public componentDidUpdate(prevProps: Props) {
if (this.props.theme !== prevProps.theme) {
this.updateTheme(this.props.theme, prevProps.theme);
}
}
public render() {
const { store } = this.props;
const { error } = this.state;
@ -67,14 +77,6 @@ class RootClass extends Component<Props, State> {
return <ErrorScreen error={error} />;
}
const CaptureRouteNotFound = withRouter(({ children, location }) => {
return location && location.state && location.state.error ? (
<PageNotFound />
) : (
(children as JSX.Element)
);
});
const routes = (
<CaptureRouteNotFound>
<Switch>
@ -87,6 +89,9 @@ class RootClass extends Component<Props, State> {
<Route path="/tx-status" component={CheckTransaction} exact={true} />
<Route path="/pushTx" component={BroadcastTx} />
<Route path="/support-us" component={SupportPage} exact={true} />
{process.env.NODE_ENV !== 'production' && (
<Route path="/dev/palette" component={PalettePage} exact={true} />
)}
<RedirectWithQuery exactArg={true} from="/" to="/account" pushArg={true} />
<RouteNotFound />
</Switch>
@ -100,8 +105,8 @@ class RootClass extends Component<Props, State> {
return (
<React.Fragment>
<Provider store={store} key={Math.random()}>
<Router key={Math.random()}>
<Provider store={store}>
<Router>
<React.Fragment>
{routes}
<LegacyRoutes />
@ -139,6 +144,14 @@ class RootClass extends Component<Props, State> {
document.body.className += ` ${classes.join(' ')}`;
}
private updateTheme(theme: Theme, oldTheme?: Theme) {
const root = document.documentElement;
if (oldTheme) {
root.classList.remove(`theme--${oldTheme}`);
}
root.classList.add(`theme--${theme}`);
}
}
const LegacyRoutes = withRouter(props => {
@ -181,11 +194,18 @@ const LegacyRoutes = withRouter(props => {
);
});
const mapStateToProps = (state: AppState) => {
return {
networkUnit: getNetworkUnit(state)
};
};
const CaptureRouteNotFound = withRouter(({ children, location }) => {
return location && location.state && location.state.error ? (
<PageNotFound />
) : (
(children as JSX.Element)
);
});
const mapStateToProps = (state: AppState): StateProps => ({
networkUnit: getNetworkUnit(state),
theme: getTheme(state)
});
export default connect(mapStateToProps, {
setUnitMeta: transactionMetaActions.setUnitMeta

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch -->
<title>Artboard</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M32,62 C15.4314575,62 2,48.5685425 2,32 C2,15.4314575 15.4314575,2 32,2 C48.5685425,2 62,15.4314575 62,32 C62,48.5685425 48.5685425,62 32,62 Z M34.0305046,7.95922852 C28.4869979,8.0945438 23.5325322,9.77233385 19.1671077,12.9925987 C12.618971,17.8229959 9.73593449,24.5563465 9.65102015,33 C9.57046323,41.010364 13.0671678,47.3752487 19.1671077,52.0795127 C23.2337344,55.2156888 28.1882,56.8711029 34.0305046,57.0457551 C25.8112663,48.1716906 21.7016472,39.5294858 21.7016472,31.1191406 C21.7016472,22.7087955 25.8112663,14.9888248 34.0305046,7.95922852 Z" id="Combined-Shape" fill="#000000"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
<g fill="none" fill-rule="evenodd" stroke="#333">
<circle cx="11" cy="11" r="5" stroke-width="1.059"/>
<path d="M11 1.118L9.809 3.5h2.382L11 1.118zM11 20.882L9.809 18.5h2.382L11 20.882zM20.882 11L18.5 9.809v2.382L20.882 11zM1.118 11L3.5 9.809v2.382L1.118 11zM4.012 4.012l.843 2.527 1.684-1.684-2.527-.843zM17.988 17.988l-2.527-.843 1.684-1.684.843 2.527zM17.988 4.012l-2.527.843 1.684 1.684.843-2.527zM4.012 17.988l.843-2.527 1.684 1.684-2.527.843z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 572 B

View File

@ -1,149 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="885.37909"
height="885.09106"
viewBox="0 0 830.04288 829.77287"
id="svg4289"
version="1.1"
inkscape:version="0.92.1 r15371"
sodipodi:docname="app-parity-brandmark.svg">
<defs
id="defs4291">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3617">
<path
d="m 823,258 h 222 v 86 H 823 Z"
id="path3619"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3549">
<path
d="m 551.0085,479.9361 h 325.5758 v 79.24058 H 551.0085 Z"
id="path3551"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3481">
<path
d="m 551.0085,627.9283 h 325.5758 v 79.24298 H 551.0085 Z"
id="path3483"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3393">
<path
d="m 381,263 h 668 V 937 H 381 Z"
id="path3395"
inkscape:connector-curvature="0" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3381">
<path
d="m 381,263 h 668 V 937 H 381 Z"
id="path3383"
inkscape:connector-curvature="0" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="488.17854"
inkscape:cy="442.21187"
inkscape:document-units="px"
inkscape:current-layer="g95360"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1364"
inkscape:window-height="743"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1"
units="px" />
<metadata
id="metadata4294">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(60.73571,-113.7015)">
<rect
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:2.20702052;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect95169"
width="603.17065"
height="603.17065"
x="-281.4534"
y="332.37225"
transform="rotate(-32)" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2.50032759;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect95152"
width="403.26453"
height="94.936951"
x="152.14095"
y="382.00003" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2.50032783;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect95152-3"
width="403.26453"
height="94.936951"
x="152.54274"
y="566.80945" />
<g
id="g95360"
transform="translate(-0.53571398,0.53571402)">
<path
inkscape:connector-curvature="0"
id="path95171-6-7"
d="M 63.348515,638.44001 580.86185,317.71033"
style="fill:#ff0000;stroke:#ffffff;stroke-width:22.76096916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647" />
<path
inkscape:connector-curvature="0"
id="path95171-6-3"
d="M 129.68733,742.13942 647.20066,421.40975"
style="fill:#ff0000;stroke:#ffffff;stroke-width:22.76096916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path95171-6-56"
d="M -4.3496941,530.95988 513.16364,210.2302"
style="fill:#ffffff;stroke:#ffffff;stroke-width:22.76096916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path95171-6-9"
d="M 193.57922,844.21853 711.09255,523.48886"
style="fill:#ff0000;stroke:#ffffff;stroke-width:22.76096916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<svg width="832px" height="832px" viewBox="0 0 832 832" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="parity-signer" fill="#000000" fill-rule="nonzero">
<path d="M764.560113,405.346164 L618.54298,495.840504 L618.54298,456.10795 L497.25896,456.10795 L712.806034,322.522324 L764.560113,405.346164 Z M776.621671,424.648692 L831.329617,512.199707 L319.811895,831.831454 L263.924777,742.393369 L572.67508,551.044901 L618.54298,551.044901 L618.54298,522.6182 L776.621671,424.648692 Z M251.863219,723.090841 L200.10914,640.267001 L344.073451,551.044901 L529.467929,551.044901 L251.863219,723.090841 Z M580.266488,110.414713 L635.515924,198.832293 L518.588035,271.29853 L320.672425,271.29853 L580.266488,110.414713 Z M568.20493,91.1121848 L277.465275,271.29853 L214.87666,271.29853 L214.87666,310.08792 L55.508039,408.856867 L0.180148145,320.313732 L511.69787,0.681985417 L568.20493,91.1121848 Z M67.5695971,428.159394 L214.87666,336.865617 L214.87666,366.235481 L365.40253,366.235481 L220.388819,456.10795 L215.27845,456.10795 L215.27845,459.275109 L122.819033,516.576974 L67.5695971,428.159394 Z M700.744476,303.219797 L618.14119,354.413308 L618.14119,271.29853 L561.795185,271.29853 L647.577482,218.13482 L700.744476,303.219797 Z M188.047582,620.964473 L134.880591,535.879502 L215.27845,486.052806 L215.27845,551.044901 L300.866301,551.044901 L188.047582,620.964473 Z M454.051809,456.10795 L263.595968,456.10795 L408.609679,366.235481 L599.065524,366.235481 L454.051809,456.10795 Z" id="Combined-Shape"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -23,7 +23,7 @@
align-self: stretch;
padding: 0;
box-shadow: none;
color: $brand-danger;
color: color(brand-danger);
&-temporary-input--non-mobile {
flex: 1;
@ -122,7 +122,7 @@
}
&-error {
color: $brand-danger;
color: color(brand-danger);
align-self: end;
}
}

View File

@ -6,9 +6,9 @@
position: absolute;
top: calc(100% - #{$space});
width: 100%;
border: 1px solid $gray-lighter;
border: 1px solid color(gray-lighter);
border-top: none;
background: $component-active-color;
background: color(component-active-color);
z-index: 1;
list-style-type: none;
margin: 0;
@ -24,7 +24,7 @@
&:hover {
cursor: pointer;
background: $gray-lightest;
background: color(gray-lightest);
}
&-identicon {
@ -70,7 +70,7 @@
}
&--active {
background: $gray-lighter;
background: color(gray-lighter);
}
}
}

View File

@ -18,7 +18,7 @@
&-label {
position: absolute;
width: 100%;
color: darken($brand-success, 15%);
color: color(brand-success-darker);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

View File

@ -3,7 +3,7 @@
.AppAlpha {
@include cover-message;
background: $brand-info;
background: color(brand-info);
left: $electron-sidebar-width - 1;
&-content {
@ -26,13 +26,13 @@
height: 60px;
line-height: 60px;
font-size: 22px;
background: rgba(#fff, 0.96);
color: $gray-dark;
background: #fff;
color: #333;
opacity: 0.96;
border-radius: 4px;
&:hover {
background: #fff;
color: $gray-darker;
opacity: 1;
}
}
}
@ -41,7 +41,7 @@
&.is-fading {
pointer-events: none;
opacity: 0;
background: #fff;
background: color(control-bg);
transition: all 500ms ease 400ms;
.AppAlpha-content {

View File

@ -3,7 +3,7 @@
.AppExpired {
@include cover-message;
background: $brand-danger;
background: color(brand-danger);
display: flex;
align-items: center;
@ -30,14 +30,14 @@
height: 60px;
line-height: 60px;
font-size: 22px;
background: rgba(#fff, 0.96);
color: $gray-dark;
background: #fff;
color: #333;
border-radius: 4px;
text-shadow: none;
opacity: 0.95;
&:hover {
background: #fff;
color: $gray-darker;
opacity: 1;
}
}
}

View File

@ -5,7 +5,7 @@
&-copy {
display: inline-block;
cursor: pointer;
color: $text-color;
color: color(text-color);
font-size: $font-size-xs;
opacity: 0.5;
transition: $transition;
@ -15,7 +15,7 @@
}
&.is-copied {
color: $brand-success;
color: color(brand-success);
opacity: 1;
}
@ -27,7 +27,7 @@
&-label {
display: inline-block;
cursor: pointer;
color: $text-color;
color: color(text-color);
font-size: $font-size-xs;
opacity: 0.5;
@ -91,7 +91,7 @@
max-width: calc(100% - 44px - 24px);
&-error {
color: $brand-danger;
color: color(brand-danger);
margin-bottom: $space-md;
}
}
@ -152,26 +152,3 @@
}
}
}
.account-info {
padding-left: 1em;
margin: 0;
table {
font-weight: 300;
border-bottom: 0;
min-width: 200px;
td {
padding: 4px 5px;
line-height: 1;
}
td:first-child {
max-width: 115px;
word-wrap: break-word;
padding-left: 1em;
}
tr:nth-last-child(2),
tr:last-child {
background-color: white !important;
}
}
}

View File

@ -30,7 +30,7 @@
width: 100%;
margin: 0.5rem 0rem;
margin-bottom: 0.75rem;
background-color: #ececec;
background-color: color(control-border);
background-position: center;
background-size: 1px 1px;
}
@ -56,7 +56,7 @@
white-space: pre-wrap;
display: inline-block;
min-width: 36px;
opacity: 0.54;
color: shade-dark(0.5);
}
&-value {
font-weight: 600;

View File

@ -13,7 +13,7 @@
position: relative;
height: inherit;
display: block;
color: #fff;
color: color(text-color-inverted);
text-decoration: none;
text-align: center;
box-shadow: 0 1px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.12);
@ -24,7 +24,7 @@
&:hover,
&:focus,
&:active {
color: #fff;
color: color(text-color-inverted);
opacity: 0.92;
}
@ -82,10 +82,10 @@
@include reset-button;
display: inline-block;
margin: 0 $space-xs;
background: $gray-dark;
background: color(gray-dark);
width: 12px;
height: 12px;
border: 3px solid $gray-lightest;
border: 3px solid color(gray-lightest);
border-radius: 100%;
opacity: 0.6;

View File

@ -7,7 +7,7 @@
&-error {
font-size: 13px;
font-weight: normal;
color: $brand-danger;
color: color(brand-danger);
}
}

View File

@ -2,7 +2,7 @@
@import "common/sass/mixins";
.TokenRow {
border-bottom: 1px solid $gray-lighter;
border-bottom: 1px solid shade-dark(0.1);
&-balance,
&-symbol {

View File

@ -34,10 +34,13 @@ export default class TokenRow extends React.PureComponent<Props, State> {
<tr className="TokenRow" onClick={this.handleToggleTracked}>
{/* Only allow to toggle tracking on non custom tokens
because the user can just remove the custom token instead */}
{!this.props.custom &&
this.props.toggleTracked && (
{this.props.toggleTracked && (
<td className="TokenRow-toggled">
<input type="checkbox" checked={tracked} />
<input
type="checkbox"
checked={tracked || this.props.custom}
disabled={this.props.custom}
/>
</td>
)}
<td

View File

@ -34,7 +34,7 @@
}
&-error {
color: $brand-danger;
color: color(brand-danger);
text-align: center;
&-message {
@ -61,7 +61,7 @@
padding-top: 10px;
text-align: center;
font-size: $font-size-xs;
color: $gray;
color: shade-dark(0.7);
}
}

View File

@ -8,11 +8,11 @@
.tx-modal-testnet-warn {
text-align: center;
background-color: $brand-warning;
background-color: color(brand-warning);
border-radius: 2px;
padding: 0.5rem 0.75rem;
font-weight: 400;
color: white;
color: color(text-color-inverted);
margin: auto;
margin-bottom: 1rem;
}

View File

@ -35,7 +35,7 @@
margin: 0;
font-family: $font-family-monospace;
font-weight: 400;
opacity: 0.54;
color: shade-dark(0.4);
word-wrap: break-word;
}
}
@ -50,7 +50,7 @@
margin: 0;
padding: 0;
font-weight: 400;
color: rgba(0, 0, 0, 0.54);
color: shade-dark(0.4);
}
&-link {
font-family: $font-family-monospace;

View File

@ -12,17 +12,21 @@
@media screen and (max-width: 525px) {
font-size: 1rem;
}
> td {
padding: 0.5rem 0;
text-align: right;
opacity: 0.54;
color: shade-dark(0.5);
&:not(:first-child) {
padding-left: 0.5rem;
}
&:first-child {
text-align: left;
opacity: 1;
color: color(text-color);
}
&:last-child {
font-size: 85%;
}
@ -36,7 +40,7 @@
}
&-total {
background-image: linear-gradient(to right, #c2cfd6 33%, #fff0 0%);
background-image: linear-gradient(to right, color(control-border) 33%, transparent 0%);
background-position: top;
background-size: 5px 1px;
background-repeat: repeat-x;

View File

@ -5,7 +5,7 @@
&-network-info {
text-align: center;
font-weight: 400;
color: rgba(0, 0, 0, 0.54);
color: shade-dark(0.5);
}
&-button {
display: block;
@ -14,8 +14,9 @@
border: none;
border-radius: 2px;
transition: background-color 300ms;
background-color: transparent;
&:hover {
background-color: rgba(153, 153, 153, 0.12);
background-color: shade-dark(0.06);
}
}
}

View File

@ -36,7 +36,7 @@ $button-break: 'max-width: 620px';
}
&-currency {
color: $brand-danger;
color: color(brand-danger);
}
}
}

View File

@ -2,7 +2,7 @@
@import 'common/sass/mixins';
.Disclaimer {
color: $text-color;
color: color(text-color);
&-button {
@include reset-button;

View File

@ -18,9 +18,9 @@ $back-spacing: 10px;
position: sticky;
top: 0;
padding-top: $branding-spacing-top;
background: #FFF;
background: color(control-bg);
z-index: 1;
border-bottom: 1px solid $gray-lighter;
border-bottom: 1px solid shade-dark(0.1);
.is-osx & {
padding-top: $electron-osx-control-spacing + $branding-spacing-top - 5;
@ -34,6 +34,15 @@ $back-spacing: 10px;
background-position: center;
background-repeat: no-repeat;
background-size: auto 100%;
cursor: pointer;
@include theme(dark) {
background-image: url('~assets/images/logo-mycrypto.svg');
}
&:hover {
opacity: 0.8;
}
}
&-beta {
@ -41,12 +50,16 @@ $back-spacing: 10px;
letter-spacing: 4px;
height: 20px;
line-height: 20px;
color: #FFF;
background: $brand-info;
color: color(text-color-inverted);
background: color(brand-info);
text-transform: uppercase;
font-size: 8px;
opacity: 0.8;
pointer-events: none;
@include theme(dark) {
opacity: 1;
}
}
}
@ -69,7 +82,7 @@ $back-spacing: 10px;
display: flex;
align-items: center;
width: 100%;
color: $gray-light;
color: shade-dark(0.5);
font-size: 12px;
padding: 6px 0;
@ -79,7 +92,7 @@ $back-spacing: 10px;
}
&:hover {
color: $link-hover-color;
color: shade-dark(0.7);
}
}
}
@ -100,9 +113,9 @@ $back-spacing: 10px;
width: 100%;
text-align: left;
padding: $back-spacing 0 8px $back-spacing;
border-bottom: 1px solid $gray-lighter;
color: rgba($text-color, 0.4);
background: #FFF;
color: shade-dark(0.2);
border-bottom: 1px solid shade-dark(0.05);
background: color(control-bg);
.is-osx & {
padding-top: $electron-osx-control-spacing + $back-spacing;
@ -114,7 +127,7 @@ $back-spacing: 10px;
}
&:hover {
color: $link-hover-color;
color: color(brand-primary);
}
}
}
@ -131,18 +144,18 @@ $back-spacing: 10px;
height: 48px;
line-height: 48px;
padding: 0 0 0 10px;
border-bottom: 1px solid $gray-lighter;
color: $text-color;
border-bottom: 1px solid shade-dark(0.08);
color: color(text-color);
font-size: 14px;
font-weight: normal;
&.is-active {
color: $link-color;
background: $gray-lightest;
color: color(link-color);
background: shade-dark(0.03);
}
&:hover {
color: $link-hover-color;
color: color(link-hover-color);
}
&-icon {

View File

@ -1,20 +1,32 @@
import React from 'react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import { navigationLinks } from 'config';
import translate from 'translations';
import { navigationLinks, Theme } from 'config';
import NavigationLink from 'components/NavigationLink';
import NetworkSelect from './NetworkSelect';
import LanguageSelect from './LanguageSelect';
import NetworkStatus from './NetworkStatus';
import { changeTheme, getTheme } from 'features/config';
import { AppState } from 'features/reducers';
import './ElectronNav.scss';
interface StateProps {
theme: ReturnType<typeof getTheme>;
}
interface ActionProps {
changeTheme: typeof changeTheme;
}
type Props = StateProps & ActionProps;
interface State {
panelContent: React.ReactElement<any> | null;
isPanelOpen: boolean;
}
export default class ElectronNav extends React.Component<{}, State> {
class ElectronNav extends React.Component<Props, State> {
public state: State = {
panelContent: null,
isPanelOpen: false
@ -31,7 +43,7 @@ export default class ElectronNav extends React.Component<{}, State> {
})}
>
<div className="ElectronNav-branding">
<div className="ElectronNav-branding-logo" />
<div className="ElectronNav-branding-logo" onClick={this.toggleTheme} />
<div className="ElectronNav-branding-beta">Alpha Release</div>
</div>
@ -101,4 +113,18 @@ export default class ElectronNav extends React.Component<{}, State> {
}
}, 300);
};
private toggleTheme = () => {
const theme = this.props.theme === Theme.LIGHT ? Theme.DARK : Theme.LIGHT;
this.props.changeTheme(theme);
};
}
export default connect(
(state: AppState) => ({
theme: getTheme(state)
}),
{
changeTheme
}
)(ElectronNav);

View File

@ -9,17 +9,17 @@
height: 48px;
line-height: 48px;
padding: 0 10px;
color: $text-color;
border-bottom: 1px solid $gray-lighter;
color: color(text-color);
border-bottom: 1px solid color(gray-lighter);
text-align: left;
&:hover {
color: $link-hover-color;
color: color(link-hover-color);
}
&.is-selected {
color: $link-color;
background: $gray-lightest;
color: color(link-color);
background: color(gray-lightest);
}
}
}

View File

@ -11,20 +11,20 @@
border-radius: 100%;
&.is-online {
background: $brand-success;
background: color(brand-success);
}
&.is-offline {
background: $brand-danger;
background: color(brand-danger);
}
&.is-connecting {
background: $brand-warning;
background: color(brand-warning);
}
}
&-text {
color: $gray-dark;
color: shade-dark(0.4);
font-size: 9px;
}
}

View File

@ -3,7 +3,7 @@
.ErrorScreen {
@include cover-message;
background: $brand-danger;
background: color(brand-danger);
code {
display: block;

View File

@ -4,7 +4,7 @@
padding: 1rem;
box-shadow: 16px 16px 47px 0 rgba(0, 0, 0, 0.07);
margin-top: 2rem;
background-color: white;
background-color: color(control-bg);
text-align: center;
p {

View File

@ -0,0 +1,76 @@
@import 'common/sass/variables';
@import 'common/sass/mixins';
@mixin theme-icon-showing {
transform: translate(-50%, -50%);
transition-delay: 100ms;
}
$toggle-height: 30px;
$toggle-width: 60px;
$toggle-control-gutter: 3px;
$toggle-control-size: $toggle-height - $toggle-control-gutter * 2;
.ThemeToggle {
position: relative;
height: $toggle-height;
width: $toggle-width;
border-radius: $toggle-height / 2;
border: 1px solid shade-light(0.4);
background: shade-dark(0.2);
opacity: 0.6;
transition: opacity 100ms ease;
&:hover {
opacity: 1;
}
&-control {
position: absolute;
top: 50%;
left: $toggle-control-gutter;
height: $toggle-control-size;
width: $toggle-control-size;
border-radius: 100%;
background: color(control-bg);
transform: translateY(-50%);
overflow: hidden;
transition: transform 300ms ease;
@include theme('dark') {
transform: translateY(-50%) translateX(-100%) translateX($toggle-width)
translateX($toggle-control-gutter * -3);
}
&-icon {
position: absolute;
top: 50%;
left: 50%;
width: 13px;
height: 13px;
transform: translate(-50%, -50%) translateY(30px);
fill: color(text-color);
transition: transform 200ms ease;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
&.is-light {
background-image: url('~assets/images/icon-theme-light.svg');
opacity: 0.9;
@include theme('light') {
@include theme-icon-showing;
}
}
&.is-dark {
background-image: url('~assets/images/icon-theme-dark.svg');
opacity: 0.85;
filter: invert(1);
@include theme('dark') {
@include theme-icon-showing;
}
}
}
}
}

View File

@ -0,0 +1,43 @@
import React from 'react';
import { connect } from 'react-redux';
import { Theme } from 'config';
import { getTheme, changeTheme } from 'features/config';
import { AppState } from 'features/reducers';
import './ThemeToggle.scss';
interface ActionProps {
changeTheme: typeof changeTheme;
}
interface StateProps {
theme: ReturnType<typeof getTheme>;
}
type Props = ActionProps & StateProps;
class ThemeToggle extends React.Component<Props> {
public render() {
return (
<button className="ThemeToggle" onClick={this.toggleTheme} aria-hidden={true}>
<div className="ThemeToggle-control">
<span className="ThemeToggle-control-icon is-dark" />
<span className="ThemeToggle-control-icon is-light" />
</div>
</button>
);
}
private toggleTheme = () => {
const theme = this.props.theme === Theme.LIGHT ? Theme.DARK : Theme.LIGHT;
this.props.changeTheme(theme);
};
}
export default connect(
(state: AppState) => ({
theme: getTheme(state)
}),
{
changeTheme
}
)(ThemeToggle);

View File

@ -1,19 +1,19 @@
@import 'common/sass/variables';
@import 'common/sass/mixins';
$footer-link-color: #fff;
$footer-link-color: color(text-color-inverted);
.Footer {
background-color: $ether-navy;
background-color: color(footer-bg);
padding: $space-sm $space-sm 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
border-top: 3px solid $brand-primary;
border-top: 3px solid color(footer-border);
&-section {
color: #fff;
color: color(text-color-inverted);
padding: $space;
}
@ -43,7 +43,7 @@ $footer-link-color: #fff;
width: 100%;
padding-bottom: $space * 2;
margin-bottom: $space * 2;
border-bottom: 1px solid rgba(#fff, 0.2);
border-bottom: 1px solid color(gray-dark);
}
&-support {
text-align: center;
@ -97,6 +97,7 @@ $footer-link-color: #fff;
&-legal {
font-size: $font-size-xs-bump;
margin-bottom: $space-md;
&-text {
display: inline-block;
@ -157,7 +158,7 @@ $footer-link-color: #fff;
.SocialMediaLink {
transition: opacity 0.3s;
color: #fff;
color: $footer-link-color;
margin: 0.55rem;
> i {
@ -167,6 +168,6 @@ $footer-link-color: #fff;
&:hover,
&:focus {
opacity: 0.8;
color: #fff;
color: $footer-link-color;
}
}

View File

@ -14,6 +14,7 @@ import {
import DisclaimerModal from 'components/DisclaimerModal';
import { NewTabLink } from 'components/ui';
import PreFooter from './PreFooter';
import ThemeToggle from './ThemeToggle';
import './index.scss';
const SocialMediaLink = ({ link, text }: { link: string; text: string }) => {
@ -98,6 +99,10 @@ export default class Footer extends React.PureComponent<Props, State> {
</div>
<div className="Footer-about-legal-text">v{VERSION}</div>
</div>
<div className="Footer-about-theme">
<ThemeToggle />
</div>
</div>
<div className="Footer-support Footer-section">

View File

@ -4,10 +4,10 @@
width: 100%;
position: relative;
overflow-y: hidden;
border-top: 3px solid $brand-primary;
border-top: 3px solid color(brand-primary);
transition: border 300ms ease;
background: #fff;
border-bottom: 1px solid #eee;
background: color(control-bg);
border-bottom: 1px solid color(control-border);
&-scroll {
-ms-overflow-style: -ms-autohiding-scrollbar;
@ -34,7 +34,7 @@
&-arrow {
background-color: white;
bottom: 12px;
color: #d6d6d6;
color: color(gray-light);
font-size: 33px;
line-height: 1.3;
min-width: 50px;
@ -51,9 +51,9 @@
left: 3%;
background: linear-gradient(
to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 47%,
rgba(255, 255, 255, 1) 100%
transparent 0%,
color(control-bg) 47%,
color(control-bg) 100%
);
padding-left: 5px;
text-align: left;
@ -66,9 +66,9 @@
right: 3%;
background: linear-gradient(
to right,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 47%,
rgba(255, 255, 255, 1) 100%
transparent 0%,
color(control-bg) 47%,
color(control-bg) 100%
);
padding-right: 5px;
text-align: right;
@ -84,7 +84,7 @@
display: inline-block;
&-link {
color: darken($link-color, 15%);
color: color(tab-color);
display: block;
font-size: 16px;
font-weight: 300;
@ -101,7 +101,7 @@
&:after {
content: '';
background: $brand-primary;
background: color(tab-active-color);
height: 2px;
width: 100%;
left: 0px;
@ -114,7 +114,7 @@
&.is-active,
&:hover,
&:focus {
color: $brand-primary;
color: color(tab-active-color);
text-decoration: none;
transition: all 250ms ease 0s;

View File

@ -21,15 +21,15 @@
@include show-tooltip-on-hover;
&.is-online {
background: lighten($brand-success, 10%);
background: color(brand-success-light);
}
&.is-offline {
background: lighten($brand-danger, 5%);
background: color(brand-danger-light);
}
&.is-connecting {
background: #FFF;
background: color(brand-warning);
animation: online-pulse 800ms ease infinite;
}
}

View File

@ -41,7 +41,11 @@ $small-size: 900px;
font-weight: 300;
color: #fff;
transition: background-color 80ms ease;
background: $gray-darker;
background: color(gray-darker);
@include theme(dark) {
background: color(gray-lighter);
}
a {
color: #fff;
@ -56,24 +60,24 @@ $small-size: 900px;
// Colors
&.is-primary {
background: $brand-primary;
background: color(brand-primary);
}
&.is-warning {
background: $brand-warning;
background: color(brand-warning);
}
&.is-danger {
background: $brand-danger;
background: color(brand-danger);
}
&.is-success {
background: $brand-success;
background: color(brand-success);
}
&.is-info {
background: $brand-info;
border-bottom: 1px solid rgba(#fff, 0.6);
background: color(brand-info);
border-bottom: 1px solid rgba(#fff, 0.4);
}
}
@ -117,7 +121,7 @@ $small-size: 900px;
&-right {
font-size: 18px;
font-weight: 300;
color: white;
color: color(text-color-inverted);
flex: 1 auto;
text-align: right;
padding: 0 0 5px;

View File

@ -50,9 +50,9 @@ interface DispatchProps {
interface StateProps {
shouldSetNodeFromQS: boolean;
network: NetworkConfig;
languageSelection: AppState['config']['meta']['languageSelection'];
isChangingNode: AppState['config']['nodes']['selectedNode']['pending'];
isOffline: AppState['config']['meta']['offline'];
languageSelection: ReturnType<typeof getLanguageSelection>;
isChangingNode: ReturnType<typeof isNodeChanging>;
isOffline: ReturnType<typeof getOffline>;
}
interface State {

View File

@ -13,7 +13,7 @@ $left-border-size: 2px;
.NetworkOption {
border-left: $left-border-size solid;
border-bottom: 1px solid $gray-lighter;
border-bottom: 1px solid shade-dark(0.08);
&-label {
display: flex;
@ -36,34 +36,40 @@ $left-border-size: 2px;
position: relative;
top: 1px;
display: inline-block;
border: 1px solid rgba($gray-light, 0.4);
border: 1px solid shade-dark(0.15);
border-radius: 100%;
height: $radio-size;
width: $radio-size;
margin-right: $space-xs;
box-shadow: 0 0 0 1px #FFF inset;
box-shadow: 0 0 0 1px color(control-bg) inset;
}
&:hover {
&:before {
border-color: rgba($gray-light, 0.7);
border-color: shade-dark(0.3);
}
}
&.is-selected {
&:before {
background: $brand-primary;
border-color: $brand-primary;
background: color(brand-primary);
border-color: color(brand-primary);
}
}
&.is-specific-node {
&:before {
background: linear-gradient(135deg, #FFF, #FFF 45%, $brand-primary 45%, $brand-primary 100%);
background: linear-gradient(
135deg,
transparent,
transparent 45%,
color(brand-primary) 45%,
color(brand-primary) 100%
);
}
&:hover:before {
background: rgba($brand-primary, 0.6);
background: color(brand-primary-lighter);
}
}
@ -80,19 +86,19 @@ $left-border-size: 2px;
width: 20px;
height: 20px;
font-size: 10px;
color: $gray-light;
color: shade-dark(0.4);
border-radius: 100%;
transition-property: color, background-color, transform;
transition-duration: 75ms;
transition-timing-function: ease;
&:hover {
color: $gray-dark;
background: rgba(#000, 0.1);
color: shade-dark(0.6);
background: shade-dark(0.1);
}
&.is-expanded {
color: $gray-dark;
color: shade-dark(0.6);
transform: rotate(180deg);
}
}
@ -100,7 +106,7 @@ $left-border-size: 2px;
&-nodes {
padding: 0.2rem 0.5rem;
background: $gray-lightest;
border-top: 1px solid $gray-lighter;
background: shade-dark(0.02);
border-top: 1px solid shade-dark(0.08);
}
}

View File

@ -13,7 +13,8 @@ $button-font-size: $font-size-small;
.NetworkSelector {
width: 100%;
text-align: left;
color: $text-color;
color: color(text-color);
background: color(control-bg);
font-size: $font-size-base;
&-add,
@ -23,11 +24,11 @@ $button-font-size: $font-size-small;
width: 100%;
padding: $button-padding;
text-align: center;
color: $text-color;
color: color(text-color);
font-size: $button-font-size;
&:hover {
color: $link-hover-color;
color: color(link-hover-color);
}
.fa {
@ -40,12 +41,12 @@ $button-font-size: $font-size-small;
}
&-alts {
border-bottom: 1px solid $gray-lighter;
border-bottom: 1px solid shade-dark(0.08);
}
@if ($is-electron) {
&-add {
border-bottom: 1px solid $gray-lighter;
border-bottom: 1px solid shade-dark(0.08);
}
}
}

View File

@ -18,35 +18,40 @@ $radio-size: 10px;
&:before {
content: '';
display: inline-block;
border: 1px solid rgba($gray-light, 0.4);
border: 1px solid shade-dark(0.15);
border-radius: 100%;
height: $radio-size;
width: $radio-size;
margin-right: $space-xs;
background: #FFF;
box-shadow: 0 0 0 1px #FFF inset;
background: color(control-bg);
box-shadow: 0 0 0 1px color(control-bg) inset;
}
&:hover {
&:before {
border-color: rgba($gray-light, 0.8);
border-color: shade-dark(0.3);
}
}
&.is-selected {
&:before {
border-color: $brand-primary;
background: $brand-primary;
border-color: color(brand-primary);
background: color(brand-primary);
}
}
&.is-auto-selected {
&:before {
background: rgba($brand-primary, 0.3);
background: color(brand-primary);
opacity: 0.3;
&:hover {
opacity: 0.8;
}
}
&:hover:before {
background: rgba($brand-primary, 0.8);
opacity: 0.8;
}
}
}
@ -57,7 +62,7 @@ $radio-size: 10px;
font-size: 14px;
&:hover {
color: $brand-danger;
color: color(brand-danger);
opacity: 0.8;
}
}

View File

@ -10,7 +10,7 @@ interface State {
newRelease?: string;
}
export default class NewAppReleaseModal extends React.Component<{}, State> {
export default class NewAppReleaseModal extends React.PureComponent<{}, State> {
public state: State = {
isOpen: false
};

View File

@ -0,0 +1,33 @@
@import 'common/sass/variables/colors';
.Palette {
&-group {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2rem;
&-color {
margin-right: 1rem;
text-align: center;
&-blob {
height: 120px;
width: 120px;
margin-bottom: 0.5rem;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
@each $name, $color in $theme-light {
&.color--#{$name} {
background: color($name);
}
}
}
&-name {
font-size: 12px;
color: shade-dark(0.7);
}
}
}
}

View File

@ -0,0 +1,59 @@
import React from 'react';
import TabSection from 'containers/TabSection/index';
import './index.scss';
const COLORS = [
['gray-base', 'gray-darker', 'gray-dark', 'gray', 'gray-light', 'gray-lighter', 'gray-lightest'],
[
'brand-primary-darker',
'brand-primary-dark',
'brand-primary',
'brand-primary-light',
'brand-primary-lighter'
],
['brand-info-darker', 'brand-info-dark', 'brand-info', 'brand-info-light', 'brand-info-lighter'],
[
'brand-success-darker',
'brand-success-dark',
'brand-success',
'brand-success-light',
'brand-success-lighter'
],
[
'brand-warning-darker',
'brand-warning-dark',
'brand-warning',
'brand-warning-light',
'brand-warning-lighter'
],
[
'brand-danger-darker',
'brand-danger-dark',
'brand-danger',
'brand-danger-light',
'brand-danger-lighter'
],
['text-color', 'text-inverted-color', 'link-color', 'link-hover-color'],
['control-bg', 'control-color', 'control-border']
];
const Palette: React.SFC = () => (
<TabSection>
<section className="Tab-content">
<div className="Tab-content-pane Palette">
{COLORS.map(colors => (
<div className="Palette-group" key={colors[0]}>
{colors.map(c => (
<div className="Palette-group-color" key={c}>
<div className={`Palette-group-color-blob color--${c}`} />
<div className="Palette-group-color-name">{c}</div>
</div>
))}
</div>
))}
</div>
</section>
</TabSection>
);
export default Palette;

View File

@ -12,6 +12,8 @@ $wallet-height: 280px;
border: 1px solid #163151;
user-select: none;
cursor: default;
background: #FFF;
color: #333;
&-sidebar {
float: left;

View File

@ -12,13 +12,13 @@
overflow: hidden;
&.is-disabled {
background: $gray-lighter;
background: color(gray-lighter);
}
&-error {
padding: $space;
font-size: $font-size-small;
color: $gray-light;
color: color(gray-light);
&-icon {
display: block;

View File

@ -36,7 +36,7 @@ $default-opacity: 0.4;
}
&:hover {
color: $brand-primary;
color: color(brand-primary);
opacity: 1;
.SendEverything-icon {

View File

@ -18,16 +18,24 @@
min-width: 80px;
text-align: center;
font-weight: 300;
color: $ether-navy;
border-bottom: 2px solid $gray-lighter;
color: color(tab-color);
border-bottom: 2px solid color(tab-border);
transition-duration: 100ms;
opacity: 0.7;
&:hover {
opacity: 1;
color: color(tab-active-color);
}
&.is-active {
border-bottom-color: $brand-primary;
color: color(tab-active-color);
border-bottom-color: color(tab-active-border);
opacity: 1;
}
&.is-disabled {
color: $gray-light;
color: color(gray-light);
pointer-events: none;
text-decoration: line-through;
}

View File

@ -1,7 +1,7 @@
@import 'common/sass/variables';
.FeeSummary {
background: $gray-lighter;
background: shade-dark(0.08);
height: 42px;
line-height: 42px;
padding: 0 12px;

View File

@ -8,18 +8,22 @@
display: flex;
> .SimpleGas-slider {
flex-grow: 1;
margin-right: $input-padding-x;
margin-right: $space;
}
> .FeeSummary {
margin-left: $input-padding-x;
margin-left: $space;
min-width: 224px;
}
@media screen and (max-width: $screen-md) {
flex-wrap: wrap;
> .SimpleGas-slider {
width: 100%;
margin-right: 0;
}
> .FeeSummary {
width: 100%;
margin-left: 0;
@ -39,7 +43,7 @@
flex: 1;
padding: 0 $space-xs;
text-align: center;
color: $gray-light;
color: shade-dark(0.4);
font-size: $font-size-xs;
&:first-child {

View File

@ -3,11 +3,11 @@
.TogglablePassword {
&-toggle {
cursor: pointer;
color: $gray;
color: shade-dark(0.4);
transition: $transition;
&:hover {
color: $gray-darker;
color: shade-dark(0.7);
}
}
}

View File

@ -23,13 +23,13 @@
font-weight: bold;
&.is-success {
color: $brand-success;
color: color(brand-success);
}
&.is-warning {
color: $brand-warning;
color: color(brand-warning);
}
&.is-danger {
color: $brand-danger;
color: color(brand-danger);
}
}
@ -42,7 +42,7 @@
display: block;
width: 100%;
height: 7.2rem;
background: $gray-lighter;
background: color(gray-lighter);
}
}
}

View File

@ -21,7 +21,7 @@
margin: 0 auto;
&-title {
color: $brand-danger;
color: color(brand-danger);
}
&-desc {

View File

@ -49,6 +49,8 @@
&-token {
width: 82px;
background: color(control-bg);
color: control(control-color);
}
&-address {

View File

@ -7,7 +7,7 @@
text-align: center;
&-title {
color: $brand-danger;
color: color(brand-danger);
margin: 0 0 $space;
}

View File

@ -9,7 +9,7 @@
display: block;
margin: $space-sm 0;
text-align: center;
color: $gray-light;
color: shade-dark(0.3);
}
.Select {

View File

@ -21,7 +21,7 @@
padding: 25px 15px;
margin: 0 $space-md $space;
background: #fff;
background: color(control-bg);
box-shadow: 0 1px 4px rgba(#000, 0.2);
border-radius: 8px;
text-align: center;
@ -44,7 +44,7 @@
box-shadow: 0 1px 4px rgba(#000, 0.12), 0 4px 6px rgba(#000, 0.12);
.WalletButton-title {
color: $brand-primary;
color: color(brand-primary);
&-icon {
opacity: 1;
@ -83,18 +83,28 @@
margin-right: 8px;
max-height: 26px;
opacity: 0.8;
@include theme(dark) {
opacity: 1;
filter: invert(1);
// Kind of hacky, but we don't want to invert metamask
&[src*="metamask"] {
filter: none;
}
}
}
}
&-description {
color: $gray;
color: shade-dark(0.65);
font-size: $font-size-small;
font-weight: lighter;
}
&-example {
font-size: $font-size-xs;
color: rgba($brand-danger, 0.7);
color: color(brand-danger-light);
@include ellipsis;
}
@ -118,20 +128,20 @@
}
&-shield {
color: $brand-primary;
color: color(brand-primary);
}
&-exclamation-triangle {
color: $brand-warning;
color: color(brand-warning);
}
&-question-circle,
&-eye {
color: #666;
color: shade-dark(0.5);
}
&-question-circle:hover {
color: $brand-primary;
color: color(brand-primary);
}
}
}
@ -198,8 +208,7 @@
margin: 0;
width: 48px;
text-align: center;
border-left: 1px solid #f4f4f4;
background: #fefefe;
border-left: 1px solid rgba(0, 0, 0, 0.1);
a {
position: absolute;

View File

@ -11,7 +11,7 @@ interface State {
isOpen: boolean;
}
export default class WelcomeModal extends React.Component<{}, State> {
export default class WelcomeModal extends React.PureComponent<{}, State> {
public state: State = {
isOpen: false
};

View File

@ -4,9 +4,9 @@
.CodeBlock {
font-weight: 400;
font-size: 1rem;
color: rgba(0, 0, 0, 0.87);
background-color: $gray-lightest;
border: 1px solid $border-disabled;
color: color(control-color);
background-color: color(control-bg);
border: 1px solid color(control-border);
box-shadow: inset 0 1px 0 0 rgba(63, 63, 68, 0.05);
padding: 0.75rem 1rem;
margin: 0;

View File

@ -1,7 +1,7 @@
@import 'common/sass/variables';
.InlineSpinner {
color: $gray-light;
color: color(gray-light);
display: flex;
align-items: center;
font-weight: 400;

View File

@ -9,30 +9,45 @@
margin: auto;
display: flex;
flex-direction: column;
> .TogglablePassword {
width: 100%;
}
& > pre,
& > .Select,
&-input {
margin-bottom: 1rem;
}
&-inline {
display: flex;
flex-direction: row;
font-size: 1rem;
flex-wrap: wrap;
> .input-group-header {
width: 100%;
}
> .input-group-input {
flex-grow: 1;
width: auto;
}
> .Select {
margin-left: 8px;
}
&[readonly],
&[disabled] {
background-color: color(control-disabled-bg);
color: color(control-disabled-color);
border-color: color(control-disabled-border);
cursor: text !important;
}
}
&-header {
display: flex;
font-size: 1rem;
@ -40,28 +55,33 @@
font-weight: 400;
align-items: center;
flex-wrap: wrap;
> *:first-child {
margin-right: 8px;
}
> .flex-spacer {
flex-grow: 1;
}
> .small {
color: rgba(0, 0, 0, 0.54);
color: color(gray);
}
}
&-input {
width: 100%;
border: 1px solid $border-idle;
border-radius: 2px;
border: 1px solid color(control-border);
border-radius: $input-border-radius;
height: $input-height-base;
padding: 0.75rem 1rem;
font-weight: 400;
font-size: $input-margin-bottom;
color: rgba(0, 0, 0, 0.87);
background: color(control-bg);
color: color(control-color);
box-shadow: inset 0 1px 0 0 rgba(63, 63, 68, 0.05);
transition: border-color 120ms, box-shadow 120ms;
margin-bottom: 1rem;
&[placeholder] {
text-overflow: ellipsis;
}
@ -78,20 +98,20 @@
padding: 0.5rem 0.75rem;
}
&::placeholder {
color: $input-color-placeholder;
color: color(control-placeholder);
}
&:not([disabled]):not([readonly]) {
&.invalid {
border-color: $brand-danger;
box-shadow: inset 0px 0px 0px 1px $brand-danger;
border-color: color(brand-danger);
box-shadow: inset 0px 0px 0px 1px color(brand-danger);
}
&.valid {
border-color: #8dd17b;
box-shadow: inset 0px 0px 0px 1px #8dd17b;
border-color: color(brand-success);
box-shadow: inset 0px 0px 0px 1px color(brand-success);
}
&:focus {
border-color: #4295bc;
box-shadow: inset 0px 0px 0px 1px #4295bc;
border-color: color(brand-primary);
box-shadow: inset 0px 0px 0px 1px color(brand-primary);
}
}
}

View File

@ -1,7 +1,7 @@
@import 'common/sass/variables';
@import 'common/sass/mixins';
$m-background: #fff;
$m-background: color(pane-bg);
$m-window-padding-w: 20px;
$m-window-padding-h: 30px;
$m-window-padding-w-mobile: 10px;
@ -46,7 +46,7 @@ $m-anim-speed: 400ms;
}
&-fade {
background: linear-gradient(to bottom, #fff0, #fff);
background: linear-gradient(to bottom, transparent, $m-background);
position: fixed;
height: 25px;
width: calc(100% - 3rem);
@ -82,6 +82,10 @@ $m-anim-speed: 400ms;
opacity: 0.3;
transition: opacity 120ms;
@include theme(dark) {
filter: invert(1);
}
&:hover {
opacity: 0.87;
}

View File

@ -35,13 +35,13 @@
&-light {
& .path {
stroke: white;
stroke: color(loader-light);
}
}
&-dark {
& .path {
stroke: $ether-navy;
stroke: color(loader-dark);
}
}
}

View File

@ -33,8 +33,7 @@ $option-width-main-small: 100%;
position: absolute;
top: 50%;
right: .75rem;
// transform: translateY(-50%);
@include triangle(8px, $text-color, down);
@include triangle(8px, color(text-color), down);
}
}
}
@ -52,7 +51,7 @@ $option-width-main-small: 100%;
width: calc(100vw - 30px);
max-width: $menu-max-width;
padding: $menu-padding;
background: #FFF;
background: color(control-bg);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
border-radius: 4px;
font-size: 0.8rem;
@ -64,7 +63,7 @@ $option-width-main-small: 100%;
right: $menu-offset + 40px;
width: $menu-triangle-size;
height: $menu-triangle-size;
background: #FFF;
background: color(control-bg);
box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
transform: rotate(45deg);
}
@ -80,8 +79,8 @@ $option-width-main-small: 100%;
max-width: $option-width;
padding: $space-sm $space-md;
text-align: left;
background: rgba($brand-info, 0);
color: $text-color;
background: transparent;
color: color(text-color);
transition: $transition;
@media (max-width: $screen-sm) {
@ -90,8 +89,8 @@ $option-width-main-small: 100%;
}
&:hover {
color: #FFF;
background: rgba($brand-info, 0.9);
color: color(text-color-inverted);
background: color(brand-info);
}
&-top {

View File

@ -8,7 +8,7 @@
top: 0;
left: 50%;
width: 220px;
color: #FFF;
color: color(tooltip-color);
font-size: $font-size-small;
font-family: $font-family-sans-serif;
pointer-events: none;
@ -22,7 +22,7 @@
> span {
display: inline-block;
background: $tooltip-bg;
background: color(tooltip-bg);
border-radius: 3px;
padding: 6px 10px;
@ -32,7 +32,7 @@
bottom: 0;
left: 50%;
transform: translate(-50%, 100%);
@include triangle($tooltip-arrow-size * 2, $tooltip-bg, down);
@include triangle($tooltip-arrow-size * 2, color(tooltip-bg), down);
}
}
@ -78,7 +78,7 @@
left: auto;
transform: translate(100%, 50%);
border-top-color: transparent;
border-left-color: $tooltip-bg;
border-left-color: color(tooltip-bg);
}
}
@ -94,7 +94,7 @@
left: 0;
transform: translate(-100%, 50%);
border-top-color: transparent;
border-right-color: $tooltip-bg;
border-right-color: color(tooltip-bg);
}
}
@ -108,7 +108,7 @@
top: 0;
transform: translate(-50%, -100%);
border-top-color: transparent;
border-bottom-color: $tooltip-bg;
border-bottom-color: color(tooltip-bg);
}
}
}

View File

@ -104,3 +104,8 @@ export const walletNames = getValues(
);
export type WalletName = SecureWalletName | InsecureWalletName | MiscWalletName;
export enum Theme {
DARK = 'dark',
LIGHT = 'light'
}

View File

@ -15,7 +15,7 @@
text-align: center;
margin-top: -$space * 1.5;
margin-bottom: $space * 2;
color: $gray;
color: color(gray);
}
&-body {

View File

@ -4,7 +4,7 @@
.WelcomeSlide {
&-alert {
display: flex;
border-top: 2px solid $brand-danger;
border-top: 2px solid color(brand-danger);
padding: $space-sm;
font-size: $font-size-base;
line-height: 1.5;
@ -21,7 +21,7 @@
margin-right: $space * 0.8;
text-align: center;
font-size: 32px;
color: $brand-danger;
color: color(brand-danger);
}
}
}

View File

@ -14,8 +14,8 @@
&-sidebar {
width: $electron-sidebar-width;
overflow-x: hidden;
background: #FFF;
border-right: 1px solid $gray-lighter;
background: color(control-bg);
border-right: 1px solid color(gray-lighter);
}
&-content {

View File

@ -17,6 +17,10 @@
font-size: $font-size-bump;
box-shadow: 0 1px rgba(#fff, 0.4);
@include theme(dark) {
background: color(tooltip-bg);
}
&:first-child {
margin-top: 0;
}

View File

@ -18,7 +18,7 @@
opacity: 0.8;
.fa-ban {
color: $brand-danger;
color: color(brand-danger);
animation: ban-wifi 500ms ease 200ms 1;
animation-fill-mode: both;
}

View File

@ -11,7 +11,7 @@
display: block;
margin: $space-sm 0;
text-align: center;
color: $gray-light;
color: shade-dark(0.3);
}
}
}

View File

@ -92,7 +92,10 @@ class TxHashInput extends React.Component<Props, State> {
</p>
)}
<button className="TxHashInput-submit btn btn-primary btn-block">
<button
className="TxHashInput-submit btn btn-primary btn-block"
disabled={!isValidTxHash(hash)}
>
{translate('NAV_CHECKTXSTATUS')}
</button>
</form>

View File

@ -18,7 +18,7 @@
display: inline-block;
width: 86px;
margin: 0 25px;
color: $text-color;
color: color(text-color);
opacity: 0.8;
transition: opacity 100ms ease;

View File

@ -53,7 +53,7 @@ $step-number-size: 42px;
top: 0;
left: 0;
bottom: 0;
background: #EEE;
background: color(gray-lighter);
border-radius: 4px;
box-shadow: 0 1px 3px rgba(#000, 0.3);
}
@ -68,8 +68,8 @@ $step-number-size: 42px;
font-size: 22px;
color: #FFF;
text-align: center;
background: $ether-navy;
box-shadow: 0 1px 2px rgba(#000, .3);
background: color(brand-info);
box-shadow: 0 1px 2px rgba(#000, 0.3);
border-radius: 100%;
}
}

View File

@ -6,10 +6,10 @@ $number-margin: 6px;
@keyframes word-fade {
0% {
color: rgba($text-color, 0);
opacity: 0;
}
100% {
color: rgba($text-color, 1);
opacity: 1;
}
}
@ -47,14 +47,14 @@ $number-margin: 6px;
top: -4px;
left: -7px;
z-index: 1;
color: #fff;
color: color(text-color-inverted);
width: 26px;
height: 26px;
border-radius: 100%;
background: linear-gradient(
to top,
lighten($brand-success, 10%),
lighten($brand-success, 5%)
color(brand-success),
color(brand-success-light)
);
line-height: 24px;
}

View File

@ -14,7 +14,7 @@
top: 36px;
left: 30px;
opacity: 0.3;
color: $text-color;
color: color(text-color);
@media (max-width: $screen-sm) {
display: none;
@ -27,7 +27,7 @@
&:hover,
&:focus {
opacity: 0.8;
color: $text-color;
color: color(text-color);
}
&:active {

View File

@ -1,4 +1,5 @@
@import 'common/sass/variables';
@import 'common/sass/mixins';
$divider-size: 60px;
@ -32,10 +33,10 @@ $divider-size: 60px;
&-divider {
position: relative;
margin: 3rem auto 4rem;
background: #fff;
background: color(pane-bg);
font-size: 1.8rem;
font-weight: 300;
color: $gray-light;
color: shade-dark(0.4);
@media (max-width: $screen-xs) {
margin: 1.5rem auto 2.5rem;
@ -49,7 +50,7 @@ $divider-size: 60px;
left: 50%;
width: calc(50% - 2rem);
max-width: 600px;
background: rgba($gray-light, 0.4);
background: shade-dark(0.1);
height: 1px;
}
@ -78,7 +79,7 @@ $divider-size: 60px;
}
&-desc {
color: $gray;
color: shade-dark(0.5);
@media (max-width: $screen-xs) {
font-size: $font-size-small;
@ -91,9 +92,9 @@ $divider-size: 60px;
.WalletType {
display: flex;
flex-direction: column;
border: 1px solid $gray-lighter;
border: 1px solid shade-dark(0.12);
box-shadow: 0 3px 2px rgba(0, 0, 0, 0.12);
background: #fff;
background: color(control-bg);
border-radius: 4px;
transition: transform 100ms ease, box-shadow 100ms ease;
@ -104,17 +105,12 @@ $divider-size: 60px;
}
.WalletSuggestion {
display: flex;
flex-direction: column;
flex: 1;
max-width: 340px;
min-width: 300px;
margin: 0 $space $space * 2;
padding: $space;
border: 1px solid $gray-lighter;
box-shadow: 0 3px 2px rgba(0, 0, 0, 0.12);
border-radius: 4px;
transition: transform 100ms ease, box-shadow 100ms ease;
border-top: 3px solid;
&.is-hardware {
@ -127,10 +123,14 @@ $divider-size: 60px;
&.is-parity {
border-top-color: #444;
@include theme(dark) {
border-top-color: #FFF;
}
}
&.is-generate {
border-top-color: $brand-danger;
border-top-color: color(brand-danger);
}
@media (max-width: $screen-sm) {
@ -157,6 +157,10 @@ $divider-size: 60px;
height: 28px;
margin-right: $space-md;
opacity: 0.8;
@include theme(dark) {
filter: invert(1);
}
}
}
@ -169,7 +173,7 @@ $divider-size: 60px;
}
.is-danger {
color: $brand-danger;
color: color(brand-danger);
}
}

View File

@ -3,7 +3,7 @@
.ScheduleFields {
padding: 0 20px 20px 20px;
border: 1px solid #e5ecf3;
border: 1px solid color(control-border);
&-title {
margin-top: -10px;
@ -18,7 +18,7 @@
max-width: 160px;
width: 100%;
height: 32px;
background-image: url(~assets/images/chronologic-logo.svg);
background-image: url('~assets/images/chronologic-logo.svg');
background-repeat: no-repeat;
display: block;
background-size: cover;

View File

@ -7,10 +7,12 @@ $identicon-size-mobile: 24px;
.RecentTx {
line-height: $identicon-size;
border: 1px solid $gray-lighter;
cursor: pointer;
transition: box-shadow $hover-speed ease;
box-shadow: 0 0 $brand-primary inset;
box-shadow: 0 1px shade-dark(0.1),
1px 0 shade-dark(0.1),
-1px 0 shade-dark(0.1),
0 0 color(brand-primary) inset;
&-to {
width: 100%;
@ -40,11 +42,14 @@ $identicon-size-mobile: 24px;
}
&:hover {
box-shadow: 3px 0 $brand-primary inset;
box-shadow: 0 1px shade-dark(0.1),
1px 0 shade-dark(0.1),
-1px 0 shade-dark(0.1),
3px 0 color(brand-primary) inset;
.RecentTx-arrow {
opacity: 1;
color: $brand-primary;
color: color(brand-primary);
transform: translateX(3px);
}
}

View File

@ -18,7 +18,7 @@
thead {
font-size: $font-size-bump-more;
border-bottom: 2px solid $gray-lighter;
border-bottom: 2px solid shade-dark(0.1);
td {
padding-top: $space-xs;
@ -60,6 +60,6 @@
margin: $space * 2 auto 0;
font-size: $font-size-small;
text-align: center;
color: $gray-light;
color: shade-dark(0.5);
}
}

View File

@ -12,7 +12,7 @@
left: 0;
right: 0;
bottom: 0;
background: $gray-light;
background: color(gray-light);
&, &-icon {
transition: 100ms ease;
@ -30,8 +30,6 @@
}
&:hover {
background: lighten($gray-light, 2%);
.WalletInfo-qr-cover-icon {
opacity: 1;
}

View File

@ -12,7 +12,15 @@
&-logo {
display: block;
margin: 0 auto $space;
max-width: 360px;
height: 100px;
background-image: url('~assets/images/logo-mycrypto-transparent.svg');
background-position: center;
background-size: auto 100%;
background-repeat: no-repeat;
@include theme(dark) {
background-image: url('~assets/images/logo-mycrypto.svg');
}
}
&-about {
@ -25,8 +33,7 @@
&-link {
margin: 0 .45rem;
color: $text-color;
opacity: 0.3;
color: shade-dark(0.4);
&:hover {
opacity: 1;
@ -44,14 +51,14 @@
&-text {
margin: 0 $space-sm;
color: $gray-light;
color: shade-dark(0.4);
font-size: $font-size-xs-bump;
a {
color: $gray-light;
color: shade-dark(0.4);
&:hover {
color: $gray-darker;
color: color(link-hover-color);
}
}
}
@ -70,6 +77,8 @@
text-align: center;
&-type {
margin-bottom: $space-md;
&-currency {
display: flex;
justify-content: center;
@ -98,8 +107,8 @@
&-address {
display: block;
padding: $space-xs $space-sm;
background: $gray-lightest;
border: 1px solid $gray-lighter;
background: shade-dark(0.06);
border: 1px solid shade-dark(0.12);
font-size: $font-size-xs;
border-radius: 4px;
word-wrap: break-word;

View File

@ -8,7 +8,6 @@ import {
VERSION
} from 'config';
import translate from 'translations';
import logo from 'assets/images/logo-mycrypto-transparent.svg';
import TabSection from 'containers/TabSection';
import DisclaimerModal from 'components/DisclaimerModal';
import { NewTabLink } from 'components/ui';
@ -32,7 +31,7 @@ export default class SupportPage extends React.Component<{}, State> {
<div className="row">
<div className="col-xs-12">
<div className="SupportPage-mycrypto Tab-content-pane">
<img className="SupportPage-mycrypto-logo" src={logo} />
<div className="SupportPage-mycrypto-logo" />
<p className="SupportPage-mycrypto-about">{translate('FOOTER_ABOUT')}</p>
<div className="SupportPage-mycrypto-social">

View File

@ -1,6 +1,21 @@
@import 'common/sass/variables';
@import 'common/sass/mixins';
.BitcoinQR {
&-qr {
max-width: 17rem;
max-width: 13rem;
margin: auto;
@include theme(dark) {
background: #FFF;
padding: 10px;
border-radius: 4px;
}
canvas {
display: block;
width: 100% !important;
height: auto !important;
}
}
}

View File

@ -15,15 +15,11 @@ export default class BitcoinQR extends PureComponent<Props, {}> {
return (
<div className="BitcoinQR">
<section className="row block swap-address text-center">
<label>{translate('X_ADDRESS')}</label>
<div className="BitcoinQR-qr">
<QRCode value={`bitcoin:${paymentAddress}amount=${destinationAmount}`} />
</div>
<br />
<p className="text-danger">{translate('SWAP_TIME_LIMIT_WARNING')}</p>
{translate('SWAP_RECOMMENDED_TX_FEES', {
$link: 'https://shapeshift.io/#/btcfee'
})}
<p className="BitcoinQR-warning text-danger">{translate('SWAP_TIME_LIMIT_WARNING')}</p>
</section>
</div>
);

View File

@ -19,7 +19,7 @@
&-error-message {
display: block;
min-height: 25px;
color: $brand-danger;
color: color(brand-danger);
text-align: left;
}
&-inner-wrap {

View File

@ -1,5 +1,5 @@
@import "common/sass/variables";
@import "common/sass/mixins";
@import 'common/sass/variables';
@import 'common/sass/mixins';
.SwapRates {
margin-bottom: $space;
@ -12,9 +12,13 @@
&-panel {
position: relative;
margin: 0 auto 0;
background: linear-gradient(150deg, $brand-primary, $ether-navy);
background: linear-gradient(150deg, color(brand-primary), color(brand-info));
@include mono;
@include theme(dark) {
background: linear-gradient(150deg, color(gray), color(gray-light));
}
&-side {
display: flex;
flex-direction: column;

View File

@ -3,6 +3,7 @@
.SwapPayment {
text-align: center;
margin-bottom: $space;
&-address {
display: block;

View File

@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { Input } from 'components/ui';
import { objectContainsObjectKeys } from 'utils/helpers';
import { toFixedIfLarger } from 'utils/formatters';
import { NormalizedRates, ProviderName } from 'features/swap/types';
@ -24,11 +25,13 @@ export const RateInput: React.SFC<RateInputProps> = ({
}) => {
return amount || amount === 0 || amount === '' ? (
<div className="SwapRates-panel-rate">
<input
<Input
className="SwapRates-panel-rate-input"
onChange={onChange}
value={amount}
name={pair}
isValid={true}
type="number"
/>
<span className="SwapRates-panel-rate-amount">
{` ${origin} = ${toFixedIfLarger(+amount * rate, 6)} ${destination}`}

View File

@ -1,8 +1,31 @@
@import 'common/sass/mixins';
.SupportFooter {
text-align: center;
padding-top: 80px;
&-button {
@include theme(dark) {
background: shade-dark(0.1);
}
}
&-fallback {
padding: 20px 0;
cursor: pointer;
&-button {
@include reset-button;
display: block;
margin: 0 auto 10px;
opacity: 0.3;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
textarea {
max-width: 35rem;
margin: auto;

View File

@ -35,7 +35,9 @@ class SupportFooter extends React.PureComponent<Props, {}> {
const pair = origin && destination ? origin.label + destination.label : 'BTCETH';
const rates = provider === 'shapeshift' ? shapeshiftRates.byId : bityRates.byId;
const emailTo =
provider === 'shapeshift' ? 'support@mycrypto.com' : 'support@mycrypto.com,mew@bity.com';
provider === 'shapeshift'
? 'support@shapeshift.zendesk.com,support@mycrypto.com'
: 'support@mycrypto.com,mew@bity.com';
const mailSubject = encodeURI('Issue regarding my Swap via MyCrypto');
const serviceProvider = provider.charAt(0).toUpperCase() + provider.slice(1);
let mailBody;
@ -71,7 +73,7 @@ Rate: ${rates[pair].rate} ${origin.label}/${destination.label}`;
return (
<section className="SupportFooter">
<a
className="btn-warning btn-sm"
className="SupportFooter-button btn-warning btn-sm"
href={`mailto:${emailTo}?Subject=${mailSubject}&Body=${mailBody}`}
target="_blank"
rel="noopener noreferrer"
@ -79,9 +81,9 @@ Rate: ${rates[pair].rate} ${origin.label}/${destination.label}`;
{translate('SWAP_SUPPORT')}
</a>
<div className="SupportFooter-fallback">
<p onClick={this.toggleFallback}>
<button className="SupportFooter-fallback-button" onClick={this.toggleFallback}>
<small>{translate('SWAP_SUPPORT_LINK_BROKEN')}</small>
</p>
</button>
{open ? (
<TextArea
isValid={true}

View File

@ -12,12 +12,10 @@ $top-height: 40px;
@include reset-button;
line-height: $top-height;
font-size: $font-size-small;
color: $gray-light;
opacity: 0.7;
color: shade-dark(0.3);
&:hover {
color: $gray-dark;
opacity: 1;
color: shade-dark(0.6);
}
.fa {
@ -50,7 +48,7 @@ $top-height: 40px;
min-height: 100px;
text-align: center;
padding: 1.2rem 0;
color: #fff;
color: color(text-color-inverted);
&:nth-child(4n + 1) {
background-color: #175575;

View File

@ -4,7 +4,7 @@
$circle-width: 4rem;
$circle-width-phone: 3rem;
$track-size: .25rem;
$step-colors: (1: #1e92ba, 2: #175575, 3: #19b3ae, 4: #143955, 5: #1e92ba);
$track-color: shade-dark(0.2);
.SwapProgress {
margin-top: 2rem;
@ -14,11 +14,11 @@ $step-colors: (1: #1e92ba, 2: #175575, 3: #19b3ae, 4: #143955, 5: #1e92ba);
&-track {
position: absolute;
top: 3.5rem;
left: $cont-padding-lg;
right: $cont-padding-lg;
top: 3.4rem;
left: 10%;
right: 10%;
height: $track-size;
background-color: $gray-lighter;
background-color: $track-color;
}
&-item {
@ -36,27 +36,22 @@ $step-colors: (1: #1e92ba, 2: #175575, 3: #19b3ae, 4: #143955, 5: #1e92ba);
padding-bottom: $circle-width;
position: relative;
width: $circle-width;
background: white;
color: $gray;
border-color: $gray;
@each $idx, $color in $step-colors {
&.position-#{$idx} {
border-color: fade-out($color, 0.6);
color: fade-out($color, 0.6);
background: color(pane-bg);
color: $track-color;
border-color: $track-color;
.is-active & {
border-color: $color;
color: $color;
}
}
border-color: color(brand-primary);
color: color(brand-primary);
}
.is-complete & {
border-color: $brand-success;
background: $brand-success;
box-shadow: inset 0px 0px 0px $space-xs white;
color: #fff;
border-color: color(brand-success);
background: color(brand-success);
box-shadow: inset 0px 0px 0px $space-xs color(control-bg);
color: color(text-color-inverted);
}
&-number {
@ -84,7 +79,7 @@ $step-colors: (1: #1e92ba, 2: #175575, 3: #19b3ae, 4: #143955, 5: #1e92ba);
font-size: $font-size-small;
font-weight: 600;
text-transform: uppercase;
color: fade-out(lighten($gray, 10%), 0.5);
color: shade-dark(0.2);
letter-spacing: .1em;
small {
@ -93,11 +88,11 @@ $step-colors: (1: #1e92ba, 2: #175575, 3: #19b3ae, 4: #143955, 5: #1e92ba);
}
.is-active & {
color: lighten($gray, 10%);
color: shade-dark(0.7);
}
.is-complete & {
color: $brand-success;
color: color(brand-success);
}
}
}

View File

@ -4,8 +4,10 @@ import {
SetLatestBlockAction,
SetOfflineAction,
SetOnlineAction,
ToggleAutoGasLimitAction
ToggleAutoGasLimitAction,
ChangeThemeAction
} from './types';
import { Theme } from 'config';
export function setOnline(): SetOnlineAction {
return {
@ -34,6 +36,14 @@ export function changeLanguage(sign: string): ChangeLanguageAction {
};
}
export type TChangeTheme = typeof changeTheme;
export function changeTheme(theme: Theme): ChangeThemeAction {
return {
type: CONFIG_META.THEME_CHANGE,
payload: theme
};
}
export type TSetLatestBlock = typeof setLatestBlock;
export function setLatestBlock(payload: string): SetLatestBlockAction {
return {

View File

@ -6,13 +6,15 @@ import {
setLatestBlock
} from './actions';
import { metaReducer } from './reducer';
import { Theme } from 'config';
describe('meta reducer', () => {
const expectedInitialState = {
languageSelection: 'en',
offline: false,
autoGasLimit: true,
latestBlock: '???'
latestBlock: '???',
theme: Theme.LIGHT
};
const expectedState = {

View File

@ -2,15 +2,18 @@ import {
CONFIG_META,
ChangeLanguageAction,
SetLatestBlockAction,
ChangeThemeAction,
MetaAction,
MetaState
} from './types';
import { Theme } from 'config';
const META_INITIAL_STATE: MetaState = {
languageSelection: 'en',
offline: false,
autoGasLimit: true,
latestBlock: '???'
latestBlock: '???',
theme: Theme.LIGHT
};
function changeLanguage(state: MetaState, action: ChangeLanguageAction): MetaState {
@ -48,6 +51,13 @@ function setLatestBlock(state: MetaState, action: SetLatestBlockAction): MetaSta
};
}
function setTheme(state: MetaState, action: ChangeThemeAction): MetaState {
return {
...state,
theme: action.payload
};
}
export function metaReducer(state: MetaState = META_INITIAL_STATE, action: MetaAction): MetaState {
switch (action.type) {
case CONFIG_META.LANGUAGE_CHANGE:
@ -64,6 +74,9 @@ export function metaReducer(state: MetaState = META_INITIAL_STATE, action: MetaA
case CONFIG_META.SET_LATEST_BLOCK:
return setLatestBlock(state, action);
case CONFIG_META.THEME_CHANGE:
return setTheme(state, action);
default:
return state;
}

View File

@ -21,6 +21,10 @@ export function getLanguageSelection(state: AppState): string {
return getMeta(state).languageSelection;
}
export function getTheme(state: AppState) {
return getMeta(state).theme;
}
export function getLatestBlock(state: AppState) {
return getMeta(state).latestBlock;
}

View File

@ -1,10 +1,13 @@
import { Theme } from 'config';
export enum CONFIG_META {
LANGUAGE_CHANGE = 'CONFIG_META_LANGUAGE_CHANGE',
SET_ONLINE = 'CONFIG_META_SET_ONLINE',
SET_OFFLINE = 'CONFIG_META_SET_OFFLINE',
TOGGLE_OFFLINE = 'CONFIG_META_TOGGLE_OFFLINE',
TOGGLE_AUTO_GAS_LIMIT = 'CONFIG_META_TOGGLE_AUTO_GAS_LIMIT',
SET_LATEST_BLOCK = 'CONFIG_META_SET_LATEST_BLOCK'
SET_LATEST_BLOCK = 'CONFIG_META_SET_LATEST_BLOCK',
THEME_CHANGE = 'CONFIG_THEME_CHANGE'
}
export interface MetaState {
@ -12,6 +15,7 @@ export interface MetaState {
offline: boolean;
autoGasLimit: boolean;
latestBlock: string;
theme: Theme;
}
export interface SetLatestBlockAction {
@ -36,9 +40,15 @@ export interface ChangeLanguageAction {
payload: string;
}
export interface ChangeThemeAction {
type: CONFIG_META.THEME_CHANGE;
payload: Theme;
}
export type MetaAction =
| ChangeLanguageAction
| SetOnlineAction
| SetOfflineAction
| ToggleAutoGasLimitAction
| SetLatestBlockAction;
| SetLatestBlockAction
| ChangeThemeAction;

View File

@ -3,7 +3,7 @@ import { loadStatePropertyOrEmptyObject } from 'utils/localStorage';
import { CustomNodeConfig } from 'types/node';
import { shepherd, makeProviderConfig, isAutoNode } from 'libs/nodes';
import RootReducer, { AppState } from './reducers';
import { getLanguageSelection } from './config/meta/selectors';
import { getLanguageSelection, getTheme } from './config/meta/selectors';
import { getCustomNetworkConfigs } from './config/networks/custom/selectors';
import { isStaticNetworkId } from './config/networks/static/selectors';
import { isStaticNodeId } from './config/nodes/static/selectors';
@ -21,7 +21,10 @@ export function getConfigAndCustomTokensStateToSubscribe(
state: AppState
): Pick<DeepPartial<AppState>, 'config' | 'customTokens'> {
const subscribedConfig: DeepPartial<ConfigState> = {
meta: { languageSelection: getLanguageSelection(state) },
meta: {
languageSelection: getLanguageSelection(state),
theme: getTheme(state)
},
nodes: { customNodes: getCustomNodeConfigs(state), selectedNode: getSelectedNode(state) },
networks: {
customNetworks: getCustomNetworkConfigs(state)

View File

@ -37,14 +37,14 @@
right: 0;
bottom: 0;
overflow: auto;
background: $brand-info;
background: color(brand-info);
z-index: $zindex-top;
&-content {
max-width: 580px;
padding: 20px;
margin: 0 auto;
color: #fff;
color: color(text-color-inverted);
text-shadow: 1px 1px 1px rgba(#000, 0.12);
overflow: auto;
@ -58,7 +58,7 @@
margin-bottom: 15px;
a {
color: #fff;
color: color(text-color-inverted);
text-decoration: underline;
}
}
@ -111,3 +111,9 @@
@mixin input-focus-shadow($color) {
box-shadow: inset 0 1px 2px rgba(black, 0.125), 0 0 1px rgba($color, 0.5);
}
@mixin theme($name) {
.theme--#{$name} & {
@content;
}
}

View File

@ -10,12 +10,8 @@
@import '~bootstrap-sass/assets/stylesheets/bootstrap/code';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/grid';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/tables';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/forms';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/buttons';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/dropdowns';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/button-groups';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/input-groups';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/alerts';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/wells';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/close';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/utilities';
@ -39,6 +35,10 @@
@import './styles/flexbox';
@import './styles/helpers';
@import './styles/code';
@import './styles/buttons';
@import './styles/forms';
@import './styles/alerts';
@import './styles/themes';
@import './fonts';
[data-whatintent='mouse'] *:focus {

Some files were not shown because too many files have changed in this diff Show More