-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve #6 - Fix about menu option in win and linux
- Loading branch information
Showing
11 changed files
with
84 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as React from 'react' | ||
import Button from 'semantic-ui-react/dist/commonjs/elements/Button'; | ||
import Modal from 'semantic-ui-react/dist/commonjs/modules/Modal'; | ||
import Header from 'semantic-ui-react/dist/commonjs/elements/Header'; | ||
import Icon from 'semantic-ui-react/dist/commonjs/elements/Icon'; | ||
import { remote } from '../../services/electron-adapter'; | ||
|
||
interface IAboutModalProps { | ||
open: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
export default class AboutModal extends React.Component<IAboutModalProps> { | ||
render() { | ||
const { open, onClose } = this.props; | ||
return ( | ||
<Modal open={open} basic size='small'> | ||
<Header icon='info circle' content='About' /> | ||
<Modal.Content> | ||
<p> | ||
<b>Version:</b> {remote.app.getVersion()} | ||
</p> | ||
</Modal.Content> | ||
<Modal.Actions> | ||
<Button color='green' inverted onClick={() => onClose()}> | ||
<Icon name='checkmark' /> Ok | ||
</Button> | ||
</Modal.Actions> | ||
</Modal> | ||
) | ||
} | ||
} |
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 @@ | ||
export {default} from './about-modal'; |
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,17 @@ | ||
import {IpcRenderer, Remote} from 'electron'; | ||
|
||
declare global { | ||
interface Window { | ||
require: (module: 'electron') => { | ||
ipcRenderer: IpcRenderer, | ||
remote: Remote | ||
}; | ||
} | ||
} | ||
|
||
const electron = window.require('electron'); | ||
const { ipcRenderer, remote } = electron; | ||
export { | ||
ipcRenderer, | ||
remote | ||
} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
const config = require('./webpack.config'); | ||
|
||
config.watch = false; | ||
config.mode = 'production'; | ||
|
||
module.exports = config; |