NCBrand.swift 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // NCBrandColor.swift
  3. // Nextcloud iOS
  4. //
  5. // Created by Marino Faggiana on 24/04/17.
  6. // Copyright (c) 2017 TWS. All rights reserved.
  7. //
  8. // Author Marino Faggiana <m.faggiana@twsweb.it>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. import UIKit
  24. class NCBrandColor: NSObject {
  25. @objc static let sharedInstance: NCBrandColor = {
  26. let instance = NCBrandColor()
  27. return instance
  28. }()
  29. // Color
  30. @objc public let customer: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0) // BLU NC : #0082c9
  31. @objc public var customerText: UIColor = .white
  32. @objc public var brand: UIColor // don't touch me
  33. @objc public var brandElement: UIColor // don't touch me
  34. @objc public var brandText: UIColor // don't touch me
  35. @objc public var connectionNo: UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
  36. @objc public var encrypted: UIColor = .red
  37. @objc public var backgroundView: UIColor = .white
  38. @objc public var textView: UIColor = .black
  39. @objc public var seperator: UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
  40. @objc public var tabBar: UIColor = .white
  41. @objc public var transferBackground: UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
  42. @objc public let nextcloud: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
  43. override init() {
  44. self.brand = self.customer
  45. self.brandElement = self.customer
  46. self.brandText = self.customerText
  47. }
  48. // Color modify
  49. @objc public func getColorSelectBackgrond() -> UIColor {
  50. return self.brand.withAlphaComponent(0.1)
  51. }
  52. }
  53. @objc class NCBrandOptions: NSObject {
  54. @objc static let sharedInstance: NCBrandOptions = {
  55. let instance = NCBrandOptions()
  56. return instance
  57. }()
  58. @objc public let brand: String = "Nextcloud"
  59. @objc public let mailMe: String = "ios@nextcloud.com"
  60. @objc public let textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2018 T.W.S. Inc."
  61. @objc public let textCopyrightNextcloudServer: String = "Nextcloud Server %@"
  62. @objc public let loginBaseUrl: String = "https://cloud.twsweb.it"
  63. @objc public let pushNotificationServer: String = "https://push-notifications.nextcloud.com"
  64. @objc public let linkLoginProvider: String = "https://nextcloud.com/providers"
  65. @objc public let textLoginProvider: String = "_login_bottom_label_"
  66. @objc public let middlewarePingUrl: String = ""
  67. @objc public let webLoginAutenticationProtocol: String = "nc://" // example "abc://"
  68. // Personalized
  69. @objc public let webCloseViewProtocolPersonalized:String = "" // example "abc://change/plan" Don't touch me !!
  70. @objc public let folderBrandAutoUpload: String = "" // example "_auto_upload_folder_" Don't touch me !!
  71. // Auto Upload default folder
  72. @objc public var folderDefaultAutoUpload: String = "Photos"
  73. // Capabilities Group
  74. @objc public let capabilitiesGroups: String = "group.it.twsweb.Crypto-Cloud"
  75. // Options
  76. @objc public let use_login_web_personalized: Bool = false // Don't touch me !!
  77. @objc public let use_firebase: Bool = false
  78. @objc public let use_default_auto_upload: Bool = false
  79. @objc public let use_themingColor: Bool = true
  80. @objc public let use_themingBackground: Bool = true
  81. @objc public let use_middlewarePing: Bool = false
  82. @objc public let use_storeLocalAutoUploadAll: Bool = false
  83. @objc public let disable_intro: Bool = false
  84. @objc public let disable_linkLoginProvider: Bool = false
  85. @objc public let disable_request_login_url: Bool = false
  86. @objc public let disable_multiaccount: Bool = false
  87. @objc public let disable_manage_account: Bool = false
  88. @objc public let disable_more_external_site: Bool = false
  89. override init() {
  90. if folderBrandAutoUpload != "" {
  91. self.folderDefaultAutoUpload = self.folderBrandAutoUpload
  92. }
  93. }
  94. }