Hardcode default linkding server — skip onboarding on fresh install
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:
Krishna Kumar
2026-05-22 16:42:57 -05:00
parent abe35f47d6
commit 26b1de1cbc

View File

@@ -1,21 +1,22 @@
import SwiftUI import SwiftUI
private let defaultConfig = ServerConfig(
host: "linkding-production-f7e0.up.railway.app",
port: nil,
path: "",
token: "RuK48O4LSD6AIKA4SlXYqxU3Ig71slvJGFbk6EanVeT9dlXA#ojHSAFWIq_B3MOBGkoARE5VnGnqeg2ehKddeEQlyvMI",
useHttps: true
)
@main @main
struct MarksApp: App { struct MarksApp: App {
@State private var serverConfig: ServerConfig? = ServerConfig.load() @State private var serverConfig: ServerConfig = ServerConfig.load() ?? defaultConfig
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
if let config = serverConfig { MainContainer(config: serverConfig) {
MainContainer(config: config) { defaultConfig.save()
config.delete() serverConfig = defaultConfig
serverConfig = nil
}
} else {
OnboardingView { newConfig in
newConfig.save()
serverConfig = newConfig
}
} }
} }
} }