fixes #175, better webUI download task

This commit is contained in:
Aria Moradi
2021-08-14 17:10:41 +04:30
parent 9fa17f617e
commit 8a986383fe
5 changed files with 46 additions and 18 deletions
@@ -29,7 +29,7 @@ class ServerConfig(config: Config, moduleName: String = "") : ConfigModule(confi
// webUI
val webUIEnabled: Boolean by overridableWithSysProperty
val initialOpenInBrowserEnabled: Boolean by overridableWithSysProperty
val webUIBrowser: String by overridableWithSysProperty
val webUIInterface: String by overridableWithSysProperty
val electronPath: String by overridableWithSysProperty
companion object {
@@ -18,7 +18,7 @@ object Browser {
fun openInBrowser() {
if (serverConfig.webUIEnabled) {
if (serverConfig.webUIBrowser == ("electron")) {
if (serverConfig.webUIInterface == ("electron")) {
try {
val electronPath = serverConfig.electronPath
electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start())
@@ -14,5 +14,5 @@ server.systemTrayEnabled = true
# webUI
server.webUIEnabled = true
server.initialOpenInBrowserEnabled = true
server.webUIBrowser = "browser" # "browser" or "electron"
server.webUIInterface = "browser" # "browser" or "electron"
server.electronPath = ""