Merge branch 'main' into quickconnect
This commit is contained in:
commit
b8a0af5b28
|
@ -22,6 +22,7 @@ final class UserSignInViewModel: ViewModel {
|
||||||
|
|
||||||
init(server: SwiftfinStore.State.Server) {
|
init(server: SwiftfinStore.State.Server) {
|
||||||
self.server = server
|
self.server = server
|
||||||
|
JellyfinAPIAPI.basePath = server.currentURI
|
||||||
}
|
}
|
||||||
|
|
||||||
var alertTitle: String {
|
var alertTitle: String {
|
||||||
|
@ -54,7 +55,6 @@ final class UserSignInViewModel: ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadUsers() {
|
func loadUsers() {
|
||||||
JellyfinAPIAPI.basePath = server.currentURI
|
|
||||||
UserAPI.getPublicUsers()
|
UserAPI.getPublicUsers()
|
||||||
.trackActivity(loading)
|
.trackActivity(loading)
|
||||||
.sink(receiveCompletion: { completion in
|
.sink(receiveCompletion: { completion in
|
||||||
|
@ -72,4 +72,9 @@ final class UserSignInViewModel: ViewModel {
|
||||||
quality: 90).URLString
|
quality: 90).URLString
|
||||||
return URL(string: urlString)
|
return URL(string: urlString)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getSplashscreenUrl() -> URL? {
|
||||||
|
let urlString = ImageAPI.getSplashscreenWithRequestBuilder().URLString
|
||||||
|
return URL(string: urlString)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,15 @@ struct UserSignInView: View {
|
||||||
private var password: String = ""
|
private var password: String = ""
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
ZStack {
|
||||||
|
ImageView(viewModel.getSplashscreenUrl())
|
||||||
|
.ignoresSafeArea()
|
||||||
|
|
||||||
|
Color.black
|
||||||
|
.opacity(0.9)
|
||||||
|
.ignoresSafeArea()
|
||||||
|
|
||||||
|
Form {
|
||||||
Section {
|
Section {
|
||||||
TextField(L10n.username, text: $username)
|
TextField(L10n.username, text: $username)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
|
@ -54,4 +61,5 @@ struct UserSignInView: View {
|
||||||
}
|
}
|
||||||
.navigationTitle(L10n.signIn)
|
.navigationTitle(L10n.signIn)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue