launcher: add Autostart menu option
This commit is contained in:
parent
87842dbd12
commit
feb59f2c7a
4 changed files with 23 additions and 2 deletions
|
|
@ -8,6 +8,9 @@
|
|||
- widgets
|
||||
- add `lock` property to all widgets
|
||||
|
||||
- launcher
|
||||
- add `Autostart` menu option
|
||||
|
||||
## 1.14.6
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
- Clear: clear console
|
||||
- Autoscroll: enable/disable console autoscroll
|
||||
- Check for update at startup: enable/disable this feature
|
||||
- Autostart: start the server automatically when launcher is started
|
||||
- Always on top: pin the launcher window above other the windows
|
||||
|
||||
The "play/stop" icon can be used to start and stop the server without opening the menu.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
var terminal = require('./terminal'),
|
||||
settings = require('./settings'),
|
||||
html = require('nanohtml'),
|
||||
semver = require('semver')
|
||||
semver = require('semver'),
|
||||
{ipcRenderer} = require('electron')
|
||||
|
||||
require('./toolbar')
|
||||
|
||||
|
|
@ -32,7 +33,14 @@ if (settings.remote.read('checkForUpdates') && navigator.onLine) {
|
|||
}
|
||||
|
||||
if (settings.remote.read('alwaysOnTop')) {
|
||||
|
||||
|
||||
remote.getCurrentWindow().setAlwaysOnTop(true)
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (settings.remote.read('autoStart')) {
|
||||
|
||||
ipcRenderer.send('start')
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,15 @@ menu.append(new MenuItem({type: 'submenu' , label: 'Console', submenu: [
|
|||
menu.append(new MenuItem({
|
||||
type: 'separator'
|
||||
}))
|
||||
menu.append(new MenuItem({
|
||||
label: 'Autostart',
|
||||
type: 'checkbox',
|
||||
checked: settings.remote.read('autoStart'),
|
||||
click: (e)=>{
|
||||
settings.remote.write('autoStart', e.checked)
|
||||
remote.getCurrentWindow().setAlwaysOnTop(e.checked)
|
||||
}
|
||||
}))
|
||||
menu.append(new MenuItem({
|
||||
label: 'Always on top',
|
||||
type: 'checkbox',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue