diff --git a/ui/.env.example b/ui/.env.example index f61eaa8f..e1b7dcc2 100644 --- a/ui/.env.example +++ b/ui/.env.example @@ -38,5 +38,6 @@ UI_PORT=3000 # RSK #UI_DESCRIPTION=The TokenBridge serves as a method of transferring Bancor Network tokens between the Ethereum network and the Rootstock network in a quick and cost-efficient manner. -# To use Ethereum-classic styles -#UI_STYLES=classic +# To use Ethereum-classic styles: classic +# To use STAKE styles: stake +#UI_STYLES=stake diff --git a/ui/public/favicon.ico b/ui/public/favicon.ico deleted file mode 100644 index a11777cc..00000000 Binary files a/ui/public/favicon.ico and /dev/null differ diff --git a/ui/public/favicons/classic.ico b/ui/public/favicons/classic.ico new file mode 100644 index 00000000..e5a11985 Binary files /dev/null and b/ui/public/favicons/classic.ico differ diff --git a/ui/public/favicons/core.ico b/ui/public/favicons/core.ico new file mode 100644 index 00000000..e5a11985 Binary files /dev/null and b/ui/public/favicons/core.ico differ diff --git a/ui/public/favicons/manifest.json b/ui/public/favicons/manifest.json index 25126387..17b3c4b2 100755 --- a/ui/public/favicons/manifest.json +++ b/ui/public/favicons/manifest.json @@ -15,4 +15,4 @@ "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone" -} \ No newline at end of file +} diff --git a/ui/public/favicons/stake.ico b/ui/public/favicons/stake.ico new file mode 100644 index 00000000..91bb4677 Binary files /dev/null and b/ui/public/favicons/stake.ico differ diff --git a/ui/public/index.html b/ui/public/index.html index a8c83066..fea3402b 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -10,9 +10,8 @@ - - + TokenBridge UI app diff --git a/ui/scripts/selectTheme.js b/ui/scripts/selectTheme.js index 94b13fb1..2fda6661 100644 --- a/ui/scripts/selectTheme.js +++ b/ui/scripts/selectTheme.js @@ -6,12 +6,7 @@ const fs = require('fs') const stylePath = path.resolve(__dirname, '..', 'src', 'assets', 'stylesheets') const destinationFilename = 'application.css' -let filename - -if (process.env.UI_STYLES === 'classic') { - filename = 'application.classic.css' -} else { - filename = 'application.core.css' -} +const theme = process.env.UI_STYLES || 'core' +const filename = `application.${theme}.css` fs.copyFileSync(path.resolve(stylePath, filename), path.resolve(stylePath, destinationFilename)) diff --git a/ui/src/assets/images/themes/core/transparent.png b/ui/src/assets/images/themes/core/transparent.png new file mode 100644 index 00000000..f38e9f91 Binary files /dev/null and b/ui/src/assets/images/themes/core/transparent.png differ diff --git a/ui/src/assets/images/themes/stake/background/bg-pattern.svg b/ui/src/assets/images/themes/stake/background/bg-pattern.svg new file mode 100644 index 00000000..c8eeeb0b --- /dev/null +++ b/ui/src/assets/images/themes/stake/background/bg-pattern.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/bridge/arrow.svg b/ui/src/assets/images/themes/stake/bridge/arrow.svg new file mode 100644 index 00000000..c229bd5c --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/bridge/center-image-pointing-down@2x.png b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-down@2x.png new file mode 100644 index 00000000..ae04b643 Binary files /dev/null and b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-down@2x.png differ diff --git a/ui/src/assets/images/themes/stake/bridge/center-image-pointing-left.svg b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-left.svg new file mode 100644 index 00000000..d8531af7 --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/bridge/center-image-pointing-right.svg b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-right.svg new file mode 100644 index 00000000..d8531af7 --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/center-image-pointing-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/bridge/close.svg b/ui/src/assets/images/themes/stake/bridge/close.svg new file mode 100644 index 00000000..b5113b5c --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/bridge/pattern-1.png b/ui/src/assets/images/themes/stake/bridge/pattern-1.png new file mode 100644 index 00000000..40a09fd2 Binary files /dev/null and b/ui/src/assets/images/themes/stake/bridge/pattern-1.png differ diff --git a/ui/src/assets/images/themes/stake/bridge/pattern-2.png b/ui/src/assets/images/themes/stake/bridge/pattern-2.png new file mode 100644 index 00000000..d2a8c8c7 Binary files /dev/null and b/ui/src/assets/images/themes/stake/bridge/pattern-2.png differ diff --git a/ui/src/assets/images/themes/stake/bridge/transfer-ellipse.svg b/ui/src/assets/images/themes/stake/bridge/transfer-ellipse.svg new file mode 100644 index 00000000..221ba68b --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/transfer-ellipse.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/bridge/transfer-line.svg b/ui/src/assets/images/themes/stake/bridge/transfer-line.svg new file mode 100644 index 00000000..647c291c --- /dev/null +++ b/ui/src/assets/images/themes/stake/bridge/transfer-line.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/logos/footer-logo.svg b/ui/src/assets/images/themes/stake/logos/footer-logo.svg new file mode 100644 index 00000000..7a28a85e --- /dev/null +++ b/ui/src/assets/images/themes/stake/logos/footer-logo.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/logos/logo-foreign-modal.svg b/ui/src/assets/images/themes/stake/logos/logo-foreign-modal.svg new file mode 100644 index 00000000..4f039da2 --- /dev/null +++ b/ui/src/assets/images/themes/stake/logos/logo-foreign-modal.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/logos/logo-foreign.svg b/ui/src/assets/images/themes/stake/logos/logo-foreign.svg new file mode 100644 index 00000000..fe89487e --- /dev/null +++ b/ui/src/assets/images/themes/stake/logos/logo-foreign.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/src/assets/images/themes/stake/logos/logo-home-modal.png b/ui/src/assets/images/themes/stake/logos/logo-home-modal.png new file mode 100644 index 00000000..d08842a8 Binary files /dev/null and b/ui/src/assets/images/themes/stake/logos/logo-home-modal.png differ diff --git a/ui/src/assets/images/themes/stake/logos/logo-home.png b/ui/src/assets/images/themes/stake/logos/logo-home.png new file mode 100644 index 00000000..592ad424 Binary files /dev/null and b/ui/src/assets/images/themes/stake/logos/logo-home.png differ diff --git a/ui/src/assets/images/themes/stake/logos/logo-loading.svg b/ui/src/assets/images/themes/stake/logos/logo-loading.svg new file mode 100644 index 00000000..98983325 --- /dev/null +++ b/ui/src/assets/images/themes/stake/logos/logo-loading.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ui/src/assets/images/themes/stake/logos/logo.svg b/ui/src/assets/images/themes/stake/logos/logo.svg new file mode 100644 index 00000000..3ebf1fb8 --- /dev/null +++ b/ui/src/assets/images/themes/stake/logos/logo.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/status/authority/logo-0.svg b/ui/src/assets/images/themes/stake/status/authority/logo-0.svg new file mode 100644 index 00000000..941e0454 --- /dev/null +++ b/ui/src/assets/images/themes/stake/status/authority/logo-0.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/status/authority/logo-1.svg b/ui/src/assets/images/themes/stake/status/authority/logo-1.svg new file mode 100644 index 00000000..2f65823e --- /dev/null +++ b/ui/src/assets/images/themes/stake/status/authority/logo-1.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/status/authority/logo-2.svg b/ui/src/assets/images/themes/stake/status/authority/logo-2.svg new file mode 100644 index 00000000..5db79f88 --- /dev/null +++ b/ui/src/assets/images/themes/stake/status/authority/logo-2.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/assets/images/themes/stake/transparent.png b/ui/src/assets/images/themes/stake/transparent.png new file mode 100644 index 00000000..f38e9f91 Binary files /dev/null and b/ui/src/assets/images/themes/stake/transparent.png differ diff --git a/ui/src/assets/stylesheets/application.stake.scss b/ui/src/assets/stylesheets/application.stake.scss new file mode 100644 index 00000000..1d2698f8 --- /dev/null +++ b/ui/src/assets/stylesheets/application.stake.scss @@ -0,0 +1,3 @@ +@import "helpers/variables"; +@import "themes/stake"; +@import "base-imports"; diff --git a/ui/src/assets/stylesheets/application/_base.scss b/ui/src/assets/stylesheets/application/_base.scss index 15c22666..3e056658 100644 --- a/ui/src/assets/stylesheets/application/_base.scss +++ b/ui/src/assets/stylesheets/application/_base.scss @@ -80,6 +80,7 @@ strong { } .separator { + display: $separator-display; background-color: $separator-color; height: 51px; width: 1px; @@ -102,3 +103,7 @@ strong { display: inherit; } } + +.swal-button { + background-color: $base-button-bg-color; +} diff --git a/ui/src/assets/stylesheets/application/_bridge.scss b/ui/src/assets/stylesheets/application/_bridge.scss index 46d6ca7d..935d4750 100644 --- a/ui/src/assets/stylesheets/application/_bridge.scss +++ b/ui/src/assets/stylesheets/application/_bridge.scss @@ -26,6 +26,10 @@ height: 80px; width: 960px; + &-stake { + display: none + } + @media screen and (max-width: $tablet-width) { display: none } @@ -66,6 +70,10 @@ height: 80px; width: 960px; + &-stake { + display: none + } + @media screen and (max-width: $tablet-width) { display: none } @@ -116,7 +124,7 @@ } } .bridge-transfer { - height: 276px; + height: $form-container-height; display: flex; justify-content: center; @@ -125,6 +133,11 @@ } .left-image-wrapper { background-color: $bridge-gradient-start; + + &-stake { + display: none + } + .left-image { background-color: $main-background-color; background-image: url('#{ $bridge-image-left }'); @@ -144,6 +157,11 @@ .right-image-wrapper { background-color: $bridge-gradient-end; + + &-stake { + display: none + } + .right-image { background-color: $main-background-color; background-image: url('#{ $bridge-image-right }'); @@ -168,7 +186,13 @@ display: flex; flex-shrink: 0; flex-wrap: wrap; - width: 880px; + width: $bridge-transfer-width; + + &-stake { + border: 1px solid #E6ECF1; + box-sizing: border-box; + border-radius: 10px; + } @media screen and (max-width: $tablet-width) { border-radius: 8px; @@ -180,7 +204,7 @@ display: flex; flex-shrink: 0; flex-wrap: wrap; - width: 880px; + width: $bridge-transfer-width; @media screen and (max-width: $tablet-width) { background-image: url('#{ $bridge-image-center-pointing-down }'); @@ -196,9 +220,9 @@ align-items: flex-start; display: flex; flex-direction: column; - height: 136px; - justify-content: space-evenly; - padding: 70px 1% 70px 5%; + height: $network-container-height; + justify-content: $network-container-justify-content; + padding: $network-container-padding; width: 22%; @media screen and (max-width: $tablet-width) { @@ -207,15 +231,16 @@ height: 136px; padding: 5px 0 5px 0; width: auto; + justify-content: space-around; } } .network-container-foreign { align-items: flex-end; display: flex; flex-direction: column; - height: 136px; - justify-content: space-evenly; - padding: 70px 5% 70px 1%; + height: $network-container-height; + justify-content: $network-container-justify-content; + padding: $network-container-padding-foreign; width: 22%; @media screen and (max-width: $tablet-width) { @@ -224,6 +249,7 @@ height: 136px; padding: 5px 0 5px 0; width: auto; + justify-content: space-around; } } .bridge-network-data { @@ -232,7 +258,7 @@ display: flex; } .network-basic-label { - font-size: 13px; + font-size: $network-basic-label-font-size; color: $bridge-label-color; } .network-title { @@ -240,6 +266,12 @@ display: block; font-size: 24px; font-weight: 700; + &-stake { + font-style: normal; + font-weight: bold; + font-size: 20px; + line-height: 23px; + } } .network-name { color: $bridge-label-color; @@ -277,17 +309,17 @@ } .network-balance { color: $bridge-balance-color; - font-size: 13px; + font-size: $network-basic-label-font-size; font-weight: 700; } .network-show-more { color: $bridge-link-color; font-size: 14px; - font-weight: 700; + font-weight: $network-show-more-font-weight; } .info-icon { align-items: center; - display: flex; + display: $info-icon-display; justify-content: center; path { fill: $bridge-link-color; @@ -318,8 +350,8 @@ } } .form-container { - height: 276px; - max-width: 384px; + height: $form-container-height; + max-width: $form-container-max-width; width: 44%; @media screen and (max-width: $tablet-width) { align-self: center; @@ -329,7 +361,7 @@ .bridge-form { display: flex; flex-direction: column; - height: 276px; + height: $form-container-height; justify-content: space-evenly; @media screen and (max-width: $tablet-width) { height: auto; @@ -346,6 +378,21 @@ flex-direction: column; padding: 8px 8px 8px 8px; } + + &-stake { + border: 1px solid #E6ECF1; + box-sizing: border-box; + border-radius: 4px; + height: 60px; + + @media screen and (max-width: $tablet-width) { + background-color: unset; + flex-direction: column; + padding: 0 0 0 0; + margin: 0 8px 0 8px; + height: 40px; + } + } } .bridge-form-input-container { display: flex; @@ -363,7 +410,7 @@ color: $bridge-textfield-color; font-size: 24px; font-weight: 700; - height: 48px; + height: $bridge-input-label-line-height; padding-left: 16px; width: 165px; @@ -386,10 +433,10 @@ } &-label { color: $bridge-input-label-color; - font-size: 24px; + font-size: $bridge-input-label-font-size; font-weight: 700; - line-height: 48px; - margin: 0 10px; + line-height: $bridge-input-label-line-height; + margin: $bridge-input-label-margin; text-transform: uppercase; @media screen and (max-width: $tablet-width) { @@ -398,17 +445,17 @@ } &-button { background-color: $bridge-button-background-color; - border-radius: 3px; + border-radius: $bridge-transfer-button-border-radius; color: $bridge-button-text-color; display: block; flex-shrink: 0; font-weight: 700; - height: 48px; + height: $bridge-transfer-button-height; text-decoration: none; - width: 92px; + width: $bridge-transfer-button-width; @media screen and (max-width: $tablet-width) { - border-radius: 0 0 3px 3px; + border-radius: $bridge-transfer-button-border-radius; width: 100%; } @@ -454,6 +501,10 @@ @media screen and (max-width: $tablet-width) { display: none; } + + &-stake { + display: none; + } } .details-logo-container:after { @@ -480,7 +531,7 @@ .details-body { align-self: flex-end; background-color: $modal-background-color; - border-radius: 0 10px 10px 10px; + border-radius: $network-details-body-border-radius; display: flex; flex-direction: column; height: 254px; @@ -488,6 +539,12 @@ padding: 38px; width: 440px; + &-stake { + padding: 26px 30px 26px 30px; + width: 480px; + height: 380px; + } + @media screen and (max-width: $tablet-width) { align-self: center; border-radius: 10px 10px 10px 10px; @@ -499,7 +556,7 @@ height: 300px; } @media screen and (max-width: 600px) { - height: 250px; + height: $network-details-body-mobile-height; } .details-data-container { @@ -517,15 +574,40 @@ .details-description { color: $modal-link-color; font-size: 14px; + + &-currency { + &-stake { + font-weight: normal; + } + } } .details-description-black { color: $modal-text-color; font-size: 14px; font-weight: 700; + + &-stake { + font-weight: normal; + } } .details-copy { cursor: pointer; } + + .details-title { + font-size: 20px; + line-height: 23px; + font-weight: bold; + color: $modal-text-color; + } + + &-core { + display: none; + } + + &-classic { + display: none; + } } } .details-body:before { @@ -547,13 +629,17 @@ display: none; } } + + .details-body-stake:before { + display: none; + } } .transfer-alert { background-color: $modal-background-color; - border-radius: 8px; + border-radius: $transfer-alert-border-radius; display: flex; - height: 265px; - width: 600px; + height: $transfer-alert-height; + width: $transfer-alert-width; @media screen and (max-width: $tablet-width) { flex-direction: column; height: auto; @@ -572,20 +658,22 @@ margin-top: 39px; width: 124px; } + + &-stake { + display: none; + } } .alert-container { display: flex; flex-direction: column; - justify-content: space-around; - padding-bottom: 40px; - padding-right: 60px; - padding-top: 40px; - width: 374px; + justify-content: $transfer-alert-container-justify-content; + padding: $transfer-alert-container-padding; + width: $transfer-alert-container-width; @media screen and (max-width: $tablet-width) { - padding-left: 5px; - padding-top: 0; - width: 100%; + padding: 10px 10px; + width: 94%; + height: 317px; } .alert-corner { height: 12px; @@ -611,48 +699,121 @@ justify-content: center; width: 50px; } + + &-stake { + display: none + } } + + .transfer-title-alternative { + &-core, + &-classic { + display: none; + } + &-stake { + + .transfer-title-text { + color: $modal-text-color; + font-weight: bold; + font-size: 20px; + line-height: 23px; + } + .transfer-operation-container { + display: flex; + justify-content: center; + + .transfer-operation-box { + width: 180px; + height: 60px; + border: 1px solid #E6ECF1; + box-sizing: border-box; + border-radius: 4px; + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + + .transfer-operation-box-value { + font-size: 18px; + line-height: 21px; + } + + .transfer-operation-box-network { + font-size: 12px; + line-height: 14px; + } + } + + .transfer-operation-arrow-container { + width: 120px; + height: 60px; + background-image: url('#{ $transfer-operation-arrow-line-image }'); + background-position: center; + background-repeat: no-repeat; + + .transfer-operation-ellipse { + width: 120px; + height: 60px; + background-image: url('#{ $transfer-operation-arrow-ellipse-image }'); + background-position: center; + background-repeat: no-repeat; + + .transfer-operation-arrow { + width: 113px; + height: 60px; + background-image: url('#{ $transfer-operation-arrow-image }'); + background-position: center; + background-repeat: no-repeat; + } + } + } + } + } + } + .transfer-description { color: $modal-text-color; font-size: 14px; line-height: 1.71; - padding-bottom: 10px; - padding-top: 10px; + padding: $transfer-description-padding; } .transfer-buttons { display: flex; justify-content: space-between; - padding: 20px 0 0; + padding: $transfer-buttons-padding; .transfer-confirm { background-color: $button-background-color; - border-radius: 3px; + border-radius: $button-transfer-confirm-border-radius; color: $button-text-color; flex-grow: 1; - font-size: 15px; + font-size: $button-transfer-confirm-font-size; + line-height: 16px; font-weight: 700; - height: 40px; - max-width: 49%; + height: $button-transfer-confirm-height; + max-width: $button-transfer-confirm-max-width; text-decoration: none; + order: $transfer-alert-confirm-button-order; &:hover { - background-color: darken($button-background-color, 10%); + background-color: $button-transfer-confirm-hover-background-color; } } .transfer-cancel { background-color: $button-bordered-background-color; - border-radius: 3px; - border: solid 1px $button-bordered-border-color; + border-radius: $button-transfer-cancel-border-radius; + border: $button-transfer-cancel-border; color: $button-bordered-text-color; flex-grow: 1; - font-size: 15px; + font-size: $button-transfer-cancel-font-size; + line-height: 16px; font-weight: 700; - height: 40px; - max-width: 49%; + height: $button-transfer-cancel-height; + max-width: $button-transfer-cancel-max-width; text-decoration: none; &:hover { - opacity: 0.7; + opacity: $button-transfer-cancel-hover-opacity; } } } @@ -891,4 +1052,4 @@ } } } -} \ No newline at end of file +} diff --git a/ui/src/assets/stylesheets/application/_loading.scss b/ui/src/assets/stylesheets/application/_loading.scss index 8066b28d..436b8b45 100644 --- a/ui/src/assets/stylesheets/application/_loading.scss +++ b/ui/src/assets/stylesheets/application/_loading.scss @@ -17,8 +17,8 @@ background-position: 50% 50%; background-repeat: no-repeat; background-size: contain; - height: 50px; - width: 234px; + height: $loading-logo-height; + width: $loading-logo-width; } .loading { @@ -27,12 +27,26 @@ background-color: $modal-overlay-background-color; bottom: 0; display: flex; - justify-content: center; + justify-content: $loading-container-justify-content; left: 0; position: fixed; right: 0; top: 0; z-index: 1000000; + + &-content { + display: flex; + justify-content: $loading-container-justify-content; + position: absolute; + align-items: center; + + &-stake { + width: 320px; + height: 100px; + background: #fff; + border-radius: 10px; + } + } } &-i { @@ -46,6 +60,7 @@ height: 50px; opacity: .2; width: 2px; + display: $loading-logo-i-display; &:nth-child(2) { animation-delay: .1s; @@ -54,14 +69,14 @@ &-text { color: $loading-item-text-color; - font-size: 24px; + font-size: $loading-text-font-size; font-stretch: normal; font-style: normal; font-weight: normal; letter-spacing: normal; - line-height: 3; + line-height: $loading-text-line-height; text-align: center; - width: 500px; + width: $loading-text-width; @media screen and (max-width: $mobile-width) { font-size: 18px; @@ -73,4 +88,4 @@ @media screen and (max-width: $mobile-width) { flex-direction: column; } -} \ No newline at end of file +} diff --git a/ui/src/assets/stylesheets/application/_modal.scss b/ui/src/assets/stylesheets/application/_modal.scss index 0b2a2813..4329f9dd 100644 --- a/ui/src/assets/stylesheets/application/_modal.scss +++ b/ui/src/assets/stylesheets/application/_modal.scss @@ -2,24 +2,27 @@ align-items: center; display: flex; justify-content: center; - overflow-y: scroll; + overflow-y: auto; .modal { border-radius: 10px; - min-height: 410px; - min-width: 558px; + min-height: $modal-min-height; + min-width: $modal-min-width; position: relative; @media screen and (max-width: $tablet-width) { + width: 90%; top: 30px; } @media screen and (max-width: 600px) { + width: 90%; top: 60px; } @media screen and (max-width: $mobile-width) { - min-width: 100%; + min-width: 90%; + width: 90%; top: 0; } @@ -38,16 +41,16 @@ } .close-button { - padding: 15px; + padding: $modal-close-button-padding; position: absolute; - right: -40px; - top: 40px; + right: $modal-close-button-right; + top: $modal-close-button-top; z-index: 400000; i { &.icon { &:before { - content: url("../images/modal/close.svg"); + content: url($modal-close-button); } } } @@ -61,8 +64,8 @@ } @media screen and (max-width: $mobile-width) { - top: -40px; - right: 0; + top: $modal-close-button-top-mobile; + right: $modal-close-button-right-mobile; } } diff --git a/ui/src/assets/stylesheets/application/_statistics.scss b/ui/src/assets/stylesheets/application/_statistics.scss index cc1f2334..a0e2a0cb 100644 --- a/ui/src/assets/stylesheets/application/_statistics.scss +++ b/ui/src/assets/stylesheets/application/_statistics.scss @@ -5,12 +5,13 @@ .statistics-page-container { display: flex; flex-direction: column; + justify-content: $status-container-justify-content; max-width: $container-width; padding-bottom: 25px; width: 70%; @media screen and (max-width: $tablet-width-landscape) { - width: 100%; + width: $status-page-container-mobile-width; } @media screen and (max-width: $tablet-width) { @@ -21,26 +22,34 @@ .statistics-title { color: $statistics-title-color; display: block; - font-size: 24px; - line-height: 1.5; - margin: 0 0 20px; + font-size: $statistics-title-font-size; + line-height: $statistics-title-line-height; + font-weight: $statistics-title-font-weight; + letter-spacing: $statistics-title-letter-spacing; + text-transform: $statistics-title-text-transform; + padding: $statistics-title-padding; text-align: left; } .statistics-bridge-container { display: flex; flex-direction: column; - padding-top: 30px; + padding: $status-container-padding; .statistics-bridge-data { display: flex; - justify-content: space-evenly; + justify-content: $statistics-fee-data-justify-content; @media screen and (max-width: $tablet-width) { column-gap: 30px; - display: grid; + display: $status-configuration-data-display; grid-template-columns: 1fr 1fr; row-gap: 20px; + flex-wrap: wrap; + + .datablock-container { + margin: $statistics-bridge-data-mobile-margin; + } } } } @@ -48,8 +57,9 @@ .statistics-fee-container { display: flex; flex-direction: column; - padding-top: 90px; - width: 50%; + padding: $statistics-fee-container-padding; + width: $statistics-fee-container-width; + order: $statistics-fee-container-order; @media screen and (max-width: $tablet-width) { width: auto; @@ -58,12 +68,12 @@ .statistics-fee-data { display: flex; - justify-content: space-evenly; + justify-content: $statistics-fee-data-justify-content; @media screen and (max-width: $tablet-width) { width: auto; column-gap: 30px; - display: grid; + display: $status-configuration-data-display; grid-template-columns: 1fr 1fr; row-gap: 20px; } @@ -73,7 +83,7 @@ .statistics-transaction-container { display: flex; justify-content: space-between; - padding-top: 90px; + padding: $statistics-fee-container-padding; @media screen and (max-width: $tablet-width) { flex-direction: column; @@ -81,7 +91,7 @@ } .statistics-deposit-container { - width: 40%; + width: $statistics-deposit-container-width; @media screen and (max-width: $tablet-width) { margin-bottom: 40px; @@ -91,7 +101,7 @@ } .statistics-withdraw-container { - width: 40%; + width: $statistics-deposit-container-width; @media screen and (max-width: $tablet-width) { width: auto; @@ -100,13 +110,18 @@ .statistics-bridge-data { display: flex; - justify-content: space-evenly; + justify-content: $statistics-fee-data-justify-content; @media screen and (max-width: $tablet-width) { column-gap: 30px; - display: grid; + display: $status-configuration-data-display; grid-template-columns: 1fr 1fr; row-gap: 20px; + flex-wrap: wrap; + + .datablock-container { + margin: $statistics-bridge-data-mobile-margin; + } } } } diff --git a/ui/src/assets/stylesheets/application/_status.scss b/ui/src/assets/stylesheets/application/_status.scss index 1d01b03f..f6dfa30a 100644 --- a/ui/src/assets/stylesheets/application/_status.scss +++ b/ui/src/assets/stylesheets/application/_status.scss @@ -4,13 +4,15 @@ .status-page-container { display: flex; - flex-direction: column; + flex-direction: $status-container-flex-direction; + justify-content: $status-container-justify-content; max-width: $container-width; width: 70%; - padding-bottom: 25px; + padding: $status-container-padding; @media screen and (max-width: $tablet-width-landscape) { - width: 100%; + width: $status-page-container-mobile-width; + flex-direction: $status-container-mobile-flex-direction; } @media screen and (max-width: $tablet-width) { @@ -20,15 +22,22 @@ .status-title { color: $status-text-color; - font-size: 24px; - line-height: 3; + font-size: $status-title-font-size; + line-height: $status-title-line-height; text-align: left; + font-weight: $status-title-font-weight; + letter-spacing: $status-title-letter-spacing; + text-transform: $status-title-text-transform; + padding: $status-title-padding; } .status-configuration-container { display: flex; flex-direction: column; - padding-top: 30px; + + @media screen and (max-width: $tablet-width) { + padding: $status-configuration-container-padding; + } .status-configuration-data { display: flex; @@ -36,9 +45,15 @@ @media screen and (max-width: $tablet-width) { column-gap: 30px; - display: grid; + display: $status-configuration-data-display; grid-template-columns: 1fr 1fr; row-gap: 20px; + flex-wrap: wrap; + justify-content: $statistics-fee-data-justify-content; + + .datablock-container { + margin: $statistics-bridge-data-mobile-margin; + } } } } diff --git a/ui/src/assets/stylesheets/components/_NetworkSelect.scss b/ui/src/assets/stylesheets/components/_NetworkSelect.scss index 1c11eaf1..5c2c53c7 100644 --- a/ui/src/assets/stylesheets/components/_NetworkSelect.scss +++ b/ui/src/assets/stylesheets/components/_NetworkSelect.scss @@ -52,8 +52,7 @@ margin-left: 10px; transition: .15s ease-in; path { - fill: #fff; - opacity: .52; + fill: $header-menu-text-color; } } @@ -86,7 +85,7 @@ align-items: center; justify-content: center; text-decoration: none; - color: #fff; + color: $header-menu-text-color; transition: .15s ease-in; height: 50px; background-color: transparent; @@ -120,7 +119,7 @@ -webkit-user-select: none; user-select: none; align-items: center; - color: #fff; + color: $header-menu-text-color; display: flex; font-weight: bold; height: 18px; @@ -160,5 +159,5 @@ } .nl-IconNetwork_Path { - fill: #60db97; + fill: $header-menu-icon-color; } diff --git a/ui/src/assets/stylesheets/components/_daily-quota-modal-container.scss b/ui/src/assets/stylesheets/components/_daily-quota-modal-container.scss index 9763032d..06260924 100644 --- a/ui/src/assets/stylesheets/components/_daily-quota-modal-container.scss +++ b/ui/src/assets/stylesheets/components/_daily-quota-modal-container.scss @@ -33,7 +33,7 @@ padding: 15px; .daily-quota-title { - color: $primary-color; + color: $daily-quota-modal-title; font-size: 14px; font-weight: bold; text-align: left; @@ -60,4 +60,4 @@ top: -6px; } -} \ No newline at end of file +} diff --git a/ui/src/assets/stylesheets/components/_datablock.scss b/ui/src/assets/stylesheets/components/_datablock.scss index aebfd791..8a39f5cb 100644 --- a/ui/src/assets/stylesheets/components/_datablock.scss +++ b/ui/src/assets/stylesheets/components/_datablock.scss @@ -3,26 +3,51 @@ display: flex; flex-direction: column; justify-content: space-evenly; + width: $datablock-container-width; + min-width: $datablock-container-width; + height: $datablock-container-height; + background-color: $datablock-container-background; + border: $datablock-container-border; + box-sizing: $datablock-container-box-sizing; + border-radius: $datablock-container-border-radius; + margin: $datablock-container-margin; @media screen and (max-width: $tablet-width) { - align-items: normal; - justify-content: flex-start; + align-items: $datablock-container-mobile-align-items; + justify-content: $datablock-container-mobile-justify-content; + min-width: auto; } .datablock-value { color: $datablock-value-color; - font-size: 30px; + font-size: $datablock-value-font-size; + line-height: $datablock-value-line-height; font-weight: bold; + + &-green { + color: #4DA9A6; + } + + &-yellow { + color: #FFA800; + } + + &-red { + color: #FF002E; + } } .datablock-type { color: $datablock-type-color; - font-size: 18px; - margin-left: 10px; + font-size: $datablock-type-font-size; + line-height: $datablock-type-line-height; + font-weight: $datablock-type-font-weight; + margin-left: $datablock-type-margin-left; } .datablock-description { color: $datablock-text-color; - font-size: 14px; + font-size: $datablock-description-font-size; + line-height: $datablock-description-line-height; } - } \ No newline at end of file + } diff --git a/ui/src/assets/stylesheets/components/_footer.scss b/ui/src/assets/stylesheets/components/_footer.scss index 7945c6e5..3b41685f 100644 --- a/ui/src/assets/stylesheets/components/_footer.scss +++ b/ui/src/assets/stylesheets/components/_footer.scss @@ -27,7 +27,7 @@ } &-logo { - background-image: url('#{ $logo-image }'); + background-image: url('#{ $footer-logo-image }'); background-repeat: no-repeat; background-size: contain; display: block; diff --git a/ui/src/assets/stylesheets/components/_header-wallet.scss b/ui/src/assets/stylesheets/components/_header-wallet.scss index 24561719..02a22de4 100644 --- a/ui/src/assets/stylesheets/components/_header-wallet.scss +++ b/ui/src/assets/stylesheets/components/_header-wallet.scss @@ -21,13 +21,17 @@ } } .wallet-text { - color: #fff; + color: $wallet-text; font-size: 14px; font-weight: bold; line-height: 18px; &:hover { text-decoration: none; } + + &-stake { + font-weight: normal; + } } .wallet-link { cursor: pointer; @@ -50,4 +54,4 @@ height: 6px; } } -} \ No newline at end of file +} diff --git a/ui/src/assets/stylesheets/components/_header.scss b/ui/src/assets/stylesheets/components/_header.scss index 6bdabd7d..898d2a62 100644 --- a/ui/src/assets/stylesheets/components/_header.scss +++ b/ui/src/assets/stylesheets/components/_header.scss @@ -6,6 +6,11 @@ width: 100%; z-index: 9999; + &-stake { + box-shadow: 0 3px 8px 0 rgba(116, 129, 141, 0.1); + border-bottom: 1px solid #D4DADF; + } + .container { align-items: center; display: flex; @@ -30,5 +35,4 @@ height: $header-logo-height; width: $header-logo-width; } - } diff --git a/ui/src/assets/stylesheets/components/_menu-items.scss b/ui/src/assets/stylesheets/components/_menu-items.scss index df2f95d6..b8a3b353 100644 --- a/ui/src/assets/stylesheets/components/_menu-items.scss +++ b/ui/src/assets/stylesheets/components/_menu-items.scss @@ -1,26 +1,40 @@ .menu-items { - font-weight: bold; + font-weight: bold; + margin: 0 15px; + text-decoration: none; + + &-core, + &-classic { line-height: 16px; - margin: 0 15px; + } + + @media screen and (max-width: $mobile-width) { + margin-left: 0; + } + + &:hover { text-decoration: none; - - @media screen and (max-width: $mobile-width) { - margin-left: 0; - } - - &:hover { - text-decoration: none; - } + } } .menu-items-text { - color: $header-menu-text-color; - margin-left: 10px; + color: $header-menu-text-color; + margin-left: 10px; + + &-selected { + color: $header-menu-text-color-selected; + } } .menu-items-icon { - float: left; + float: left; + path { + fill: $header-menu-icon-color; + } + + &-selected { path { - fill: $header-menu-icon-color; + fill: $header-menu-icon-color-selected; } + } } diff --git a/ui/src/assets/stylesheets/components/_social-icons.scss b/ui/src/assets/stylesheets/components/_social-icons.scss index 84c1c2bd..ff1c0f96 100644 --- a/ui/src/assets/stylesheets/components/_social-icons.scss +++ b/ui/src/assets/stylesheets/components/_social-icons.scss @@ -28,4 +28,8 @@ path { fill: $social-icons-icon-color; } -} \ No newline at end of file +} + +.social-alternative-icons-item { + margin-right: 10px; +} diff --git a/ui/src/assets/stylesheets/themes/_core.scss b/ui/src/assets/stylesheets/themes/_core.scss index acae1f86..6aca6df9 100644 --- a/ui/src/assets/stylesheets/themes/_core.scss +++ b/ui/src/assets/stylesheets/themes/_core.scss @@ -9,6 +9,7 @@ $secondary-color-dark: #64a231; $tertiary-color: #ffaa07; $danger-color: #f13662; $blue-color: #3ab9fe; +$base-button-bg-color: #08b3f2; $text-color: #333; $link-color: $primary-color; @@ -17,6 +18,7 @@ $gradient-color-1: $primary-color; $gradient-color-2: #7b5ab2; // main +@import url('https://fonts.googleapis.com/css?family=Nunito:300,400,700'); $main-background-color: #fff; $main-font-family: 'Nunito', sans-serif; @@ -28,8 +30,11 @@ $header-logo-height: 26px; // header menu $header-menu-icon-color: $secondary-color; $header-menu-text-color: #fff; +$header-menu-icon-color-selected: $secondary-color; +$header-menu-text-color-selected: #fff; // daily quota +$wallet-text: #fff; $daily-quota-background: $primary-color-darker; $daily-quota-progress: $secondary-color; @@ -41,6 +46,7 @@ $footer-text-color: #fff; // separator $separator-color: #e4e4e4; +$separator-display: initial; // background $pattern-background-image: $base-images-path + '/themes/' + $theme-name + '/background/bg-pattern.svg'; @@ -51,6 +57,7 @@ $social-icons-icon-color: $primary-color; // logo $logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo.svg'; +$footer-logo-image: $logo-image; // home logo $home-logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo-home.png'; @@ -80,6 +87,17 @@ $button-text-color-4: #fff; $button-bordered-background-color: #fff; $button-bordered-text-color: $primary-color; $button-bordered-border-color: $primary-color; +$button-transfer-cancel-border-radius: 3px; +$button-transfer-cancel-border: solid 1px $button-bordered-border-color; +$button-transfer-cancel-font-size: 15px; +$button-transfer-cancel-hover-opacity: 0.7; +$button-transfer-cancel-height: 40px; +$button-transfer-cancel-max-width: 49%; +$button-transfer-confirm-border-radius: 3px; +$button-transfer-confirm-font-size: 15px; +$button-transfer-confirm-hover-background-color: darken($button-background-color, 10%); +$button-transfer-confirm-height: 40px; +$button-transfer-confirm-max-width: 49%; // modals $modal-background-color: #fff; @@ -87,6 +105,15 @@ $modal-overlay-background-color: rgba($primary-color-dark, 0.8); $modal-title-color: $primary-color; $modal-text-color: $text-color; $modal-link-color: $primary-color; +$daily-quota-modal-title: $primary-color; +$modal-close-button: "../images/modal/close.svg"; +$modal-close-button-padding: 15px; +$modal-close-button-right: -40px; +$modal-close-button-top: 40px; +$modal-close-button-top-mobile: -40px; +$modal-close-button-right-mobile: 0px; +$modal-min-width: 558px; +$modal-min-height: 410px; // mobile menu $mobile-menu-background-color: $primary-color-darker; @@ -96,6 +123,13 @@ $mobile-menu-overlay-color: rgba($primary-color-darker, 0.9); $loading-item-background-color: $secondary-color; $loading-item-text-color: #fff; $loading-logo: $base-images-path + '/themes/' + $theme-name + '/logos/logo-loading.svg'; +$loading-logo-height: 50px; +$loading-logo-width: 234px; +$loading-logo-i-display: block; +$loading-text-font-size: 24px; +$loading-text-line-height: 3; +$loading-text-width: 500px; +$loading-container-justify-content: center; // bridge section $bridge-gradient-start: $gradient-color-1; @@ -118,10 +152,45 @@ $bridge-image-center-pointing-down: $base-images-path + '/themes/' + $theme-name $bridge-image-left: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-1.png'; $bridge-image-right: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-2.png'; $bridge-transfer-title-color: $primary-color; +$bridge-transfer-width: 880px; +$bridge-transfer-button-height: 48px; +$bridge-transfer-button-width: 92px; +$bridge-transfer-button-border-radius: 3px; +$form-container-height: 276px; +$form-container-max-width: 384px; +$network-container-height: 136px; +$network-container-padding: 70px 1% 70px 5%; +$network-container-padding-foreign: 70px 5% 70px 1%; +$network-basic-label-font-size: 13px; +$info-icon-display: flex; +$network-show-more-font-weight: 700; +$network-container-justify-content: space-evenly; +$bridge-input-label-font-size: 24px; +$bridge-input-label-line-height: 48px; +$bridge-input-label-margin: 0 10px; +$bridge-transfer-button-border-radius: 0 0 3px 3px; + +// Network details +$network-details-body-border-radius: 0 10px 10px 10px; +$network-details-body-mobile-height: 250px; // bridge alert $alert-logo-box-background-color: $primary-color; +// bridge transfer alert +$transfer-alert-height: 265px; +$transfer-alert-width: 600px; +$transfer-alert-border-radius: 8px; +$transfer-alert-container-width: 374px; +$transfer-alert-container-padding: 40px 60px 40px 0; +$transfer-alert-confirm-button-order: 0; +$transfer-alert-container-justify-content: space-around; +$transfer-description-padding: 10px 0 10px 0; +$transfer-buttons-padding: 20px 0 0; +$transfer-operation-arrow-line-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; +$transfer-operation-arrow-ellipse-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; +$transfer-operation-arrow-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; + // copy icon $copy-icon-color: $primary-color; @@ -129,6 +198,19 @@ $copy-icon-color: $primary-color; $status-text-color: $text-color; $status-authority-number-color: $primary-color; $status-authority-address-color: $text-color; +$status-title-font-size: 24px; +$status-title-line-height: 3; +$status-title-font-weight: normal; +$status-title-letter-spacing: normal; +$status-title-text-transform: none; +$status-container-flex-direction: column; +$status-container-mobile-flex-direction: $status-container-flex-direction; +$status-container-justify-content: unset; +$status-container-padding: 30px 0 25px 0; +$status-title-padding: 0 0 0 0; +$status-page-container-mobile-width: 100%; +$status-configuration-data-display: grid; +$status-configuration-container-padding: 0 0 0 0; $status-authority-logo-0: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-0.svg'; $status-authority-logo-1: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-1.svg'; @@ -136,11 +218,40 @@ $status-authority-logo-2: $base-images-path + '/themes/' + $theme-name + '/statu // datablock $datablock-value-color: $primary-color; +$datablock-value-font-size: 30px; +$datablock-value-line-height: 35px; +$datablock-type-font-size: 18px; +$datablock-type-line-height: 21px; +$datablock-type-font-weight: normal; +$datablock-type-margin-left: 10px; $datablock-type-color: $primary-color; $datablock-text-color: $text-color; +$datablock-container-width: auto; +$datablock-container-height: auto; +$datablock-container-background: transparent; +$datablock-container-border: none; +$datablock-container-box-sizing: unset; +$datablock-container-border-radius: 0; +$datablock-container-margin: 0 0 0 0; +$datablock-container-mobile-align-items: normal; +$datablock-container-mobile-justify-content: flex-start; +$datablock-description-font-size: 14px; +$datablock-description-line-height: 16px; // statistics $statistics-title-color: $text-color; +$statistics-title-font-size: $status-title-font-size; +$statistics-title-line-height: 1.5; +$statistics-title-font-weight: normal; +$statistics-title-letter-spacing: normal; +$statistics-title-text-transform: none; +$statistics-title-padding: 0 0 20px 0; +$statistics-fee-container-order: 0; +$statistics-fee-container-padding: 90px 0 0 0; +$statistics-fee-data-justify-content: space-evenly; +$statistics-fee-container-width: 50%; +$statistics-deposit-container-width: 40%; +$statistics-bridge-data-mobile-margin: 0 0 0 0; // events $events-title-color: $text-color; @@ -149,4 +260,4 @@ $events-select-color: $text-color; $events-column-title-color: $text-color; $events-recipient-label-color: $text-color; $events-value-color: $text-color; -$events-block-color: $text-color; \ No newline at end of file +$events-block-color: $text-color; diff --git a/ui/src/assets/stylesheets/themes/_ethereum-classic.scss b/ui/src/assets/stylesheets/themes/_ethereum-classic.scss index ff0d5a3d..dbfc27d5 100644 --- a/ui/src/assets/stylesheets/themes/_ethereum-classic.scss +++ b/ui/src/assets/stylesheets/themes/_ethereum-classic.scss @@ -9,6 +9,7 @@ $secondary-color-dark: #64a231; $tertiary-color: #ffaa07; $danger-color: #f13662; $blue-color: #3ab9fe; +$base-button-bg-color: #08b3f2; $text-color: #fff; $link-color: $secondary-color; @@ -17,6 +18,7 @@ $gradient-color-1: #352d59; $gradient-color-2: #352d59; // main +@import url('https://fonts.googleapis.com/css?family=Nunito:300,400,700'); $main-background-color: #17132b; $main-font-family: 'Nunito', sans-serif; @@ -28,8 +30,11 @@ $header-logo-height: 41px; // header menu $header-menu-icon-color: $primary-color; $header-menu-text-color: #fff; +$header-menu-icon-color-selected: $primary-color; +$header-menu-text-color-selected: #fff; // daily quota +$wallet-text: #fff; $daily-quota-background: rgba(255, 255, 255, 0.2); $daily-quota-progress: $primary-color; @@ -41,6 +46,7 @@ $footer-text-color: #fff; // separator $separator-color: #333; +$separator-display: initial; // background $pattern-background-image: $base-images-path + '/themes/' + $theme-name + '/background/bg-pattern.svg'; @@ -51,6 +57,7 @@ $social-icons-icon-color: #b9b0e1; // logo $logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo.svg'; +$footer-logo-image: $logo-image; // home logo $home-logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo-home.svg'; @@ -80,6 +87,17 @@ $button-text-color-4: #fff; $button-bordered-background-color: #fff; $button-bordered-text-color: $primary-color-dark; $button-bordered-border-color: $primary-color-dark; +$button-transfer-cancel-border-radius: 3px; +$button-transfer-cancel-border: solid 1px $button-bordered-border-color; +$button-transfer-cancel-font-size: 15px; +$button-transfer-cancel-hover-opacity: 0.7; +$button-transfer-cancel-height: 40px; +$button-transfer-cancel-max-width: 49%; +$button-transfer-confirm-border-radius: 3px; +$button-transfer-confirm-font-size: 15px; +$button-transfer-confirm-hover-background-color: darken($button-background-color, 10%); +$button-transfer-confirm-height: 40px; +$button-transfer-confirm-max-width: 49%; // modals $modal-background-color: #fff; @@ -87,6 +105,15 @@ $modal-overlay-background-color: rgba($primary-color-darker, 0.9); $modal-title-color: $primary-color-dark; $modal-text-color: #352d59; $modal-link-color: $secondary-color; +$daily-quota-modal-title: $primary-color; +$modal-close-button: "../images/modal/close.svg"; +$modal-close-button-padding: 15px; +$modal-close-button-right: -40px; +$modal-close-button-top: 40px; +$modal-close-button-top-mobile: -40px; +$modal-close-button-right-mobile: 0px; +$modal-min-width: 558px; +$modal-min-height: 410px; // mobile menu $mobile-menu-background-color: $primary-color-darker; @@ -96,6 +123,13 @@ $mobile-menu-overlay-color: rgba($primary-color-darker, 0.9); $loading-item-background-color: $secondary-color; $loading-item-text-color: #fff; $loading-logo: $base-images-path + '/themes/' + $theme-name + '/logos/logo-loading.svg'; +$loading-logo-height: 50px; +$loading-logo-width: 234px; +$loading-logo-i-display: block; +$loading-text-font-size: 24px; +$loading-text-line-height: 3; +$loading-text-width: 500px; +$loading-container-justify-content: center; // bridge section $bridge-gradient-start: #fff; @@ -118,10 +152,45 @@ $bridge-image-center-pointing-down: $base-images-path + '/themes/' + $theme-name $bridge-image-left: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-1.png'; $bridge-image-right: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-2.png'; $bridge-transfer-title-color: $modal-text-color; +$bridge-transfer-width: 880px; +$bridge-transfer-button-height: 48px; +$bridge-transfer-button-width: 92px; +$bridge-transfer-button-border-radius: 3px; +$form-container-height: 276px; +$form-container-max-width: 384px; +$network-container-height: 136px; +$network-container-padding: 70px 1% 70px 5%; +$network-container-padding-foreign: 70px 5% 70px 1%; +$network-basic-label-font-size: 13px; +$info-icon-display: flex; +$network-show-more-font-weight: 700; +$network-container-justify-content: space-evenly; +$bridge-input-label-font-size: 24px; +$bridge-input-label-line-height: 48px; +$bridge-input-label-margin: 0 10px; +$bridge-transfer-button-border-radius: 0 0 3px 3px; + +// Network details +$network-details-body-border-radius: 0 10px 10px 10px; +$network-details-body-mobile-height: 250px; // bridge alert $alert-logo-box-background-color: $primary-color; +// bridge transfer alert +$transfer-alert-height: 265px; +$transfer-alert-width: 600px; +$transfer-alert-border-radius: 8px; +$transfer-alert-container-width: 374px; +$transfer-alert-container-padding: 40px 60px 40px 0; +$transfer-alert-confirm-button-order: 0; +$transfer-alert-container-justify-content: space-around; +$transfer-description-padding: 10px 0 10px 0; +$transfer-buttons-padding: 20px 0 0; +$transfer-operation-arrow-line-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; +$transfer-operation-arrow-ellipse-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; +$transfer-operation-arrow-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; + // copy icon $copy-icon-color: $primary-color; @@ -129,6 +198,19 @@ $copy-icon-color: $primary-color; $status-text-color: $text-color; $status-authority-number-color: $text-color; $status-authority-address-color: $primary-color; +$status-title-font-size: 24px; +$status-title-line-height: 3; +$status-title-font-weight: normal; +$status-title-letter-spacing: normal; +$status-title-text-transform: none; +$status-container-flex-direction: column; +$status-container-mobile-flex-direction: $status-container-flex-direction; +$status-container-justify-content: unset; +$status-container-padding: 30px 0 25px 0; +$status-title-padding: 0 0 0 0; +$status-page-container-mobile-width: 100%; +$status-configuration-data-display: grid; +$status-configuration-container-padding: 0 0 0 0; $status-authority-logo-0: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-0.svg'; $status-authority-logo-1: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-1.svg'; @@ -136,11 +218,40 @@ $status-authority-logo-2: $base-images-path + '/themes/' + $theme-name + '/statu // datablock $datablock-value-color: $primary-color; +$datablock-value-font-size: 30px; +$datablock-value-line-height: 35px; +$datablock-type-font-size: 18px; +$datablock-type-line-height: 21px; +$datablock-type-font-weight: normal; +$datablock-type-margin-left: 10px; $datablock-type-color: $primary-color; $datablock-text-color: $text-color; +$datablock-container-width: auto; +$datablock-container-height: auto; +$datablock-container-background: transparent; +$datablock-container-border: none; +$datablock-container-box-sizing: unset; +$datablock-container-border-radius: 0; +$datablock-container-mobile-align-items: normal; +$datablock-container-mobile-justify-content: flex-start; +$datablock-container-margin: 0 0 0 0; +$datablock-description-font-size: 14px; +$datablock-description-line-height: 16px; // statistics $statistics-title-color: $text-color; +$statistics-title-font-size: $status-title-font-size; +$statistics-title-line-height: 1.5; +$statistics-title-font-weight: normal; +$statistics-title-letter-spacing: normal; +$statistics-title-text-transform: none; +$statistics-title-padding: 0 0 20px 0; +$statistics-fee-container-order: 0; +$statistics-fee-container-padding: 90px 0 0 0; +$statistics-fee-data-justify-content: space-evenly; +$statistics-fee-container-width: 50%; +$statistics-deposit-container-width: 40%; +$statistics-bridge-data-mobile-margin: 0 0 0 0; // events $events-title-color: $text-color; @@ -149,4 +260,4 @@ $events-select-color: #333; $events-column-title-color: $text-color; $events-recipient-label-color: $text-color; $events-value-color: $text-color; -$events-block-color: $text-color; \ No newline at end of file +$events-block-color: $text-color; diff --git a/ui/src/assets/stylesheets/themes/_stake.scss b/ui/src/assets/stylesheets/themes/_stake.scss new file mode 100644 index 00000000..954f1f02 --- /dev/null +++ b/ui/src/assets/stylesheets/themes/_stake.scss @@ -0,0 +1,264 @@ +$theme-name: 'stake'; + +// base colors +$primary-color: #E6ECF1; +$primary-color-dark: #F5F7F9; +$primary-color-darker: #45277a; +$secondary-color: #60db97; +$secondary-color-dark: #64a231; +$tertiary-color: #ffaa07; +$danger-color: #f13662; +$blue-color: #3ab9fe; +$base-button-bg-color: #4DA9A6; + +$text-color: #333; +$link-color: #4DA9A6; + +$gradient-color-1: $primary-color; +$gradient-color-2: #7b5ab2; + +// main +@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,700'); +$main-background-color: #F5F7F9; +$main-font-family: 'Roboto', sans-serif; + +// header +$header-background-color: #fff; +$header-logo-width: 128.54px; +$header-logo-height: 30px; + +// header menu +$header-menu-icon-color: #9EAAB6; +$header-menu-text-color: #242A31; +$header-menu-icon-color-selected: #4DA9A6; +$header-menu-text-color-selected: #4DA9A6; + +// daily quota +$wallet-text: #3C454E; +$daily-quota-background: #DBE0E5; +$daily-quota-progress: #9EAAB6; + +// footer +$footer-background-color: $primary-color; +$footer-logo-width: 128.54px; +$footer-logo-height: 30px; +$footer-text-color: #fff; + +// separator +$separator-color: #e4e4e4; +$separator-display: none; + +// background +$pattern-background-image: $base-images-path + '/themes/' + $theme-name + '/transparent.png'; + +// social icons +$social-icons-background-color: #fff; +$social-icons-icon-color: $primary-color; + +// logo +$logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo.svg'; +$footer-logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/footer-logo.svg'; + +// home logo +$home-logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo-home.png'; +$home-logo-image-modal: $base-images-path + '/themes/' + $theme-name + '/logos/logo-home-modal.png'; +$home-logo-width: 52px; +$home-logo-height: 16px; + +// foreign logo +$foreign-logo-image: $base-images-path + '/themes/' + $theme-name + '/logos/logo-foreign.svg'; +$foreign-logo-image-modal: $base-images-path + '/themes/' + $theme-name + '/logos/logo-foreign-modal.svg'; +$foreign-logo-width: 54px; +$foreign-logo-height: 11px; + +// buttons +$button-background-color: #4DA9A6; +$button-text-color: #fff; + +$button-background-color-2: $tertiary-color; +$button-text-color-2: #fff; + +$button-background-color-3: $secondary-color-dark; +$button-text-color-3: #fff; + +$button-background-color-4: #5c34a2; +$button-text-color-4: #fff; + +$button-bordered-background-color: #E6ECF1; +$button-bordered-text-color: #75818D; +$button-bordered-border-color: $primary-color; +$button-transfer-cancel-border-radius: 2px; +$button-transfer-cancel-border: none; +$button-transfer-cancel-font-size: 14px; +$button-transfer-cancel-hover-opacity: 1; +$button-transfer-cancel-height: 42px; +$button-transfer-cancel-max-width: 150px; +$button-transfer-confirm-border-radius: 2px; +$button-transfer-confirm-font-size: 14px; +$button-transfer-confirm-hover-background-color: $button-background-color; +$button-transfer-confirm-height: 42px; +$button-transfer-confirm-max-width: 150px; + +// modals +$modal-background-color: #fff; +$modal-overlay-background-color: rgba(#9EAAB6, 0.8); +$modal-title-color: #242A31; +$modal-text-color: #242A31; +$modal-link-color: #4DA9A6; +$daily-quota-modal-title: $text-color; +$modal-close-button: "../images/themes/stake/bridge/close.svg"; +$modal-close-button-padding: 0; +$modal-close-button-right: -30px; +$modal-close-button-top: -30px; +$modal-close-button-top-mobile: $modal-close-button-top; +$modal-close-button-right-mobile: 10px; +$modal-min-width: 500px; +$modal-min-height: 300px; + +// mobile menu +$mobile-menu-background-color: $primary-color-dark; +$mobile-menu-overlay-color: rgba(#9EAAB6, 0.8); + +// loading +$loading-item-background-color: $secondary-color; +$loading-item-text-color: #242A31; +$loading-logo: $base-images-path + '/themes/' + $theme-name + '/logos/logo-loading.svg'; +$loading-logo-height: 193px; +$loading-logo-width: 150px; +$loading-logo-i-display: none; +$loading-text-font-size: 14px; +$loading-text-line-height: 24px; +$loading-text-width: auto; +$loading-container-justify-content: space-around; + +// bridge section +$bridge-gradient-start: #fff; +$bridge-gradient-end: #fff; +$bridge-logo-background-color: $primary-color; +$bridge-link-color: #4DA9A6; +$bridge-balance-color: #4DA9A6; +$bridge-button-background-color: #4DA9A6; +$bridge-button-text-color: #fff; +$bridge-textfield-background: #F5F7F9; +$bridge-input-label-color: #75818D; +$bridge-label-color: #242A31; +$bridge-textfield-color: #242A31; +$bridge-textfield-placeholder-color: #75818D; +$bridge-side-image-width: 272px; +$bridge-side-image-height: 276px; +$bridge-image-center-pointing-left: $base-images-path + '/themes/' + $theme-name + '/bridge/center-image-pointing-left.svg'; +$bridge-image-center-pointing-right: $base-images-path + '/themes/' + $theme-name + '/bridge/center-image-pointing-right.svg'; +$bridge-image-center-pointing-down: $base-images-path + '/themes/' + $theme-name + '/bridge/center-image-pointing-down@2x.png'; +$bridge-image-left: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-1.png'; +$bridge-image-right: $base-images-path + '/themes/' + $theme-name + '/bridge/pattern-2.png'; +$bridge-transfer-title-color: $primary-color; +$bridge-transfer-width: 960px; +$bridge-transfer-button-height: 42px; +$bridge-transfer-button-width: 100px; +$bridge-transfer-button-border-radius: 2px; +$form-container-height: 200px; +$form-container-max-width: 380px; +$network-container-height: 73px; +$network-container-padding: 63.5px 1% 63.5px 5%; +$network-container-padding-foreign: $network-container-padding; +$network-basic-label-font-size: 12px; +$info-icon-display: none; +$network-show-more-font-weight: normal; +$network-container-justify-content: space-between; +$bridge-input-label-font-size: 20px; +$bridge-input-label-line-height: 42px; +$bridge-input-label-margin: 0 20px 0 0; +$bridge-transfer-button-border-radius: 2px 2px 2px 2px; + +// Network details +$network-details-body-border-radius: 10px; +$network-details-body-mobile-height: 400px; + + +// bridge alert +$alert-logo-box-background-color: $primary-color; + +// bridge transfer alert +$transfer-alert-height: 317px; +$transfer-alert-width: 540px; +$transfer-alert-border-radius: 10px; +$transfer-alert-container-width: $transfer-alert-width; +$transfer-alert-container-padding: 26px 30px 30px 30px; +$transfer-alert-confirm-button-order: 1; +$transfer-alert-container-justify-content: space-between; +$transfer-description-padding: 0 0 0 0; +$transfer-buttons-padding: 0 0 0 0; +$transfer-operation-arrow-line-image: $base-images-path + '/themes/' + $theme-name + '/bridge/transfer-line.svg'; +$transfer-operation-arrow-ellipse-image: $base-images-path + '/themes/' + $theme-name + '/bridge/transfer-ellipse.svg'; +$transfer-operation-arrow-image: $base-images-path + '/themes/' + $theme-name + '/bridge/arrow.svg'; + +// copy icon +$copy-icon-color: $primary-color; + +// status section +$status-text-color: #9EAAB6; +$status-authority-number-color: $primary-color; +$status-authority-address-color: $text-color; +$status-title-font-size: 12px; +$status-title-line-height: 14px; +$status-title-font-weight: bold; +$status-title-letter-spacing: 0.2em; +$status-title-text-transform: uppercase; +$status-title-padding: 0 0 17px 0; +$status-container-flex-direction: row; +$status-container-mobile-flex-direction: column; +$status-container-justify-content: space-between; +$status-container-padding: 37px 0 0 0; +$status-page-container-mobile-width: 95%; +$status-configuration-data-display: flex; +$status-configuration-container-padding: 0 0 30px 0; + +$status-authority-logo-0: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-0.svg'; +$status-authority-logo-1: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-1.svg'; +$status-authority-logo-2: $base-images-path + '/themes/' + $theme-name + '/status/authority/logo-2.svg'; + +// datablock +$datablock-value-color: #242A31; +$datablock-value-font-size: 20px; +$datablock-value-line-height: 23px; +$datablock-type-font-size: 20px; +$datablock-type-line-height: 23px; +$datablock-type-font-weight: bold; +$datablock-type-color: #242A31; +$datablock-type-margin-left: 5px; +$datablock-text-color: #242A31; +$datablock-container-width: 217px; +$datablock-container-height: 70px; +$datablock-container-background: #fff; +$datablock-container-border: 1px solid #E6ECF1; +$datablock-container-box-sizing: border-box; +$datablock-container-border-radius: 4px; +$datablock-container-margin: 0 30px 0 0; +$datablock-container-mobile-align-items: center; +$datablock-container-mobile-justify-content: space-evenly; +$datablock-description-font-size: 12px; +$datablock-description-line-height: 14px; + +// statistics +$statistics-title-color: $status-text-color; +$statistics-title-font-size: $status-title-font-size; +$statistics-title-line-height: $status-title-line-height; +$statistics-title-font-weight: $status-title-font-weight; +$statistics-title-letter-spacing: $status-title-letter-spacing; +$statistics-title-text-transform: $status-title-text-transform; +$statistics-title-padding: $status-title-padding; +$statistics-fee-container-order: 1; +$statistics-fee-container-padding: 38px 0 0 0; +$statistics-fee-data-justify-content: flex-start; +$statistics-fee-container-width: auto; +$statistics-deposit-container-width: auto; +$statistics-bridge-data-mobile-margin: 0 0 10px 0; + +// events +$events-title-color: $text-color; +$events-filter-color: $text-color; +$events-select-color: $text-color; +$events-column-title-color: $text-color; +$events-recipient-label-color: $text-color; +$events-value-color: $text-color; +$events-block-color: $text-color; diff --git a/ui/src/components/Bridge.js b/ui/src/components/Bridge.js index 6a97262a..8a154287 100644 --- a/ui/src/components/Bridge.js +++ b/ui/src/components/Bridge.js @@ -1,8 +1,6 @@ import BN from 'bignumber.js' import React from 'react' import { toHex } from 'web3-utils' -import foreignLogoPurple from '../assets/images/logos/logo-poa-20-purple@2x.png' -import homeLogoPurple from '../assets/images/logos/logo-poa-sokol-purple@2x.png' import swal from 'sweetalert' import { BRIDGE_MODES, ERC_TYPES, isErcToErcMode } from '../../../commons' import { BridgeAddress } from './index' @@ -242,9 +240,8 @@ export class Bridge extends React.Component { const modalData = { isHome: true, - networkData: web3Store.homeNet, + networkName: homeStore.networkName, url: web3Store.COMMON_HOME_RPC_URL, - logo: homeLogoPurple, address: homeStore.COMMON_HOME_BRIDGE_ADDRESS, currency: homeStore.symbol, maxCurrentLimit: homeStore.maxCurrentDeposit, @@ -271,9 +268,8 @@ export class Bridge extends React.Component { const modalData = { isHome: false, - networkData: web3Store.foreignNet, + networkName: foreignStore.networkName, url: foreignDisplayUrl, - logo: foreignLogoPurple, address: foreignStore.COMMON_FOREIGN_BRIDGE_ADDRESS, currency: foreignStore.symbol, maxCurrentLimit: foreignStore.maxCurrentDeposit, @@ -292,6 +288,11 @@ export class Bridge extends React.Component { } getNetworkTitle = networkName => { + const { REACT_APP_UI_STYLES } = process.env + if (REACT_APP_UI_STYLES === 'stake') { + return networkName + } + const index = networkName.indexOf(' ') if (index === -1) { @@ -302,6 +303,11 @@ export class Bridge extends React.Component { } getNetworkSubTitle = networkName => { + const { REACT_APP_UI_STYLES } = process.env + if (REACT_APP_UI_STYLES === 'stake') { + return false + } + const index = networkName.indexOf(' ') if (index === -1) { @@ -312,6 +318,7 @@ export class Bridge extends React.Component { } render() { + const { REACT_APP_UI_STYLES } = process.env const { web3Store, foreignStore, homeStore } = this.props.RootStore const { showModal, modalData, showConfirmation, confirmationData } = this.state const { reverse } = web3Store @@ -335,10 +342,10 @@ export class Bridge extends React.Component {
-
+
-
+
-
+
diff --git a/ui/src/components/BridgeAddress.js b/ui/src/components/BridgeAddress.js index 610beded..253009bc 100644 --- a/ui/src/components/BridgeAddress.js +++ b/ui/src/components/BridgeAddress.js @@ -1,11 +1,13 @@ import React from 'react' export const BridgeAddress = ({ isHome, reverse }) => { + const { REACT_APP_UI_STYLES } = process.env + const getAddress = () => isHome ?
:
return isHome ? ( -
+
@@ -14,7 +16,7 @@ export const BridgeAddress = ({ isHome, reverse }) => { {getAddress()}
) : ( -
+
{getAddress()}
diff --git a/ui/src/components/BridgeForm.js b/ui/src/components/BridgeForm.js index f6a693a6..67301f30 100644 --- a/ui/src/components/BridgeForm.js +++ b/ui/src/components/BridgeForm.js @@ -1,29 +1,32 @@ import React from 'react' -export const BridgeForm = ({ reverse, currency, onTransfer, onInputChange, displayArrow }) => ( -
-
-
-
- - +export const BridgeForm = ({ reverse, currency, onTransfer, onInputChange, displayArrow }) => { + const { REACT_APP_UI_STYLES } = process.env + return ( +
+ +
+
+ + +
+
+ +
-
- -
-
- -
-) + +
+ ) +} diff --git a/ui/src/components/BridgeNetwork.js b/ui/src/components/BridgeNetwork.js index ad534012..0c445814 100644 --- a/ui/src/components/BridgeNetwork.js +++ b/ui/src/components/BridgeNetwork.js @@ -3,6 +3,7 @@ import numeral from 'numeral' import { InfoIcon } from './icons/InfoIcon' export const BridgeNetwork = ({ balance, currency, isHome, networkSubtitle, networkTitle, showModal, side }) => { + const { REACT_APP_UI_STYLES } = process.env const containerName = isHome ? 'home' : 'foreign' const formattedBalance = isNaN(numeral(balance).format('0.00', Math.floor)) ? numeral(0).format('0,0.00', Math.floor) @@ -28,7 +29,7 @@ export const BridgeNetwork = ({ balance, currency, isHome, networkSubtitle, netw return (

- {networkTitle} + {networkTitle} {networkSubtitle ? {networkSubtitle} : null}

diff --git a/ui/src/components/DataBlock.js b/ui/src/components/DataBlock.js index 63982123..ce887eb5 100644 --- a/ui/src/components/DataBlock.js +++ b/ui/src/components/DataBlock.js @@ -1,9 +1,9 @@ import React from 'react' -export const DataBlock = ({ description, value, type, dataTestid }) => ( +export const DataBlock = ({ description, value, type, dataTestid, valueClass = '' }) => (

- {value} + {value} {type}

{description}

diff --git a/ui/src/components/Header.js b/ui/src/components/Header.js index 3db3699b..7463bf7d 100644 --- a/ui/src/components/Header.js +++ b/ui/src/components/Header.js @@ -10,21 +10,58 @@ import { inject, observer } from 'mobx-react/index' @inject('RootStore') @observer export class Header extends React.Component { + state = { + selected: '/' + } + + componentDidMount() { + this.setState({ selected: window.location.pathname }) + } + + changeSelectedMenuMobile = newSelected => { + const { onMenuToggle } = this.props + this.changeSelectedMenu(newSelected) + onMenuToggle() + } + + changeSelectedMenu = newSelected => { + if (newSelected !== this.state.selected) { + this.setState({ selected: newSelected }) + } + } + render() { const { showMobileMenu, onMenuToggle, RootStore: { alertStore, web3Store } } = this.props - const { REACT_APP_UI_HOME_WITHOUT_EVENTS: HOME, REACT_APP_UI_FOREIGN_WITHOUT_EVENTS: FOREIGN } = process.env + const { selected } = this.state + const { + REACT_APP_UI_HOME_WITHOUT_EVENTS: HOME, + REACT_APP_UI_FOREIGN_WITHOUT_EVENTS: FOREIGN, + REACT_APP_UI_STYLES + } = process.env const withoutEvents = web3Store.isSelectedNetwork(web3Store.homeNet.id) ? yn(HOME) : yn(FOREIGN) + const displayEventsTab = REACT_APP_UI_STYLES !== 'stake' return ( -
- {showMobileMenu ? : null} +
+ {showMobileMenu ? ( + + ) : null}
- - + this.changeSelectedMenu('/')} + className="header-logo" + /> +
{alertStore && alertStore.showDailyQuotaInfo && } diff --git a/ui/src/components/HeaderMenu.js b/ui/src/components/HeaderMenu.js index 8a82cd29..52d84a59 100644 --- a/ui/src/components/HeaderMenu.js +++ b/ui/src/components/HeaderMenu.js @@ -3,9 +3,14 @@ import { MenuItems } from './MenuItems' import { Wallet } from './Wallet' import NetworkSelect from './NetworkSelect' -export const HeaderMenu = ({ withoutEvents }) => ( +export const HeaderMenu = ({ selected, withoutEvents, displayEventsTab, onMenuToggle }) => (
- +
diff --git a/ui/src/components/Loading.js b/ui/src/components/Loading.js index f5a9cdf9..2a3eb7f0 100644 --- a/ui/src/components/Loading.js +++ b/ui/src/components/Loading.js @@ -7,26 +7,35 @@ import { PreventExit } from './PreventExit' @observer export class Loading extends React.Component { render() { + const { REACT_APP_UI_STYLES } = process.env const { alertStore } = this.props.RootStore const { loadingStepIndex, loadingSteps, blockConfirmations } = alertStore const style = alertStore.showLoading ? { display: 'flex' } : { display: 'none' } const progress = loadingStepIndex === 3 ? 100 : loadingStepIndex * 25 + blockConfirmations * 4 + const radius = REACT_APP_UI_STYLES === 'stake' ? 33 : 40 return (
0 ? 'mobile-container' : ''}`} style={style}> - {loadingStepIndex > 0 && ( - 1} - progress={progress} - radius={40} - stroke={4} - /> - )} - {loadingStepIndex === 0 &&
} - {loadingStepIndex === 0 &&
} - {loadingStepIndex > 0 &&
{loadingSteps[loadingStepIndex]}
} - {alertStore.showLoading && } +
0 ? 'loading-container-content-' + REACT_APP_UI_STYLES : '' + } ${loadingStepIndex > 0 ? 'mobile-container' : ''}`} + style={style} + > + {loadingStepIndex > 0 && ( + 1} + progress={progress} + radius={radius} + stroke={4} + /> + )} + {loadingStepIndex === 0 &&
} + {loadingStepIndex === 0 &&
} + {loadingStepIndex > 0 &&
{loadingSteps[loadingStepIndex]}
} + {alertStore.showLoading && } +
) } diff --git a/ui/src/components/MenuItems.js b/ui/src/components/MenuItems.js index a8f8bc91..15a15334 100644 --- a/ui/src/components/MenuItems.js +++ b/ui/src/components/MenuItems.js @@ -1,34 +1,44 @@ import React from 'react' -import { EventsIcon, StatusIcon, StatisticsIcon } from './menu-icons' +import { EventsIcon, StatusIcon, StatisticsIcon, AlternativeStatusIcon } from './menu-icons' import { Link } from 'react-router-dom' -export const MenuItems = ({ onMenuToggle = null, withoutEvents }) => { +export const MenuItems = ({ selected, onMenuToggle = null, withoutEvents, displayEventsTab }) => { + const { REACT_APP_UI_STYLES } = process.env const menuItems = [ { - hide: withoutEvents, + hide: withoutEvents || !displayEventsTab, icon: , link: '/events', - text: 'Events' + text: 'Events', + selected: selected === '/events' }, { hide: false, - icon: , + icon: displayEventsTab ? : , link: '/status', - text: 'Status' + text: 'Status', + selected: selected === '/status' }, { hide: withoutEvents, icon: , link: '/statistics', - text: 'Statistics' + text: 'Statistics', + selected: selected === '/statistics' } ] return menuItems.map((item, index) => { - return ( - - {item.icon} - {item.text} + const selectedLabel = item.selected ? 'selected' : '' + return item.hide ? null : ( + onMenuToggle(item.link)} + > + {item.icon} + {item.text} ) }) diff --git a/ui/src/components/MobileMenu.js b/ui/src/components/MobileMenu.js index fca8de0f..3fd54cb4 100644 --- a/ui/src/components/MobileMenu.js +++ b/ui/src/components/MobileMenu.js @@ -2,10 +2,10 @@ import React from 'react' import { MenuItems } from './MenuItems' import NetworkSelect from './NetworkSelect' -export const MobileMenu = ({ onMenuToggle, withoutEvents }) => ( +export const MobileMenu = ({ selected, onMenuToggle, withoutEvents }) => (
- +
diff --git a/ui/src/components/NetworkDetails.js b/ui/src/components/NetworkDetails.js index 4a3855bd..99ba4ba6 100644 --- a/ui/src/components/NetworkDetails.js +++ b/ui/src/components/NetworkDetails.js @@ -5,9 +5,8 @@ import { CopyToClipboard } from 'react-copy-to-clipboard' export const NetworkDetails = ({ isHome, - networkData, + networkName, url, - logo, address, currency, maxCurrentLimit, @@ -23,6 +22,7 @@ export const NetworkDetails = ({ tokenName, getExplorerAddressUrl }) => { + const { REACT_APP_UI_STYLES } = process.env const networkTitle = isHome ? 'Bridge Home' : 'Bridge Foreign' const logoClass = isHome ? 'home-logo home-logo-modal' : 'foreign-logo foreign-logo-modal' const totalTitle = @@ -35,13 +35,17 @@ export const NetworkDetails = ({ const formattedBalance = isNaN(numeral(balance).format('0.00', Math.floor)) ? numeral(0).format('0,0.00', Math.floor) : numeral(balance).format('0,0.000', Math.floor) + const displayCopyIcon = REACT_APP_UI_STYLES !== 'stake' return (
-
+
-
+
+

+ {networkName} +

Network {url} @@ -49,29 +53,38 @@ export const NetworkDetails = ({

{networkTitle} Address - + {address.slice(0, 27).concat('...')} - - - - - + {displayCopyIcon && ( + + + + + + )}

{displayBridgeLimits && (

Remaining Daily {currency} Quota - - {numeral(maxCurrentLimit).format('0,0.0', Math.floor)} {currency} - +

+ {numeral(maxCurrentLimit).format('0,0.0', Math.floor)} + {' ' + currency} +

)} {displayBridgeLimits && (

Maximum Amount Per Transaction - {numeral(maxPerTx).format('0,0.0', Math.floor)} {currency} + {numeral(maxPerTx).format('0,0.0', Math.floor)} + {' ' + currency}

)} @@ -79,7 +92,8 @@ export const NetworkDetails = ({

Minimum Amount Per Transaction - {numeral(minPerTx).format('0,0.000', Math.floor)} {currency} + {numeral(minPerTx).format('0,0.000', Math.floor)} + {' ' + currency}

)} @@ -87,33 +101,44 @@ export const NetworkDetails = ({

Token Address - + {tokenAddress.slice(0, 27).concat('...')} - - - - - + {displayCopyIcon && ( + + + + + + )}

)} {displayTokenAddress && (

Token Name - {tokenName || 'No token name'} + + {tokenName || 'No token name'} +

)}

{totalTitle} - {numeral(totalAmount).format('0,0.000', Math.floor)} {currency} + {numeral(totalAmount).format('0,0.000', Math.floor)} + {' ' + currency}

Your {currency} Balance - {formattedBalance} {currency} + {formattedBalance} + {' ' + currency}

diff --git a/ui/src/components/ProgressRing.js b/ui/src/components/ProgressRing.js index 2fc82580..cdd2b96b 100644 --- a/ui/src/components/ProgressRing.js +++ b/ui/src/components/ProgressRing.js @@ -8,13 +8,22 @@ export class ProgressRing extends Component { render() { const { radius, stroke, progress, confirmationNumber, hideConfirmationNumber } = this.props + const { REACT_APP_UI_STYLES } = process.env const { circumference, normalizedRadius } = this.state const strokeDashoffset = circumference - (progress / 100) * circumference const confirmations = hideConfirmationNumber ? '' : `${confirmationNumber}/8` + const strokeColor = REACT_APP_UI_STYLES === 'stake' ? '#E6ECF1' : '#7b5ab2' + const strokeProgressColor = REACT_APP_UI_STYLES === 'stake' ? '#4DA9A6' : '#60dc97' + const textParams = + REACT_APP_UI_STYLES === 'stake' + ? { x: '22', y: '38', font: 'Roboto', fontSize: '14', fill: '#242A31' } + : { x: '28', y: '47', font: 'Nunito', fontSize: '18', fill: 'white' } + const progressTransform = REACT_APP_UI_STYLES === 'stake' ? 'rotate(-90 33 33)' : '' + return ( - + {confirmations} diff --git a/ui/src/components/SocialIcons.js b/ui/src/components/SocialIcons.js index c9c12225..83df892d 100644 --- a/ui/src/components/SocialIcons.js +++ b/ui/src/components/SocialIcons.js @@ -1,23 +1,36 @@ import React from 'react' -import { IconGithub, IconPOA, IconTelegram, IconTwitter } from './social-icons' +import { + AlternativeIconGithub, + AlternativeIconTelegram, + AlternativeIconTwitter, + IconGithub, + IconPOA, + IconTelegram, + IconTwitter, + IconXDai +} from './social-icons' export const SocialIcons = () => { + const { REACT_APP_UI_STYLES } = process.env + const useAlternativeIcons = REACT_APP_UI_STYLES === 'stake' + const iconClass = useAlternativeIcons ? 'social-alternative-icons-item' : 'social-icons-item' + const socialItems = [ { - icon: , - link: 'https://poa.network' + icon: useAlternativeIcons ? : , + link: useAlternativeIcons ? 'https://xdaichain.com/' : 'https://poa.network' }, { - icon: , - link: 'https://twitter.com/poanetwork' + icon: useAlternativeIcons ? : , + link: useAlternativeIcons ? 'https://twitter.com/xdaichain' : 'https://twitter.com/poanetwork' }, { - icon: , - link: 'https://t.me/poa_network' + icon: useAlternativeIcons ? : , + link: useAlternativeIcons ? 'https://t.me/xdaistable' : 'https://t.me/poa_network' }, { - icon: , - link: 'https://github.com/poanetwork/tokenbridge' + icon: useAlternativeIcons ? : , + link: useAlternativeIcons ? 'https://github.com/xdaichain' : 'https://github.com/poanetwork/tokenbridge' } ] @@ -25,7 +38,7 @@ export const SocialIcons = () => {
{socialItems.map((item, index) => { return ( - + {item.icon} ) diff --git a/ui/src/components/StatusPage.js b/ui/src/components/StatusPage.js index ab742e2c..621e526c 100644 --- a/ui/src/components/StatusPage.js +++ b/ui/src/components/StatusPage.js @@ -6,6 +6,7 @@ import { inject, observer } from 'mobx-react' import { isMediatorMode } from 'commons' import { formatDistanceStrict } from 'date-fns' import { DataBlock } from './DataBlock' +import { getDateColor } from './utils/date' @inject('RootStore') @observer @@ -28,6 +29,8 @@ export class StatusPage extends React.Component { let fromForeignToHomeText let lastEventOnHome let lastEventOnForeign + let lastEventOnHomeColor + let lastEventOnForeignColor if (displayLatestOperations) { fromHomeToForeignText = `From ${homeStore.networkName} To ${foreignStore.networkName}` fromForeignToHomeText = `From ${foreignStore.networkName} To ${homeStore.networkName}` @@ -36,11 +39,13 @@ export class StatusPage extends React.Component { lastEventOnHome = formatDistanceStrict(lastDateOnHome, new Date(), { addSuffix: true }) + lastEventOnHomeColor = getDateColor(lastDateOnHome) const lastDateOnForeign = new Date(0).setUTCSeconds(foreignStore.lastEventRelayedOnForeign) lastEventOnForeign = formatDistanceStrict(lastDateOnForeign, new Date(), { addSuffix: true }) + lastEventOnForeignColor = getDateColor(lastDateOnForeign) } return (
@@ -70,8 +75,18 @@ export class StatusPage extends React.Component {
Latest Operations
- - + +
)} diff --git a/ui/src/components/TransferAlert.js b/ui/src/components/TransferAlert.js index 6a10b59a..97dc9f5e 100644 --- a/ui/src/components/TransferAlert.js +++ b/ui/src/components/TransferAlert.js @@ -15,16 +15,17 @@ export const TransferAlert = ({ fee, reverse }) => { + const { REACT_APP_UI_STYLES } = process.env const formattedFromAmount = numeral(fromAmount).format('0,0[.][000000000000000000]', Math.floor) const formattedToAmount = numeral(toAmount).format('0,0[.][000000000000000000]', Math.floor) return (
-
+
transfer icon
-
+
@@ -39,11 +40,35 @@ export const TransferAlert = ({
+
+ Confirm Transfer +
+
+
+
+
+ {formattedFromAmount} {fromCurrency} +
+
{from}
+
+
+
+
+
+
+
+
+ {formattedToAmount} {toCurrency} +
+
{to}
+
+
+

{fee && `Fee: ${fee.toString()}%`}
- Please confirm that you would like to send {formattedFromAmount} {fromCurrency} from {from}{' '} - to receive {formattedToAmount} {toCurrency} on {to}. + Please confirm that you would like to send {formattedFromAmount} {fromCurrency} from {from} to receive{' '} + {formattedToAmount} {toCurrency} on {to}.