Hardcode default linkding server — skip onboarding on fresh install
Some checks failed
CI / build-and-deploy (push) Failing after 7s
Some checks failed
CI / build-and-deploy (push) Failing after 7s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
import SwiftUI
|
||||
|
||||
private let defaultConfig = ServerConfig(
|
||||
host: "linkding-production-f7e0.up.railway.app",
|
||||
port: nil,
|
||||
path: "",
|
||||
token: "RuK48O4LSD6AIKA4SlXYqxU3Ig71slvJGFbk6EanVeT9dlXA#ojHSAFWIq_B3MOBGkoARE5VnGnqeg2ehKddeEQlyvMI",
|
||||
useHttps: true
|
||||
)
|
||||
|
||||
@main
|
||||
struct MarksApp: App {
|
||||
@State private var serverConfig: ServerConfig? = ServerConfig.load()
|
||||
@State private var serverConfig: ServerConfig = ServerConfig.load() ?? defaultConfig
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
if let config = serverConfig {
|
||||
MainContainer(config: config) {
|
||||
config.delete()
|
||||
serverConfig = nil
|
||||
}
|
||||
} else {
|
||||
OnboardingView { newConfig in
|
||||
newConfig.save()
|
||||
serverConfig = newConfig
|
||||
}
|
||||
MainContainer(config: serverConfig) {
|
||||
defaultConfig.save()
|
||||
serverConfig = defaultConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user