move all packages to 'suwayomi.tachidesk'

This commit is contained in:
Aria Moradi
2021-06-04 13:08:20 +04:30
parent abc2a5214b
commit 36f4e1c340
119 changed files with 453 additions and 451 deletions

View File

@@ -0,0 +1,33 @@
package suwayomi.tachidesk.server
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import com.typesafe.config.Config
import io.github.config4k.getValue
import xyz.nulldev.ts.config.ConfigModule
import xyz.nulldev.ts.config.GlobalConfigManager
import xyz.nulldev.ts.config.debugLogsEnabled
class ServerConfig(config: Config) : ConfigModule(config) {
val ip: String by config
val port: Int by config
// proxy
val socksProxyEnabled: Boolean by config
val socksProxyHost: String by config
val socksProxyPort: String by config
// misc
val debugLogsEnabled: Boolean = debugLogsEnabled(GlobalConfigManager.config)
val systemTrayEnabled: Boolean by config
val initialOpenInBrowserEnabled: Boolean by config
companion object {
fun register(config: Config) = ServerConfig(config.getConfig("server"))
}
}