AddServerView autofills with last server
This commit is contained in:
parent
2619848a70
commit
1ce620567c
@ -13,22 +13,29 @@ struct ContentView: View {
|
|||||||
@State var isSignedIn: Bool = true
|
@State var isSignedIn: Bool = true
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack() {
|
||||||
if isSignedIn {
|
if isSignedIn {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
DashboardView()
|
DashboardView()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
VStack {
|
HStack {
|
||||||
Text("You are not currently signed into a Jellyfin instance.")
|
Spacer()
|
||||||
.padding()
|
VStack(alignment: .center) {
|
||||||
Button {
|
Spacer()
|
||||||
// toggle logged in so that it invalidates isSignedIn
|
Text("You are not currently signed into a Jellyfin instance.")
|
||||||
authState.loggedIn = true
|
.multilineTextAlignment(.center)
|
||||||
authState.loggedIn = false
|
.padding()
|
||||||
} label: {
|
Button {
|
||||||
Text("Sign in")
|
// toggle logged in so that it invalidates isSignedIn
|
||||||
|
authState.loggedIn = true
|
||||||
|
authState.loggedIn = false
|
||||||
|
} label: {
|
||||||
|
Text("Sign in")
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,8 @@ struct ItemSeriesView: View {
|
|||||||
ItemGenresView(item: item)
|
ItemGenresView(item: item)
|
||||||
.foregroundStyle(Color.primary)
|
.foregroundStyle(Color.primary)
|
||||||
|
|
||||||
|
// TODO: Settable series with ItemSeriesEpisodesView
|
||||||
|
|
||||||
ItemSeriesSeasonsView(item: item)
|
ItemSeriesSeasonsView(item: item)
|
||||||
.foregroundStyle(Color.primary)
|
.foregroundStyle(Color.primary)
|
||||||
|
|
||||||
|
@ -65,6 +65,9 @@ struct AddServerView: View {
|
|||||||
.foregroundStyle(.red)
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onAppear {
|
||||||
|
serverUrlString = authState.serverUrl?.absoluteString ?? ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkServerUrl() async {
|
func checkServerUrl() async {
|
||||||
|
Loading…
Reference in New Issue
Block a user