diff --git a/src/main/index.js b/src/main/index.js
index 3d74b55..6e3a0d0 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -55,7 +55,7 @@ if (!isPrimaryInstance) {
if (changed.length === 0) {
// if there is no config, or ssrPath is not set, show window
// 初始化时没有配置则打开页面,有配置则不显示主页面
- if (appConfig.configs.length === 0 || !appConfig.ssrPath) {
+ if (!appConfig.hideWindow || appConfig.configs.length === 0 || !appConfig.ssrPath) {
showWindow()
}
} else if (changed.indexOf('autoLaunch') > -1) {
diff --git a/src/renderer/locales/en-US.json b/src/renderer/locales/en-US.json
index 9c5f7dd..fbf419f 100644
--- a/src/renderer/locales/en-US.json
+++ b/src/renderer/locales/en-US.json
@@ -25,6 +25,7 @@
"UI_SETTING_SSR_PYTHON_DIR": "SSR python Dir",
"UI_SETTING_SELECT_SSR_PYTHON_DIR": "Select SSR Dir",
"UI_SETTING_AUTO_START": "Auto Start",
+ "UI_SETTING_HIDE_WINDOW": "Hide Window",
"UI_SETTING_PAC_PORT": "Pac Port",
"UI_SETTING_SHARE_LAN": "Share LAN",
"UI_SETTING_LOCAL_LISTEN_PORT": "Local Listen Port",
diff --git a/src/renderer/locales/zh-CN.json b/src/renderer/locales/zh-CN.json
index 4dcb2b4..55bd214 100644
--- a/src/renderer/locales/zh-CN.json
+++ b/src/renderer/locales/zh-CN.json
@@ -24,6 +24,7 @@
"UI_SETTING_SSR_PYTHON_DIR": "ssr python 目录",
"UI_SETTING_SELECT_SSR_PYTHON_DIR": "选择ssr目录",
"UI_SETTING_AUTO_START": "自动启动",
+ "UI_SETTING_HIDE_WINDOW": "隐藏窗口",
"UI_SETTING_PAC_PORT": "Pac 端口",
"UI_SETTING_SHARE_LAN": "局域网共享",
"UI_SETTING_LOCAL_LISTEN_PORT": "本地监听端口",
diff --git a/src/renderer/views/option/Common.vue b/src/renderer/views/option/Common.vue
index db70f34..c06da9e 100644
--- a/src/renderer/views/option/Common.vue
+++ b/src/renderer/views/option/Common.vue
@@ -14,6 +14,9 @@
+
+
+
@@ -48,10 +51,10 @@
-
- 简体中文
- English
-
+
+ 简体中文
+ English
+
@@ -68,6 +71,7 @@ export default {
form: {
ssrPath: appConfig.ssrPath,
autoLaunch: appConfig.autoLaunch,
+ hideWindow: appConfig.hideWindow,
shareOverLan: appConfig.shareOverLan,
localPort: appConfig.localPort,
pacPort: appConfig.pacPort,
@@ -83,7 +87,9 @@ export default {
if (exists) {
return Promise.resolve()
}
- return Promise.reject(new Error(this.$t('UI_INCORRECT_FOLDER')))
+ return Promise.reject(
+ new Error(this.$t('UI_INCORRECT_FOLDER'))
+ )
})
}
}
@@ -143,7 +149,7 @@ export default {
}
diff --git a/src/shared/config.js b/src/shared/config.js
index 88736ee..3883f12 100644
--- a/src/shared/config.js
+++ b/src/shared/config.js
@@ -9,6 +9,7 @@ const defaultConfig = {
enable: false,
// 开机自启
autoLaunch: false,
+ hideWindow: !isLinux,
// 是否局域网共享
shareOverLan: false,
// 本地socks端口