mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Don't try to log in if the server string isn't valid
This commit is contained in:
parent
de50f3c9a4
commit
a354b807fe
@ -71,14 +71,14 @@ struct AccountLoginView: View {
|
||||
hostURL.scheme = scheme
|
||||
hostURL.host = host
|
||||
server = hostURL.string ?? server
|
||||
} else {
|
||||
model.loginErrorMessage = AccountError.invalidServerURL.localizedDescription
|
||||
model.isPresentingLoginErrorAlert = true
|
||||
}
|
||||
model.login(
|
||||
to: URL(string: server)!,
|
||||
as: username, password: password
|
||||
)
|
||||
} else {
|
||||
model.loginErrorMessage = AccountError.invalidServerURL.localizedDescription
|
||||
model.isPresentingLoginErrorAlert = true
|
||||
}
|
||||
}, label: {
|
||||
Text("Log In")
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user