123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- import UIKit
- @objc class NCBrandConfiguration: NSObject {
-
- @objc static let sharedInstance: NCBrandConfiguration = {
- let instance = NCBrandConfiguration()
- return instance
- }()
-
- @objc public let configuration_bundleId: String = "it.twsweb.Nextcloud"
- @objc public let configuration_serverUrl: String = "serverUrl"
- @objc public let configuration_username: String = "username"
- @objc public let configuration_password: String = "password"
- }
- @objc class NCBrandOptions: NSObject {
-
- @objc static let sharedInstance: NCBrandOptions = {
- let instance = NCBrandOptions()
- return instance
- }()
-
- @objc public var brand: String = "Nextcloud"
- @objc public var mailMe: String = "ios@nextcloud.com"
- @objc public var textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2019"
- @objc public var textCopyrightNextcloudServer: String = "Nextcloud Server %@"
- @objc public var loginBaseUrl: String = "https://cloud.nextcloud.com"
- @objc public var pushNotificationServerProxy: String = "https://push-notifications.nextcloud.com"
- @objc public var linkLoginHost: String = "https://nextcloud.com/install"
- @objc public var linkloginPreferredProviders: String = "https://nextcloud.com/signup";
- @objc public var middlewarePingUrl: String = ""
- @objc public var webLoginAutenticationProtocol: String = "nc://"
-
- @objc public var webCloseViewProtocolPersonalized: String = ""
- @objc public var folderBrandAutoUpload: String = ""
-
-
- @objc public var folderDefaultAutoUpload: String = "Photos"
-
-
- @objc public var capabilitiesGroups: String = "group.it.twsweb.Crypto-Cloud"
-
-
- @objc public var userAgent: String = "Nextcloud-iOS"
-
-
- @objc public var use_login_web_personalized: Bool = false
- @objc public var use_default_auto_upload: Bool = false
- @objc public var use_themingColor: Bool = true
- @objc public var use_themingBackground: Bool = true
- @objc public var use_themingLogo: Bool = false
- @objc public var use_middlewarePing: Bool = false
- @objc public var use_storeLocalAutoUploadAll: Bool = false
- @objc public var use_imi_viewer: Bool = false
- @objc public var use_configuration: Bool = false
-
- @objc public var disable_intro: Bool = false
- @objc public var disable_request_login_url: Bool = false
- @objc public var disable_multiaccount: Bool = false
- @objc public var disable_manage_account: Bool = false
- @objc public var disable_more_external_site: Bool = false
- @objc public var disable_openin_file: Bool = false
- @objc public var disable_crash_service: Bool = false
-
- override init() {
-
- if folderBrandAutoUpload != "" {
- folderDefaultAutoUpload = folderBrandAutoUpload
- }
- }
- }
- class NCBrandColor: NSObject {
- @objc static let sharedInstance: NCBrandColor = {
- let instance = NCBrandColor()
- instance.setDarkMode()
- return instance
- }()
-
- @objc public let customer: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
- @objc public var customerText: UIColor = .white
-
- @objc public var brand: UIColor
- @objc public var brandElement: UIColor
- @objc public var brandText: UIColor
- @objc public var connectionNo: UIColor = UIColor(red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0)
- @objc public var encrypted: UIColor = .red
- @objc public var backgroundView: UIColor = .white
- @objc public var backgroundForm: UIColor = UIColor(red: 244.0/255.0, green: 244.0/255.0, blue: 244.0/255.0, alpha: 1.0)
- @objc public var textView: UIColor = .black
- @objc public var separator: UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
- @objc public var tabBar: UIColor = .white
- @objc public let nextcloud: UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
- @objc public let nextcloudSoft: UIColor = UIColor(red: 90.0/255.0, green: 160.0/255.0, blue: 210.0/255.0, alpha: 1.0)
- @objc public let icon: UIColor = UIColor(red: 104.0/255.0, green: 104.0/255.0, blue: 104.0/255.0, alpha: 1.0)
- @objc public let optionItem: UIColor = UIColor(red: 178.0/255.0, green: 178.0/255.0, blue: 178.0/255.0, alpha: 1.0)
- @objc public let graySoft: UIColor = UIColor(red: 162.0/255.0, green: 162.0/255.0, blue: 162.0/255.0, alpha: 0.5)
- @objc public let yellowFavorite: UIColor = UIColor(red: 248.0/255.0, green: 205.0/255.0, blue: 70.0/255.0, alpha: 1.0)
- @objc public let textInfo: UIColor = UIColor(red: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 1.0)
- @objc public var select: UIColor = .white
- override init() {
- self.brand = self.customer
- self.brandElement = self.customer
- self.brandText = self.customerText
- }
-
- @objc public func setDarkMode() {
- let darkMode = CCUtility.getDarkMode()
- if darkMode {
- tabBar = UIColor(red: 25.0/255.0, green: 25.0/255.0, blue: 25.0/255.0, alpha: 1.0)
- backgroundView = .black
- backgroundForm = UIColor(red: 25.0/255.0, green: 25.0/255.0, blue: 25.0/255.0, alpha: 1.0)
- textView = .white
- separator = UIColor(red: 60.0/255.0, green: 60.0/255.0, blue: 60.0/255.0, alpha: 1.0)
- select = UIColor.white.withAlphaComponent(0.2)
- } else {
- tabBar = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
- backgroundView = .white
- backgroundForm = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1.0)
- textView = .black
- separator = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0)
- select = self.brand.withAlphaComponent(0.1)
- }
- }
- }
- @objc class NCBrandBeta: NSObject {
-
- @objc static let shared: NCBrandBeta = {
- let instance = NCBrandBeta()
- return instance
- }()
- @objc public let directEditing: Bool = true
- @objc public let iOSHelper: Bool = false
- }
|