ShareService+UI.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // ShareService+UI.swift
  3. // Loop
  4. //
  5. // Copyright © 2018 LoopKit Authors. All rights reserved.
  6. //
  7. import LoopKitUI
  8. import ShareClient
  9. extension ShareService: ServiceAuthenticationUI {
  10. public var credentialFormFieldHelperMessage: String? {
  11. return nil
  12. }
  13. public var credentialFormFields: [ServiceCredential] {
  14. return [
  15. ServiceCredential(
  16. title: LocalizedString("Username", comment: "The title of the Dexcom share username credential"),
  17. isSecret: false,
  18. keyboardType: .asciiCapable
  19. ),
  20. ServiceCredential(
  21. title: LocalizedString("Password", comment: "The title of the Dexcom share password credential"),
  22. isSecret: true,
  23. keyboardType: .asciiCapable
  24. ),
  25. ServiceCredential(
  26. title: LocalizedString("Server", comment: "The title of the Dexcom share server URL credential"),
  27. isSecret: false,
  28. options: [
  29. (title: LocalizedString("US", comment: "U.S. share server option title"),
  30. value: KnownShareServers.US.rawValue),
  31. (title: LocalizedString("Outside US", comment: "Outside US share server option title"),
  32. value: KnownShareServers.NON_US.rawValue)
  33. ]
  34. )
  35. ]
  36. }
  37. }