Files
ios-app/App/Features/Registration/ClientIdClientSecret/ClientIdClientSecretView.swift
T
Maxime Marinel b59b9e0408 Release 7.0.0 (#394)
* Bump version

* Clean code (#393)

* Mac os version (#395)

* wip mac os version

* Build on macos

* WIP Webview

* Update app icon
Refacto routing

* Move folder

* Image list

* Change badge update

* Arrange entry view menu

* Add refresh command

* Add app Sandbox for macos + first build on macos

* Fix #397

* Fix macos build

* Try fix app icon

* Rework toolbar entry

* Fix logo

* Add test on serverViewModel

* Update refresh button

* Clean file + clean Picker

* Fix progress view

* Fix delete entry on ipad fix #389

* Swiftformat

* Add swipe to back fix #356

* enhance bottom button tap fix #400

* Add dismiss action in entry view fix #338

* Add sorting options only on id fix #71

* Add progress
2023-10-03 09:29:24 +02:00

44 lines
1.4 KiB
Swift

import SharedLib
import SwiftUI
struct ClientIdClientSecretView: View {
@StateObject var clientIdSecretViewModel = ClientIdSecretViewModel()
var body: some View {
Form {
Section(header: Text("Client id")) {
TextField("Client id", text: $clientIdSecretViewModel.clientId)
.disableAutocorrection(true)
#if os(iOS)
.autocapitalization(.none)
#endif
}
Section(header: Text("Client secret")) {
TextField("Client secret", text: $clientIdSecretViewModel.clientSecret)
.disableAutocorrection(true)
#if os(iOS)
.autocapitalization(.none)
#endif
}
NavigationLink("Next", destination: LoginView()).disabled(!clientIdSecretViewModel.isValid)
}
#if os(iOS)
.navigationBarTitle("Client id & secret")
.navigationBarItems(trailing:
Link(destination: Bundle.infoForKey("DOCUMENTATION_URL")!.url!) {
Text("Open documentation")
})
#endif
}
}
#if DEBUG
struct ClientIdClientSecretView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
ClientIdClientSecretView()
}
}
}
#endif