Skip to content

Commit

Permalink
Enable auto updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Baranowski committed Dec 28, 2018
1 parent 80a684e commit 06cf853
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class App extends React.Component<Props> {
props: Props;

state = {
updatesReady: true
updatesReady: false
};

componentDidMount() {
Expand All @@ -19,11 +19,12 @@ export default class App extends React.Component<Props> {

render() {
return <React.Fragment>
{this.state.msg && <div>
New updates ready
{this.state.updatesReady && <div style={{zIndex: 1, position: 'absolute'}}>
New updates ready!
<button onClick={() => {
ipcRenderer.send('quitAndInstall')}
}>Install</button>
<button onClick={() => {this.setState({updatesReady: false})}}>Dismiss</button>
</div>}
<div>{this.props.children}</div>
</React.Fragment>;
Expand Down
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "0.0.1",
"description": "5e Dungeons and dragons character sheet aiming to look like the paper version.",
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",
"build": "build --win",
"ship": "build --win -p always",
"build-dll": "cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --colors",
"build-main": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --colors",
"build-renderer": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --colors",
Expand Down

0 comments on commit 06cf853

Please sign in to comment.