AddServerView autofills with last server

This commit is contained in:
Shav Kinderlehrer 2024-02-21 21:30:59 -05:00
parent 2619848a70
commit 1ce620567c
3 changed files with 22 additions and 10 deletions

View File

@ -13,14 +13,18 @@ struct ContentView: View {
@State var isSignedIn: Bool = true
var body: some View {
VStack {
VStack() {
if isSignedIn {
NavigationStack {
DashboardView()
}
} else {
VStack {
HStack {
Spacer()
VStack(alignment: .center) {
Spacer()
Text("You are not currently signed into a Jellyfin instance.")
.multilineTextAlignment(.center)
.padding()
Button {
// toggle logged in so that it invalidates isSignedIn
@ -29,6 +33,9 @@ struct ContentView: View {
} label: {
Text("Sign in")
}
Spacer()
}
Spacer()
}
}
}

View File

@ -34,6 +34,8 @@ struct ItemSeriesView: View {
ItemGenresView(item: item)
.foregroundStyle(Color.primary)
// TODO: Settable series with ItemSeriesEpisodesView
ItemSeriesSeasonsView(item: item)
.foregroundStyle(Color.primary)

View File

@ -65,6 +65,9 @@ struct AddServerView: View {
.foregroundStyle(.red)
}
}
.onAppear {
serverUrlString = authState.serverUrl?.absoluteString ?? ""
}
}
func checkServerUrl() async {