Add server URL to settings
This commit is contained in:
parent
1f25fa576d
commit
ca47292e3d
@ -21,7 +21,6 @@ struct JelApp: App {
|
|||||||
ContentView()
|
ContentView()
|
||||||
.environmentObject(jellyfinClientController)
|
.environmentObject(jellyfinClientController)
|
||||||
.task {
|
.task {
|
||||||
URLCache.shared.diskCapacity = 1_000_000_000 // 1GB cache for images
|
|
||||||
AuthStateController.shared.load()
|
AuthStateController.shared.load()
|
||||||
SettingsController.shared.load()
|
SettingsController.shared.load()
|
||||||
jellyfinClientController.setUrl(url: AuthStateController.shared.serverUrl)
|
jellyfinClientController.setUrl(url: AuthStateController.shared.serverUrl)
|
||||||
|
@ -47,6 +47,7 @@ struct ItemMediaView<Content: View>: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ItemGenresView(item: item)
|
ItemGenresView(item: item)
|
||||||
|
.padding(.vertical)
|
||||||
}
|
}
|
||||||
.if(max(geo.safeAreaInsets.leading, geo.safeAreaInsets.trailing) > 0) {view in
|
.if(max(geo.safeAreaInsets.leading, geo.safeAreaInsets.trailing) > 0) {view in
|
||||||
view
|
view
|
||||||
|
@ -28,6 +28,11 @@ struct SettingsView: View {
|
|||||||
.textSelection(.enabled)
|
.textSelection(.enabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LabeledContent("Server URL") {
|
||||||
|
Text("\(authState.serverUrl?.absoluteString ?? "---")")
|
||||||
|
.textSelection(.enabled)
|
||||||
|
}
|
||||||
|
|
||||||
Button(role: .destructive) {
|
Button(role: .destructive) {
|
||||||
authState.loggedIn = false
|
authState.loggedIn = false
|
||||||
authState.save()
|
authState.save()
|
||||||
@ -81,6 +86,6 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
//#Preview {
|
||||||
SettingsView(showingSettingsView: .constant(true))
|
// SettingsView(showingSettingsView: .constant(true))
|
||||||
}
|
//}
|
||||||
|
Loading…
Reference in New Issue
Block a user