-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added splash screen + tray menu * Fix lint errors * Added docs * Added more docs + new ext
- Loading branch information
Showing
14 changed files
with
347 additions
and
34 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
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.
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,47 @@ | ||
const path = require('path'); | ||
const { Menu } = require('electron'); | ||
|
||
const iconsPath = path.join(__dirname, '..', '..', 'assets', 'icons'); | ||
const trayIcon = path.join(iconsPath, 'trayTemplate.png'); | ||
|
||
const statusOptions = { | ||
pending: { | ||
label: 'Initializing Space Daemon', | ||
type: 'normal', | ||
enabled: false, | ||
icon: path.join(iconsPath, 'pending.png'), | ||
}, | ||
ready: { | ||
label: 'Space Daemon Running', | ||
type: 'normal', | ||
enabled: false, | ||
icon: path.join(iconsPath, 'ready.png'), | ||
}, | ||
failed: { | ||
label: 'Space Daemon Error', | ||
type: 'normal', | ||
enabled: false, | ||
icon: path.join(iconsPath, 'failed.png'), | ||
}, | ||
}; | ||
|
||
const getMenuOptions = (app, status = 'pending') => { | ||
const statusOption = statusOptions[status] || statusOptions.pending; | ||
|
||
return Menu.buildFromTemplate([ | ||
statusOption, | ||
{ | ||
type: 'separator', | ||
}, | ||
{ | ||
label: 'Quit Space', | ||
type: 'normal', | ||
click: () => app.quit(), | ||
}, | ||
]); | ||
}; | ||
|
||
module.exports = { | ||
trayIcon, | ||
getMenuOptions, | ||
}; |
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,23 @@ | ||
import React from 'react'; | ||
|
||
import useStyles from './styles'; | ||
|
||
const { PUBLIC_URL } = process.env; | ||
|
||
const Splash = () => { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<img | ||
src={`${PUBLIC_URL}/assets/images/space.svg`} | ||
alt="space logo" | ||
/> | ||
<div className={classes.orbit}> | ||
<div className={classes.moon} /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Splash; |
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 './Splash'; |
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,58 @@ | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
|
||
const { PUBLIC_URL } = process.env; | ||
|
||
export default makeStyles({ | ||
root: { | ||
width: '100%', | ||
height: '100%', | ||
display: 'flex', | ||
alignItems: 'center', | ||
backgroundSize: 'cover', | ||
justifyContent: 'center', | ||
backgroundImage: `url(${PUBLIC_URL}/assets/images/auth_background.svg)`, | ||
}, | ||
orbit: { | ||
width: 230, | ||
height: 230, | ||
position: 'absolute', | ||
borderRadius: '50%', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
border: 'solid 1px #434343', | ||
animation: '$orbit 12s linear infinite', | ||
}, | ||
moon: { | ||
width: 30, | ||
height: 30, | ||
position: 'relative', | ||
top: '-15px', | ||
left: 'calc(50% - 15px)', | ||
backgroundColor: '#a2a2a2', | ||
borderRadius: '50%', | ||
boxShadow: 'inset -7px -7px 0 #8c8c8c', | ||
'&:before': { | ||
content: '""', | ||
borderRadius: '50%', | ||
width: 8, | ||
height: 8, | ||
backgroundColor: '#949494', | ||
display: 'inline-block', | ||
margin: '9px 13px', | ||
}, | ||
'&:after': { | ||
content: '""', | ||
borderRadius: '50%', | ||
width: 7, | ||
height: 7, | ||
backgroundColor: '#949494', | ||
display: 'block', | ||
margin: '-24px 4px', | ||
}, | ||
}, | ||
'@keyframes orbit': { | ||
to: { | ||
transform: 'rotate(360deg)', | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.