fix: Set gray tint color for server endpoint TextField placeholder
This commit is contained in:
parent
31ed3fc0e1
commit
6385d10317
@ -11,8 +11,7 @@ struct SettingsServerView: View {
|
|||||||
@State private var viewModel = SettingsServerViewModel()
|
@State private var viewModel = SettingsServerViewModel()
|
||||||
@State private var showingLogoutAlert = false
|
@State private var showingLogoutAlert = false
|
||||||
|
|
||||||
init(viewModel: SettingsServerViewModel = SettingsServerViewModel(), showingLogoutAlert: Bool = false) {
|
init(showingLogoutAlert: Bool = false) {
|
||||||
self.viewModel = viewModel
|
|
||||||
self.showingLogoutAlert = showingLogoutAlert
|
self.showingLogoutAlert = showingLogoutAlert
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,11 +34,12 @@ struct SettingsServerView: View {
|
|||||||
Text("Server Endpoint")
|
Text("Server Endpoint")
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
if viewModel.isSetupMode {
|
if viewModel.isSetupMode {
|
||||||
TextField("https://readeck.example.com", text: $viewModel.endpoint)
|
TextField("http://192.168.0.77:8000", text: $viewModel.endpoint)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.keyboardType(.URL)
|
.keyboardType(.URL)
|
||||||
.autocapitalization(.none)
|
.autocapitalization(.none)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
|
.tint(.gray)
|
||||||
.onChange(of: viewModel.endpoint) {
|
.onChange(of: viewModel.endpoint) {
|
||||||
viewModel.clearMessages()
|
viewModel.clearMessages()
|
||||||
}
|
}
|
||||||
@ -171,9 +171,3 @@ struct SettingsServerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
|
||||||
SettingsServerView(viewModel: .init(
|
|
||||||
MockUseCaseFactory()
|
|
||||||
))
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user