Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1 from cezaraugusto/the-eth-wallet-metamask-logo
Browse files Browse the repository at this point in the history
add metamask icon for disabled content page
  • Loading branch information
Slava authored Aug 1, 2018
2 parents 97ee6f6 + 149b25d commit b4a5f45
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 24 additions & 1 deletion app/renderer/components/preferences/ethWalletTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const ImmutableComponent = require('../immutableComponent')
const {StyleSheet, css} = require('aphrodite/no-important')
const globalStyles = require('../styles/global')
const ethereumIcon = require('../../../../img/ethereum/ethereum-logo.svg')
const metamaskIcon = require('../../../../img/ethereum/metamask-logo.svg')

// Components
const {SettingCheckbox} = require('../common/settings')
Expand Down Expand Up @@ -61,7 +62,18 @@ class EthWalletTab extends ImmutableComponent {
</div>
</div>
<div className={css(styles.disabledContent__sidebar)}>
<h2 className={css(styles.disabledContent__sidebar__text)}>MetaMask</h2>
<div className={css(styles.disabledContent__sidebar__metamask)}>
<img className={
css(
styles.disabledContent__sidebar__metamask__content,
styles.disabledContent__sidebar__metamask__content__image
)
} src={metamaskIcon} />
<h2 className={css(
styles.disabledContent__sidebar__metamask__content,
styles.disabledContent__sidebar__text
)}>MetaMask</h2>
</div>
<p className={css(styles.disabledContent__sidebar__text)}>Do you use DApps? Try MetaMask with ETH Wallet for additional functionality.</p>
</div>
</div>
Expand Down Expand Up @@ -277,6 +289,17 @@ const disabledContentStyles = StyleSheet.create({
color: globalStyles.color.darkGray
},

disabledContent__sidebar__metamask: {
marginBottom: '15px'
},
disabledContent__sidebar__metamask__content: {
display: 'inline-block',
verticalAlign: 'middle'
},
disabledContent__sidebar__metamask__content__image: {
marginRight: '15px'
},

disabledContent__background: {
backgroundImage: `url(${ethereumIcon})`,
backgroundSize: 'contain',
Expand Down
8 changes: 6 additions & 2 deletions app/renderer/components/preferences/preferenceNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const iconShieldsOn = require('../../../extensions/brave/img/preferences/browser
const iconShieldsOff = require('../../../extensions/brave/img/preferences/browser_prefs_shields_off.svg')
const iconPaymentsOn = require('../../../extensions/brave/img/preferences/browser_prefs_payments_on.svg')
const iconPaymentsOff = require('../../../extensions/brave/img/preferences/browser_prefs_payments_off.svg')
const iconEthWallet = require('../../../extensions/brave/img/preferences/browser_prefs_advanced.svg')
const iconEthWalletOn = require('../../../extensions/brave/img/preferences/browser_prefs_ethwallet_on.svg')
const iconEthWalletOff = require('../../../extensions/brave/img/preferences/browser_prefs_ethwallet_off.svg')
// sync TBD
const iconSync = require('../../../extensions/brave/img/preferences/browser_prefs_sync.svg')
const iconAdvanced = require('../../../extensions/brave/img/preferences/browser_prefs_advanced.svg')
Expand Down Expand Up @@ -64,6 +65,8 @@ class PreferenceNavigation extends ImmutableComponent {
selected={this.props.preferenceTab === preferenceTabs.PAYMENTS}
/>
<PreferenceNavigationButton icon={styles.ethWallet}
iconOn={styles.ethWalletOn}
iconOff={styles.ethWalletOff}
l10nId='ethWallet'
testId='ethWalletTabButton'
onClick={this.props.changeTab.bind(null, preferenceTabs.ETHWALLET)}
Expand Down Expand Up @@ -127,8 +130,9 @@ const styles = StyleSheet.create({
shieldsOff: navIcon(iconShieldsOff),
paymentsOn: {background: `url(${iconPaymentsOn}) no-repeat 0 0`},
paymentsOff: navIcon(iconPaymentsOff),
ethWalletOn: {background: `url(${iconEthWalletOn}) no-repeat 0 0`},
ethWalletOff: navIcon(iconEthWalletOff),
sync: navIcon(iconSync),
ethWallet: navIcon(iconEthWallet),
extensions: navIcon(iconExtensions),
advanced: navIcon(iconAdvanced)
})
Expand Down
10 changes: 10 additions & 0 deletions img/ethereum/metamask-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test/unit/about/preferencesTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('Preferences component unittest', function () {
mockery.registerMock('../../../../../extensions/brave/img/ledger/uphold_logo_medium.png')
// Mocks the icons used in EthWallet
mockery.registerMock('../../../../img/ethereum/ethereum-logo.svg')
mockery.registerMock('../../../../img/ethereum/metamask-logo.svg')

mockery.registerMock('electron', fakeElectron)

Expand Down

0 comments on commit b4a5f45

Please sign in to comment.