Minor fixes for 1.6.1

This commit is contained in:
VincentMeilinger
2024-01-07 18:38:52 +01:00
parent d774ef5dfc
commit f2dac7d2b8
2 changed files with 4 additions and 3 deletions

View File

@@ -182,7 +182,7 @@ struct LoginTextField: View {
struct ServerAddressField: View { struct ServerAddressField: View {
@ObservedObject var userSettings = UserSettings.shared @ObservedObject var userSettings = UserSettings.shared
@State var serverProtocol: ServerProtocol = .https @State var serverProtocol: ServerProtocol = UserSettings.shared.serverProtocol == ServerProtocol.http.rawValue ? ServerProtocol.http : ServerProtocol.https
enum ServerProtocol: String { enum ServerProtocol: String {
case https="https://", http="http://" case https="https://", http="http://"
@@ -202,8 +202,9 @@ struct ServerAddressField: View {
}.pickerStyle(.menu) }.pickerStyle(.menu)
.tint(.white) .tint(.white)
.font(.headline) .font(.headline)
.onChange(of: serverProtocol) { color in .onChange(of: serverProtocol) { value in
userSettings.serverProtocol = color.rawValue print(value)
userSettings.serverProtocol = value.rawValue
} }
TextField("e.g.: example.com", text: $userSettings.serverAddress) TextField("e.g.: example.com", text: $userSettings.serverAddress)