omni / bridge-ui

UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
https://bridge.poa.net/
41 stars 51 forks source link

(Feature) Update style for Ethereum Classic network #192

Closed gabitoesmiapodo closed 5 years ago

gabitoesmiapodo commented 5 years ago

Closes #190

I've added theming support to the Bridge UI.

Most or all of the existing elements are themeable, so it should be relatively easy to add support for new networks.

It's possible to start a new theme by doing:


Themes are generated at build time, it's not currently possible to change a theme dynamically.

This pull request is set to use the new 'Ethereum Classic network' theme. Both the original and new themes are available in src/assets/stylesheets/application.scss, lines 3 and 4.

// @import "themes/core";
@import "themes/ethereum-classic";

If you switch back to the core theme, it should look as it used to.

The new theme should look something like this:

Screen Shot 2019-03-19 at 15 54 06 Screen Shot 2019-03-19 at 15 54 35 Screen Shot 2019-03-19 at 15 54 51 Screen Shot 2019-03-19 at 15 55 47 Screen Shot 2019-03-19 at 15 55 54

netlify[bot] commented 5 years ago

Deploy preview for kind-kilby-95344f processing.

Building with commit 765d9e13545757be8017c9f1ae01e51172620a0f

https://app.netlify.com/sites/kind-kilby-95344f/deploys/5c92707204f6bb00071fd00a

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 381


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/BridgeAddress.js 0 1 0.0%
src/components/BridgeNetwork.js 0 1 0.0%
src/components/Disclaimer.js 0 1 0.0%
src/components/NoWallet.js 0 1 0.0%
src/components/Wallet.js 0 1 0.0%
src/components/events/Event.js 0 1 0.0%
src/components/Footer.js 0 3 0.0%
src/components/NetworkDetails.js 0 3 0.0%
src/components/StatusPage.js 0 3 0.0%
src/components/icons/CopyIcon.js 0 3 0.0%
<!-- Total: 2 106 1.89% -->
Files with Coverage Reduction New Missed Lines %
src/components/StatisticsPage.js 1 0.0%
src/components/Header.js 1 0.0%
src/components/Loading.js 1 0.0%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 348: -0.3%
Covered Lines: 73
Relevant Lines: 1146

💛 - Coveralls
patitonar commented 5 years ago

Good Job @gabitoesmiapodo ! Please check if you are OK with changes on https://github.com/poanetwork/bridge-ui/pull/192/commits/765d9e13545757be8017c9f1ae01e51172620a0f I added a script to allow us to select the theme from a environmental variable from the .env file. As default it will use current core theme, if you specify APP_STYLES=classic it will use the new Ethereum Classic styles. With this change, we won't need to change the code to use different theme styles on deployments.

gabitoesmiapodo commented 5 years ago

@patitonar

Seems to work well, thank you.