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 showingLogoutAlert = false
|
||||
|
||||
init(viewModel: SettingsServerViewModel = SettingsServerViewModel(), showingLogoutAlert: Bool = false) {
|
||||
self.viewModel = viewModel
|
||||
init(showingLogoutAlert: Bool = false) {
|
||||
self.showingLogoutAlert = showingLogoutAlert
|
||||
}
|
||||
|
||||
@ -35,11 +34,12 @@ struct SettingsServerView: View {
|
||||
Text("Server Endpoint")
|
||||
.font(.headline)
|
||||
if viewModel.isSetupMode {
|
||||
TextField("https://readeck.example.com", text: $viewModel.endpoint)
|
||||
TextField("http://192.168.0.77:8000", text: $viewModel.endpoint)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.tint(.gray)
|
||||
.onChange(of: viewModel.endpoint) {
|
||||
viewModel.clearMessages()
|
||||
}
|
||||
@ -171,9 +171,3 @@ struct SettingsServerView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
SettingsServerView(viewModel: .init(
|
||||
MockUseCaseFactory()
|
||||
))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user