Skip to content

Commit d2e6376

Browse files
committed
feat: enable by default on macOS and Windows
License: MIT Signed-off-by: Henrique Dias <[email protected]>
1 parent e50e03f commit d2e6376

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/webui/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const os = require('os')
66
const openExternal = require('./open-external')
77
const logger = require('../common/logger')
88
const store = require('../common/store')
9+
const { IS_MAC, IS_WIN } = require('../common/consts')
910
const dock = require('../utils/dock')
1011

1112
serve({ scheme: 'webui', directory: join(__dirname, '../../assets/webui') })
@@ -62,6 +63,12 @@ const createWindow = () => {
6263
}
6364

6465
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+
6572
openExternal()
6673

6774
const window = createWindow(ctx)
@@ -119,7 +126,7 @@ module.exports = async function (ctx) {
119126
window.once('ready-to-show', () => {
120127
logger.info('[web ui] window ready')
121128

122-
if (store.get(CONFIG_KEY, false)) {
129+
if (store.get(CONFIG_KEY)) {
123130
ctx.launchWebUI('/')
124131
}
125132

0 commit comments

Comments
 (0)