diff --git a/Brand/Custom.xcassets/introSlide1.imageset/Contents.json b/Brand/Custom.xcassets/introSlide1.imageset/Contents.json new file mode 100644 index 0000000000..65b05047b7 --- /dev/null +++ b/Brand/Custom.xcassets/introSlide1.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide1.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide1@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide1@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Portrait - first slide-1.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Portrait - first slide.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide-1.png b/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide-1.png new file mode 100644 index 0000000000..8a6354f8e9 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide.png b/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide.png new file mode 100644 index 0000000000..8a6354f8e9 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide1.imageset/Tablet Portrait - first slide.png differ diff --git a/Brand/Custom.xcassets/introSlide1.imageset/introSlide1.png b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1.png new file mode 100644 index 0000000000..7ad97b76bc Binary files /dev/null and b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1.png differ diff --git a/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@2x.png b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@2x.png new file mode 100644 index 0000000000..7ad97b76bc Binary files /dev/null and b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@2x.png differ diff --git a/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@3x.png b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@3x.png new file mode 100644 index 0000000000..271ec26fda Binary files /dev/null and b/Brand/Custom.xcassets/introSlide1.imageset/introSlide1@3x.png differ diff --git a/Brand/Custom.xcassets/introSlide2.imageset/Contents.json b/Brand/Custom.xcassets/introSlide2.imageset/Contents.json new file mode 100644 index 0000000000..6f14cfcd17 --- /dev/null +++ b/Brand/Custom.xcassets/introSlide2.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide2.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide2@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide2@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Portrait - third slide-1.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Portrait - third slide.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide-1.png b/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide-1.png new file mode 100644 index 0000000000..58357b3fb7 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide.png b/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide.png new file mode 100644 index 0000000000..58357b3fb7 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide2.imageset/Tablet Portrait - third slide.png differ diff --git a/Brand/Custom.xcassets/introSlide2.imageset/introSlide2.png b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2.png new file mode 100644 index 0000000000..df3e9d9339 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2.png differ diff --git a/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@2x.png b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@2x.png new file mode 100644 index 0000000000..df3e9d9339 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@2x.png differ diff --git a/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@3x.png b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@3x.png new file mode 100644 index 0000000000..17bf5d89a4 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide2.imageset/introSlide2@3x.png differ diff --git a/Brand/Custom.xcassets/introSlide3.imageset/Contents.json b/Brand/Custom.xcassets/introSlide3.imageset/Contents.json new file mode 100644 index 0000000000..e15a5bbe53 --- /dev/null +++ b/Brand/Custom.xcassets/introSlide3.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide3.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide3@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide3@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Portrait - second slide-1.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Portrait - second slide.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide-1.png b/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide-1.png new file mode 100644 index 0000000000..395767ba7f Binary files /dev/null and b/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide.png b/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide.png new file mode 100644 index 0000000000..395767ba7f Binary files /dev/null and b/Brand/Custom.xcassets/introSlide3.imageset/Tablet Portrait - second slide.png differ diff --git a/Brand/Custom.xcassets/introSlide3.imageset/introSlide3.png b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3.png new file mode 100644 index 0000000000..bd19e31a5b Binary files /dev/null and b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3.png differ diff --git a/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@2x.png b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@2x.png new file mode 100644 index 0000000000..bd19e31a5b Binary files /dev/null and b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@2x.png differ diff --git a/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@3x.png b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@3x.png new file mode 100644 index 0000000000..223fee7741 Binary files /dev/null and b/Brand/Custom.xcassets/introSlide3.imageset/introSlide3@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideEight1.imageset/Contents.json b/Brand/Custom.xcassets/introSlideEight1.imageset/Contents.json new file mode 100644 index 0000000000..56a179f397 --- /dev/null +++ b/Brand/Custom.xcassets/introSlideEight1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "introSlideEight1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideEight1.imageset/introSlideEight1@3x.png b/Brand/Custom.xcassets/introSlideEight1.imageset/introSlideEight1@3x.png new file mode 100644 index 0000000000..244802dfc2 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideEight1.imageset/introSlideEight1@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideEight2.imageset/Contents.json b/Brand/Custom.xcassets/introSlideEight2.imageset/Contents.json new file mode 100644 index 0000000000..4e7d271b20 --- /dev/null +++ b/Brand/Custom.xcassets/introSlideEight2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "introSlideEight2@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideEight2.imageset/introSlideEight2@3x.png b/Brand/Custom.xcassets/introSlideEight2.imageset/introSlideEight2@3x.png new file mode 100644 index 0000000000..7cccb2c941 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideEight2.imageset/introSlideEight2@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideEight3.imageset/Contents.json b/Brand/Custom.xcassets/introSlideEight3.imageset/Contents.json new file mode 100644 index 0000000000..d1192931e8 --- /dev/null +++ b/Brand/Custom.xcassets/introSlideEight3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "introSlideEight3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideEight3.imageset/introSlideEight3@3x.png b/Brand/Custom.xcassets/introSlideEight3.imageset/introSlideEight3@3x.png new file mode 100644 index 0000000000..21adc87717 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideEight3.imageset/introSlideEight3@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/Contents.json b/Brand/Custom.xcassets/introSlideLand1.imageset/Contents.json new file mode 100644 index 0000000000..58788d977d --- /dev/null +++ b/Brand/Custom.xcassets/introSlideLand1.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide1.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide1@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide1@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Landscape - first slide.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Landscape - first slide-1.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide-1.png b/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide-1.png new file mode 100644 index 0000000000..6e3df04303 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide.png b/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide.png new file mode 100644 index 0000000000..6e3df04303 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand1.imageset/Tablet Landscape - first slide.png differ diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1.png b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1.png new file mode 100644 index 0000000000..7ad97b76bc Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1.png differ diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@2x.png b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@2x.png new file mode 100644 index 0000000000..7ad97b76bc Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@2x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@3x.png b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@3x.png new file mode 100644 index 0000000000..271ec26fda Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand1.imageset/introSlide1@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/Contents.json b/Brand/Custom.xcassets/introSlideLand2.imageset/Contents.json new file mode 100644 index 0000000000..efbfa73a66 --- /dev/null +++ b/Brand/Custom.xcassets/introSlideLand2.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide2.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide2@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide2@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Landscape - second slide.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Landscape - second slide-1.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide-1.png b/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide-1.png new file mode 100644 index 0000000000..c5e3bca8af Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide.png b/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide.png new file mode 100644 index 0000000000..c5e3bca8af Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand2.imageset/Tablet Landscape - second slide.png differ diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2.png b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2.png new file mode 100644 index 0000000000..df3e9d9339 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2.png differ diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@2x.png b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@2x.png new file mode 100644 index 0000000000..df3e9d9339 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@2x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@3x.png b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@3x.png new file mode 100644 index 0000000000..17bf5d89a4 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand2.imageset/introSlide2@3x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/Contents.json b/Brand/Custom.xcassets/introSlideLand3.imageset/Contents.json new file mode 100644 index 0000000000..fce5b583fd --- /dev/null +++ b/Brand/Custom.xcassets/introSlideLand3.imageset/Contents.json @@ -0,0 +1,33 @@ +{ + "images" : [ + { + "filename" : "introSlide3.png", + "idiom" : "iphone", + "scale" : "1x" + }, + { + "filename" : "introSlide3@2x.png", + "idiom" : "iphone", + "scale" : "2x" + }, + { + "filename" : "introSlide3@3x.png", + "idiom" : "iphone", + "scale" : "3x" + }, + { + "filename" : "Tablet Landscape - third slide.png", + "idiom" : "ipad", + "scale" : "1x" + }, + { + "filename" : "Tablet Landscape - third slide-1.png", + "idiom" : "ipad", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide-1.png b/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide-1.png new file mode 100644 index 0000000000..faa2188a48 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide-1.png differ diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide.png b/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide.png new file mode 100644 index 0000000000..faa2188a48 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand3.imageset/Tablet Landscape - third slide.png differ diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3.png b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3.png new file mode 100644 index 0000000000..bd19e31a5b Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3.png differ diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@2x.png b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@2x.png new file mode 100644 index 0000000000..bd19e31a5b Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@2x.png differ diff --git a/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@3x.png b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@3x.png new file mode 100644 index 0000000000..223fee7741 Binary files /dev/null and b/Brand/Custom.xcassets/introSlideLand3.imageset/introSlide3@3x.png differ diff --git a/Brand/NCBrand.swift b/Brand/NCBrand.swift index f02ea986a7..7b289b9924 100755 --- a/Brand/NCBrand.swift +++ b/Brand/NCBrand.swift @@ -35,21 +35,25 @@ let userAgent: String = { return instance }() - var brand: String = "Nextcloud" - var textCopyrightNextcloudiOS: String = "Nextcloud Hydrogen for iOS %@ © 2024" - var textCopyrightNextcloudServer: String = "Nextcloud Server %@" - var loginBaseUrl: String = "https://cloud.nextcloud.com" - @objc var pushNotificationServerProxy: String = "https://push-notifications.nextcloud.com" - var linkLoginHost: String = "https://nextcloud.com/install" - var linkloginPreferredProviders: String = "https://nextcloud.com/signup-ios" - var webLoginAutenticationProtocol: String = "nc://" // example "abc://" - var privacy: String = "https://nextcloud.com/privacy" - var sourceCode: String = "https://github.com/nextcloud/ios" - var mobileconfig: String = "/remote.php/dav/provisioning/apple-provisioning.mobileconfig" - var appStoreUrl: String = "https://apps.apple.com/in/app/nextcloud/id1125420102" + @objc public var brand: String = "Nextcloud" + @objc public var textCopyrightNextcloudiOS: String = "Nextcloud Hydrogen for iOS %@ © 2024" + @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-ios" + @objc public var webLoginAutenticationProtocol: String = "nc://" // example "abc://" + @objc public var privacy: String = "https://nextcloud.com/privacy" + @objc public var sourceCode: String = "https://github.com/nextcloud/ios" + @objc public var mobileconfig: String = "/remote.php/dav/provisioning/apple-provisioning.mobileconfig" + @objc public var appStoreUrl: String = "https://apps.apple.com/de/app/magentacloud-cloud-speicher/id312838242" + + // Personalized + @objc public var webCloseViewProtocolPersonalized: String = "" // example "abc://change/plan" Don't touch me !! + @objc public var folderBrandAutoUpload: String = "" // example "_auto_upload_folder_" Don't touch me !! // Auto Upload default folder - var folderDefaultAutoUpload: String = "Photos" + @objc public var folderDefaultAutoUpload: String = Locale.current.languageCode == "de" ? "Kamera-Medien" : "Camera-Media" // Capabilities Group var capabilitiesGroup: String = "group.it.twsweb.Crypto-Cloud" @@ -332,4 +336,62 @@ class NCBrandColor: NSObject { } return .white } + + @objc public var iconColor: UIColor{ + if #available(iOS 13.0, *) { + if UITraitCollection.current.userInterfaceStyle == .dark { + return UIColor(displayP3Red: 204.0/255.0, green: 204.0/255.0, blue: 204.0/255.0, alpha: 1.0) + }else { + return UIColor(red: 38.0/255.0, green: 38.0/255.0, blue: 38.0/255.0, alpha: 1.0) + } + } else { + return UIColor(red: 38.0/255.0, green: 38.0/255.0, blue: 38.0/255.0, alpha: 1.0) + } + } + + @objc public var notificationAction: UIColor { + return UIColor(red: 0/255.0, green: 153/255.0, blue: 255/255.0, alpha: 1.0) + } + + @objc public var secondarySystemGroupedBackground: UIColor = UIColor.secondarySystemGroupedBackground + @objc public var label: UIColor = UIColor.label + @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 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 systemGray4: UIColor = UIColor.systemGray4 + @objc public let systemBackground: UIColor = UIColor.systemBackground + @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 let systemGray: UIColor = UIColor.systemGray + @objc public let customerDarkGrey: UIColor = UIColor(red: 38.0/255.0, green: 38.0/255.0, blue: 38.0/255.0, alpha: 1.0) + @objc public var fileFolderName: UIColor = UIColor(displayP3Red: 102.0/255.0, green: 102.0/255.0, blue: 102.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 var singleTitleColorButton: UIColor = UIColor(red: 25.0/255.0, green: 25.0/255.0, blue: 25.0/255.0, alpha: 1.0) + @objc public var shareCellTitleColor: UIColor = UIColor(displayP3Red: 242.0/255.0, green: 242.0/255.0, blue: 242.0/255.0, alpha: 1.0) + @objc public var gray60: UIColor { + if UITraitCollection.current.userInterfaceStyle == .dark { + return UIColor(red: 178.0/255.0, green: 178.0/255.0, blue: 178.0/255.0, alpha: 1.0) + } else { + return UIColor(red: 102.0/255.0, green: 102.0/255.0, blue: 102.0/255.0, alpha: 1.0) + } + } + @objc public var systemGray2: UIColor = UIColor.systemGray2 + @objc public var shareByEmailTextColor: UIColor = UIColor(displayP3Red: 13.0/255.0, green: 57.0/255.0, blue: 223.0/255.0, alpha: 1.0) + @objc public var memoryConsuptionBackground: UIColor { + if UITraitCollection.current.userInterfaceStyle == .dark { + return UIColor(red: 25.0/255.0, green: 25.0/255.0, blue: 25.0/255.0, alpha: 1.0) + } else { + return UIColor(red: 244.0/255.0, green: 244.0/255.0, blue: 244.0/255.0, alpha: 1.0) + } + } + @objc public var nmcGray0: UIColor{ + if UITraitCollection.current.userInterfaceStyle == .dark { + return UIColor(displayP3Red: 242.0/255.0, green: 242.0/255.0, blue: 242.0/255.0, alpha: 1.0) + }else { + return UIColor(red: 19.0/255.0, green: 19.0/255.0, blue: 19.0/255.0, alpha: 1.0) + } + } + @objc public var commonViewInfoText: UIColor = UIColor(displayP3Red: 102.0/255.0, green: 102.0/255.0, blue: 102.0/255.0, alpha: 1.0) + @objc public let progressColorGreen60: UIColor = UIColor(red: 115.0/255.0, green: 195.0/255.0, blue: 84.0/255.0, alpha: 1.0) + @objc public var seperatorRename: UIColor = UIColor(red: 235.0/255.0, green: 235.0/255.0, blue: 235.0/255.0, alpha: 1.0) + @objc public let gray: UIColor = UIColor(red: 104.0/255.0, green: 104.0/255.0, blue: 104.0/255.0, alpha: 1.0) + @objc public var nmcIconSharedWithMe: UIColor = UIColor(displayP3Red: 0.0/255.0, green: 153.0/255.0, blue: 255.0/255.0, alpha: 1.0) } diff --git a/Nextcloud.xcodeproj/xcshareddata/xcschemes/File Provider Extension UI.xcscheme b/Nextcloud.xcodeproj/xcshareddata/xcschemes/File Provider Extension UI.xcscheme index c06627e268..e19e0492e1 100644 --- a/Nextcloud.xcodeproj/xcshareddata/xcschemes/File Provider Extension UI.xcscheme +++ b/Nextcloud.xcodeproj/xcshareddata/xcschemes/File Provider Extension UI.xcscheme @@ -73,7 +73,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES" - askForAppToLaunch = "Yes" launchAutomaticallySubstyle = "2"> diff --git a/Nextcloud.xcodeproj/xcshareddata/xcschemes/WidgetDashboardIntentHandler.xcscheme b/Nextcloud.xcodeproj/xcshareddata/xcschemes/WidgetDashboardIntentHandler.xcscheme index e7fe4caf7c..0b68bbe8b4 100644 --- a/Nextcloud.xcodeproj/xcshareddata/xcschemes/WidgetDashboardIntentHandler.xcscheme +++ b/Nextcloud.xcodeproj/xcshareddata/xcschemes/WidgetDashboardIntentHandler.xcscheme @@ -73,7 +73,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES" - askForAppToLaunch = "Yes" launchAutomaticallySubstyle = "2"> diff --git a/iOSClient/Extensions/UIImage+Extension.swift b/iOSClient/Extensions/UIImage+Extension.swift index 3ea4d04296..23ab2254b5 100644 --- a/iOSClient/Extensions/UIImage+Extension.swift +++ b/iOSClient/Extensions/UIImage+Extension.swift @@ -244,6 +244,17 @@ extension UIImage { guard CGImageDestinationFinalize(destination) else { return nil } return mutableData as Data } + + func imageColor(_ color: UIColor) -> UIImage { + if #available(iOS 13.0, *) { + return self.withTintColor(color, renderingMode: .alwaysOriginal) + } else { + return UIGraphicsImageRenderer(size: size, format: imageRendererFormat).image { _ in + color.set() + withRenderingMode(.alwaysTemplate).draw(at: .zero) + } + } + } } extension CGImagePropertyOrientation { diff --git a/iOSClient/Images.xcassets/addFolder.imageset/Contents.json b/iOSClient/Images.xcassets/addFolder.imageset/Contents.json new file mode 100644 index 0000000000..c3efac3643 --- /dev/null +++ b/iOSClient/Images.xcassets/addFolder.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "addFolder.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "addFolderDark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "addFolder@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "addFolderDark@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "addFolder@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "addFolderDark@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolder.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolder.png new file mode 100644 index 0000000000..01b4edc846 Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolder.png differ diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolder@2x.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolder@2x.png new file mode 100644 index 0000000000..36b5f67ed9 Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolder@2x.png differ diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolder@3x.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolder@3x.png new file mode 100644 index 0000000000..63f36fef80 Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolder@3x.png differ diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark.png new file mode 100644 index 0000000000..021899fc7c Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark.png differ diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@2x.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@2x.png new file mode 100644 index 0000000000..a4eede1fd9 Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@2x.png differ diff --git a/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@3x.png b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@3x.png new file mode 100644 index 0000000000..bc59610706 Binary files /dev/null and b/iOSClient/Images.xcassets/addFolder.imageset/addFolderDark@3x.png differ diff --git a/iOSClient/Images.xcassets/addFolderInfo.imageset/Contents.json b/iOSClient/Images.xcassets/addFolderInfo.imageset/Contents.json new file mode 100644 index 0000000000..bfc9b6a226 --- /dev/null +++ b/iOSClient/Images.xcassets/addFolderInfo.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "addFolderInfo.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/iOSClient/Images.xcassets/addFolderInfo.imageset/addFolderInfo.pdf b/iOSClient/Images.xcassets/addFolderInfo.imageset/addFolderInfo.pdf new file mode 100644 index 0000000000..874d974e1b Binary files /dev/null and b/iOSClient/Images.xcassets/addFolderInfo.imageset/addFolderInfo.pdf differ diff --git a/iOSClient/Images.xcassets/encryptedfolder.imageset/Contents.json b/iOSClient/Images.xcassets/encryptedfolder.imageset/Contents.json new file mode 100644 index 0000000000..d1040fb391 --- /dev/null +++ b/iOSClient/Images.xcassets/encryptedfolder.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "encrypted folder.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOSClient/Images.xcassets/encryptedfolder.imageset/encrypted folder.svg b/iOSClient/Images.xcassets/encryptedfolder.imageset/encrypted folder.svg new file mode 100644 index 0000000000..454ea06f3b --- /dev/null +++ b/iOSClient/Images.xcassets/encryptedfolder.imageset/encrypted folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/iOSClient/Images.xcassets/media.imageset/Contents.json b/iOSClient/Images.xcassets/media.imageset/Contents.json index 988c574d50..f3d0a55d87 100644 --- a/iOSClient/Images.xcassets/media.imageset/Contents.json +++ b/iOSClient/Images.xcassets/media.imageset/Contents.json @@ -11,6 +11,6 @@ }, "properties" : { "preserves-vector-representation" : true, - "template-rendering-intent" : "template" + "template-rendering-intent" : "original" } } diff --git a/iOSClient/Images.xcassets/media.imageset/tabBarMedia.pdf b/iOSClient/Images.xcassets/media.imageset/tabBarMedia.pdf index 515ca27a10..57ab2633a8 100644 Binary files a/iOSClient/Images.xcassets/media.imageset/tabBarMedia.pdf and b/iOSClient/Images.xcassets/media.imageset/tabBarMedia.pdf differ diff --git a/iOSClient/Images.xcassets/photo.imageset/Contents.json b/iOSClient/Images.xcassets/photo.imageset/Contents.json index 0918d9d103..4fbf2cc0c5 100644 --- a/iOSClient/Images.xcassets/photo.imageset/Contents.json +++ b/iOSClient/Images.xcassets/photo.imageset/Contents.json @@ -1,7 +1,17 @@ { "images" : [ { - "filename" : "photo.pdf", + "filename" : "file_photo_menu.pdf", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "default copy@500w.pdf", "idiom" : "universal" } ], @@ -10,6 +20,7 @@ "version" : 1 }, "properties" : { - "preserves-vector-representation" : true + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } diff --git a/iOSClient/Images.xcassets/photo.imageset/default copy@500w.pdf b/iOSClient/Images.xcassets/photo.imageset/default copy@500w.pdf new file mode 100644 index 0000000000..47f3245514 Binary files /dev/null and b/iOSClient/Images.xcassets/photo.imageset/default copy@500w.pdf differ diff --git a/iOSClient/Images.xcassets/photo.imageset/file_photo_menu.pdf b/iOSClient/Images.xcassets/photo.imageset/file_photo_menu.pdf new file mode 100644 index 0000000000..2439cdd6b2 Binary files /dev/null and b/iOSClient/Images.xcassets/photo.imageset/file_photo_menu.pdf differ diff --git a/iOSClient/Images.xcassets/tabBarMore.imageset/Contents.json b/iOSClient/Images.xcassets/tabBarMore.imageset/Contents.json new file mode 100644 index 0000000000..27f050f497 --- /dev/null +++ b/iOSClient/Images.xcassets/tabBarMore.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "tabBarMore.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/iOSClient/Images.xcassets/photo.imageset/photo.pdf b/iOSClient/Images.xcassets/tabBarMore.imageset/tabBarMore.pdf similarity index 96% rename from iOSClient/Images.xcassets/photo.imageset/photo.pdf rename to iOSClient/Images.xcassets/tabBarMore.imageset/tabBarMore.pdf index 515ca27a10..9a950a9b28 100644 Binary files a/iOSClient/Images.xcassets/photo.imageset/photo.pdf and b/iOSClient/Images.xcassets/tabBarMore.imageset/tabBarMore.pdf differ diff --git a/iOSClient/Main/NCMainTabBar.swift b/iOSClient/Main/NCMainTabBar.swift index 60b198e5f7..19c9aa5aa3 100644 --- a/iOSClient/Main/NCMainTabBar.swift +++ b/iOSClient/Main/NCMainTabBar.swift @@ -133,7 +133,7 @@ class NCMainTabBar: UITabBar { } // + - let imagePlus = UIImage(systemName: "plus", withConfiguration: UIImage.SymbolConfiguration(scale: .large))?.applyingSymbolConfiguration(UIImage.SymbolConfiguration(paletteColors: [.white])) + let imagePlus = UIImage(named: "tabBarPlus")?.image(color: .white, size: 100) if let item = items?[2] { item.title = "" item.image = nil @@ -143,15 +143,14 @@ class NCMainTabBar: UITabBar { // Media if let item = items?[3] { item.title = NSLocalizedString("_media_", comment: "") - item.image = UIImage(systemName: "photo") + item.image = UIImage(named: "media")?.image(color: color, size: 25) item.selectedImage = item.image } // More if let item = items?[4] { item.title = NSLocalizedString("_more_", comment: "") - item.image = UIImage(systemName: "line.3.horizontal") - item.image = UIImage(systemName: "ellipsis") + item.image = UIImage(named: "tabBarMore")?.image(color: color, size: 25) item.selectedImage = item.image } diff --git a/iOSClient/Media/NCMedia+CollectionViewDataSource.swift b/iOSClient/Media/NCMedia+CollectionViewDataSource.swift index fd767902d9..e0e4bc4e24 100644 --- a/iOSClient/Media/NCMedia+CollectionViewDataSource.swift +++ b/iOSClient/Media/NCMedia+CollectionViewDataSource.swift @@ -29,7 +29,7 @@ extension NCMedia: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { if kind == mediaSectionHeader { guard let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionFirstHeaderEmptyData", for: indexPath) as? NCSectionFirstHeaderEmptyData else { return NCSectionFirstHeaderEmptyData() } - header.emptyImage.image = utility.loadImage(named: "photo", colors: [NCBrandColor.shared.getElement(account: session.account)]) + header.emptyImage.image = UIImage(named: "media")?.image(color: .gray, size: UIScreen.main.bounds.width) if self.hasRunSearchMedia { header.emptyTitle.text = NSLocalizedString("_search_in_progress_", comment: "") } else { diff --git a/iOSClient/Menu/AppDelegate+Menu.swift b/iOSClient/Menu/AppDelegate+Menu.swift index c8bce52be1..82aeef80da 100644 --- a/iOSClient/Menu/AppDelegate+Menu.swift +++ b/iOSClient/Menu/AppDelegate+Menu.swift @@ -101,7 +101,7 @@ extension AppDelegate { } let titleCreateFolder = isDirectoryE2EE ? NSLocalizedString("_create_folder_e2ee_", comment: "") : NSLocalizedString("_create_folder_", comment: "") - let imageCreateFolder = isDirectoryE2EE ? NCImageCache.shared.getFolderEncrypted(account: session.account) : NCImageCache.shared.getFolder(account: session.account) + let imageCreateFolder = isDirectoryE2EE ? NCImageCache.shared.getEncryptedFolder() : NCImageCache.shared.getAddFolder() actions.append( NCMenuAction(title: titleCreateFolder, icon: imageCreateFolder, action: { _ in @@ -115,7 +115,7 @@ extension AppDelegate { if !isDirectoryE2EE && NCKeychain().isEndToEndEnabled(account: session.account) { actions.append( NCMenuAction(title: NSLocalizedString("_create_folder_e2ee_", comment: ""), - icon: NCImageCache.shared.getFolderEncrypted(account: session.account), + icon: NCImageCache.shared.getEncryptedFolder(), action: { _ in let alertController = UIAlertController.createFolder(serverUrl: serverUrl, session: session, markE2ee: true, sceneIdentifier: controller.sceneIdentifier) controller.present(alertController, animated: true, completion: nil) @@ -130,7 +130,7 @@ extension AppDelegate { if NCCapabilities.shared.getCapabilities(account: session.account).capabilityServerVersionMajor >= NCGlobal.shared.nextcloudVersion18 && directory?.richWorkspace == nil && !isDirectoryE2EE && NextcloudKit.shared.isNetworkReachable() { actions.append( NCMenuAction( - title: NSLocalizedString("_add_folder_info_", comment: ""), icon: NCUtility().loadImage(named: "list.dash.header.rectangle", colors: [NCBrandColor.shared.iconImageColor]), action: { _ in + title: NSLocalizedString("_add_folder_info_", comment: ""), icon: NCImageCache.shared.getAddFolderInfo(), action: { _ in let richWorkspaceCommon = NCRichWorkspaceCommon() if let viewController = controller.currentViewController() { if NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileNameView LIKE[c] %@", diff --git a/iOSClient/NCImageCache.swift b/iOSClient/NCImageCache.swift index 3c59493e67..3c506bcd48 100644 --- a/iOSClient/NCImageCache.swift +++ b/iOSClient/NCImageCache.swift @@ -27,8 +27,8 @@ import LRUCache import NextcloudKit import RealmSwift -class NCImageCache: NSObject { - static let shared = NCImageCache() +@objc class NCImageCache: NSObject { + @objc static let shared = NCImageCache() private let utility = NCUtility() private let global = NCGlobal.shared @@ -230,9 +230,21 @@ class NCImageCache: NSObject { return UIImage(named: "folder")!.image(color: NCBrandColor.shared.getElement(account: account)) } + func getAddFolder() -> UIImage { + return UIImage(named: "addFolder")! + } + + func getAddFolderInfo() -> UIImage { + return UIImage(named: "addFolderInfo")!.imageColor(NCBrandColor.shared.iconImageColor) + } + func getFolderEncrypted(account: String) -> UIImage { return UIImage(named: "folderEncrypted")!.image(color: NCBrandColor.shared.getElement(account: account)) } + + func getEncryptedFolder() -> UIImage { + return UIImage(named: "encryptedfolder")!.imageColor(NCBrandColor.shared.iconImageColor) + } func getFolderSharedWithMe(account: String) -> UIImage { return UIImage(named: "folder_shared_with_me")!.image(color: NCBrandColor.shared.getElement(account: account))