NCBrand.swift 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //
  2. // NCBrandColor.swift
  3. // Crypto Cloud Technology Nextcloud
  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. static let sharedInstance: NCBrandColor = {
  26. let instance = NCBrandColor()
  27. return instance
  28. }()
  29. // Color
  30. 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. public var brand: UIColor
  32. public var connectionNo: UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
  33. public var cryptocloud: UIColor = UIColor(red: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)
  34. public var navigationBarProgress: UIColor = .white
  35. public var navigationBarText: UIColor = .white
  36. public var menuBackground: UIColor = .white
  37. public var moreNormal: UIColor = .black
  38. public var moreSettings: UIColor = .black
  39. public var seperator: UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
  40. public var tabBar: UIColor = .white
  41. public var tableBackground: UIColor = .white
  42. public var transferBackground: UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
  43. override init() {
  44. self.brand = self.customer
  45. }
  46. // Color modify
  47. public func getColorSelectBackgrond() -> UIColor {
  48. return self.brand.withAlphaComponent(0.1)
  49. }
  50. }
  51. class NCBrandOptions: NSObject {
  52. static let sharedInstance: NCBrandOptions = {
  53. let instance = NCBrandOptions()
  54. return instance
  55. }()
  56. public let brand: String = "Nextcloud"
  57. public let mailMe: String = "ios@nextcloud.com"
  58. public let textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2017 T.W.S. Inc."
  59. public let textCopyrightNextcloudServer: String = "Nextcloud Server %@"
  60. public let loginBaseUrl: String = "https://cloud.twsweb.it"
  61. public let loginBaseUrlMultiDomains: [String] = ["domain.com", "domain.it"]
  62. public let pushNotificationServer: String = "https://push-notifications.nextcloud.com"
  63. public let loginButtonLabelLink: String = "https://nextcloud.com/providers"
  64. public let webLoginAutenticationProtocol: String = ""
  65. // Auto Upload default folder
  66. public var folderDefaultCameraUpload: String = "Photos"
  67. // Auto Upload brand folder
  68. public let folderBrandCameraUpload: String = NSLocalizedString("_auto_upload_folder_", comment: "")
  69. // Capabilities Group
  70. public let capabilitiesGroups: String = "group.it.twsweb.Crypto-Cloud"
  71. // Options
  72. public let use_login_web: Bool = false
  73. public let use_firebase: Bool = false
  74. public let use_default_automatic_upload: Bool = false
  75. public let use_themingColor: Bool = true
  76. public let use_themingBackground: Bool = true
  77. public let use_multiDomains: Bool = false
  78. public let use_recent_activity_title: Bool = false
  79. public let use_notification_on_menu_more: Bool = false
  80. public let use_logout_on_menu_more: Bool = false
  81. public let disable_intro: Bool = false
  82. public let disable_request_login_url: Bool = false
  83. public let disable_multiaccount: Bool = false
  84. public let disable_cryptocloudsystem: Bool = false
  85. public let disable_manage_account: Bool = false
  86. override init() {
  87. if folderBrandCameraUpload != "" {
  88. self.folderDefaultCameraUpload = folderBrandCameraUpload
  89. }
  90. }
  91. }