-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import React from 'react' | ||
import { translate } from 'react-i18next' | ||
import { inject, observer } from 'mobx-react' | ||
import { Switch } from 'antd' | ||
|
||
/** Load translation namespaces and delay rendering until they are loaded. */ | ||
@translate(['wallet'], { wait: true }) | ||
|
||
/** Make the component reactive and inject MobX stores. */ | ||
@inject('gui') @observer | ||
|
||
export default class SelectSoundAlerts extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.t = props.t | ||
this.gui = props.gui | ||
} | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<div className='flex-sb'> | ||
<div className='flex'> | ||
<i className='material-icons md-16'>notifications_active</i> | ||
<p>{this.t('wallet:notificationSounds')}</p> | ||
</div> | ||
<div className='flex'> | ||
<Switch | ||
checked={this.gui.soundAlerts.incoming === true} | ||
checkedChildren={ | ||
<div style={{margin: '-2px 0 0 0'}}> | ||
<i className='material-icons md-16'>done</i> | ||
</div> | ||
} | ||
onChange={() => this.gui.setSoundAlert('incoming')} | ||
size='small' | ||
unCheckedChildren={ | ||
<div style={{margin: '-2px 0 0 0'}}> | ||
<i className='material-icons md-16'>clear</i> | ||
</div> | ||
} | ||
/> | ||
<div className='flex' style={{margin: '0 20px 0 8px'}}> | ||
<i className='material-icons md-16'>call_received</i> | ||
<p>{this.t('wallet:incoming')}</p> | ||
</div> | ||
<Switch | ||
checked={this.gui.soundAlerts.spendable === true} | ||
checkedChildren={ | ||
<div style={{margin: '-2px 0 0 0'}}> | ||
<i className='material-icons md-16'>done</i> | ||
</div> | ||
} | ||
onChange={() => this.gui.setSoundAlert('spendable')} | ||
size='small' | ||
unCheckedChildren={ | ||
<div style={{margin: '-2px 0 0 0'}}> | ||
<i className='material-icons md-16'>clear</i> | ||
</div> | ||
} | ||
/> | ||
<div className='flex' style={{margin: '0 0 0 8px'}}> | ||
<i className='material-icons md-16'>done_all</i> | ||
<p>{this.t('wallet:spendable')}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters