Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Ability to change default WebUi in server.conf #340

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ServerConfig(config: Config, moduleName: String = MODULE_NAME) : SystemPro

// webUI
val webUIEnabled: Boolean by overridableConfig
val webUIPath: String? by overridableConfig
val initialOpenInBrowserEnabled: Boolean by overridableConfig
val webUIInterface: String by overridableConfig
val electronPath: String by overridableConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ class ApplicationDirs(
val thumbnailsRoot = "$dataRoot/thumbnails"
val mangaDownloadsRoot = "$dataRoot/downloads"
val localMangaRoot = "$dataRoot/local"
val webUIRoot = "$dataRoot/webUI"
val webUIRoot: String
get() {
val path =
if (serverConfig.webUIPath.isNullOrEmpty()) "$dataRoot/webUI"
else serverConfig.webUIPath!!
return if (File(path).isAbsolute) path
else "$dataRoot/$path"
}
}

val serverConfig: ServerConfig by lazy { GlobalConfigManager.module() }
Expand Down
1 change: 1 addition & 0 deletions server/src/main/resources/server-reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ server.socksProxyPort = ""

# webUI
server.webUIEnabled = true
server.webUIPath = "webUI" # absolute or relative path
server.initialOpenInBrowserEnabled = true
server.webUIInterface = "browser" # "browser" or "electron"
server.electronPath = ""
Expand Down
1 change: 1 addition & 0 deletions server/src/test/resources/server-reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ server.systemTrayEnabled = false

# webUI
server.webUIEnabled = true
server.webUIPath = "webUI" # absolute or relative path
server.initialOpenInBrowserEnabled = true
server.webUIInterface = "browser" # "browser" or "electron"
server.electronPath = ""