File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const os = require('os')
6
6
const openExternal = require ( './open-external' )
7
7
const logger = require ( '../common/logger' )
8
8
const store = require ( '../common/store' )
9
+ const { IS_MAC , IS_WIN } = require ( '../common/consts' )
9
10
const dock = require ( '../utils/dock' )
10
11
11
12
serve ( { scheme : 'webui' , directory : join ( __dirname , '../../assets/webui' ) } )
@@ -62,6 +63,12 @@ const createWindow = () => {
62
63
}
63
64
64
65
module . exports = async function ( ctx ) {
66
+ // First time running this. If it's not macOS, nor Windows,
67
+ // enable launching web ui at login.
68
+ if ( store . get ( CONFIG_KEY , null ) === null ) {
69
+ store . set ( CONFIG_KEY , ! IS_MAC && ! IS_WIN )
70
+ }
71
+
65
72
openExternal ( )
66
73
67
74
const window = createWindow ( ctx )
@@ -119,7 +126,7 @@ module.exports = async function (ctx) {
119
126
window . once ( 'ready-to-show' , ( ) => {
120
127
logger . info ( '[web ui] window ready' )
121
128
122
- if ( store . get ( CONFIG_KEY , false ) ) {
129
+ if ( store . get ( CONFIG_KEY ) ) {
123
130
ctx . launchWebUI ( '/' )
124
131
}
125
132
You can’t perform that action at this time.
0 commit comments