summaryrefslogtreecommitdiff
path: root/Jel/Views
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2024-02-21 21:30:59 -0500
committerShav Kinderlehrer <[email protected]>2024-02-21 21:30:59 -0500
commit1ce620567c64c92872261317863695c4660acbd0 (patch)
tree212f935b3759b76097bdeb8f27923a7137945b50 /Jel/Views
parent2619848a70d1c1cf366a288dcb889103b7464f1c (diff)
downloadjel-1ce620567c64c92872261317863695c4660acbd0.tar.gz
jel-1ce620567c64c92872261317863695c4660acbd0.zip
AddServerView autofills with last server
Diffstat (limited to 'Jel/Views')
-rw-r--r--Jel/Views/ContentView.swift27
-rw-r--r--Jel/Views/Item/Types/ItemSeriesView.swift2
-rw-r--r--Jel/Views/SignIn/AddServerView.swift3
3 files changed, 22 insertions, 10 deletions
diff --git a/Jel/Views/ContentView.swift b/Jel/Views/ContentView.swift
index 3983392..203bbaa 100644
--- a/Jel/Views/ContentView.swift
+++ b/Jel/Views/ContentView.swift
@@ -13,22 +13,29 @@ struct ContentView: View {
@State var isSignedIn: Bool = true
var body: some View {
- VStack {
+ VStack() {
if isSignedIn {
NavigationStack {
DashboardView()
}
} else {
- VStack {
- Text("You are not currently signed into a Jellyfin instance.")
- .padding()
- Button {
- // toggle logged in so that it invalidates isSignedIn
- authState.loggedIn = true
- authState.loggedIn = false
- } label: {
- Text("Sign in")
+ 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
+ authState.loggedIn = true
+ authState.loggedIn = false
+ } label: {
+ Text("Sign in")
+ }
+ Spacer()
}
+ Spacer()
}
}
}
diff --git a/Jel/Views/Item/Types/ItemSeriesView.swift b/Jel/Views/Item/Types/ItemSeriesView.swift
index 7b27c8e..6fc14a9 100644
--- a/Jel/Views/Item/Types/ItemSeriesView.swift
+++ b/Jel/Views/Item/Types/ItemSeriesView.swift
@@ -34,6 +34,8 @@ struct ItemSeriesView: View {
ItemGenresView(item: item)
.foregroundStyle(Color.primary)
+ // TODO: Settable series with ItemSeriesEpisodesView
+
ItemSeriesSeasonsView(item: item)
.foregroundStyle(Color.primary)
diff --git a/Jel/Views/SignIn/AddServerView.swift b/Jel/Views/SignIn/AddServerView.swift
index 01d4a49..7a7918e 100644
--- a/Jel/Views/SignIn/AddServerView.swift
+++ b/Jel/Views/SignIn/AddServerView.swift
@@ -65,6 +65,9 @@ struct AddServerView: View {
.foregroundStyle(.red)
}
}
+ .onAppear {
+ serverUrlString = authState.serverUrl?.absoluteString ?? ""
+ }
}
func checkServerUrl() async {