From 1d980f192590db5448ae13747b597bba60dca297 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Mon, 24 Aug 2020 10:25:03 +1000 Subject: [PATCH] Use the proper iOS approach for light mode --- Signal.xcodeproj/project.pbxproj | 8 +++ Signal/Signal-Info.plist | 4 +- Signal/src/AppDelegate.m | 33 +++++++++++- .../Loki/View Controllers/SettingsVC.swift | 23 ++++---- .../Loki/Redesign/Style Guide/AppMode.swift | 50 +++++++++++++---- .../Loki/Redesign/Style Guide/Colors.swift | 54 +++++++++---------- .../Style Guide/Colors.xcassets/Contents.json | 6 +++ .../session_accent.colorset/Contents.json | 38 +++++++++++++ .../session_border.colorset/Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../session_separator.colorset/Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../session_text.colorset/Contents.json | 38 +++++++++++++ .../Contents.json | 20 +++++++ .../Contents.json | 38 +++++++++++++ .../Loki/Redesign/Style Guide/Gradients.swift | 4 +- .../src/Loki/Utilities/LKUserDefaults.swift | 1 - .../Loki/Utilities/Notification+Loki.swift | 2 - 37 files changed, 955 insertions(+), 58 deletions(-) create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_accent.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_border.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_button_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_selected.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_text_field_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_destructive.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_text.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_border.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_navigation_bar_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_collapsed_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_shadow.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_paths_building.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_border.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_received_message_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_placeholder.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_sent_message_background.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_separator.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_setting_button_selected.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_text.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant.colorset/Contents.json create mode 100644 SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant_button_background.colorset/Contents.json diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 1e7755115..fb942f767 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -585,6 +585,9 @@ C3638C0524C7F0B500AF29BC /* LK002RemoveFriendRequests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3638C0424C7F0B500AF29BC /* LK002RemoveFriendRequests.swift */; }; C369549D24D27A3500CEB4E3 /* MultiDeviceRemovalSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C369549C24D27A3500CEB4E3 /* MultiDeviceRemovalSheet.swift */; }; C36B8707243C50C60049991D /* SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; }; + C39DD28824F3318C008590FC /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C39DD28724F3318C008590FC /* Colors.xcassets */; }; + C39DD28A24F3336E008590FC /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C39DD28724F3318C008590FC /* Colors.xcassets */; }; + C39DD28B24F3336F008590FC /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C39DD28724F3318C008590FC /* Colors.xcassets */; }; C3C3CF8924D8EED300E1CCE7 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C3CF8824D8EED300E1CCE7 /* TextView.swift */; }; C3DAB3242480CB2B00725F25 /* SRCopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DAB3232480CB2A00725F25 /* SRCopyableLabel.swift */; }; C3DFFAC623E96F0D0058DAF8 /* Sheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC523E96F0D0058DAF8 /* Sheet.swift */; }; @@ -1373,6 +1376,7 @@ C35E8AAD2485E51D00ACB629 /* IP2Country.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IP2Country.swift; sourceTree = ""; }; C3638C0424C7F0B500AF29BC /* LK002RemoveFriendRequests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LK002RemoveFriendRequests.swift; sourceTree = ""; }; C369549C24D27A3500CEB4E3 /* MultiDeviceRemovalSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiDeviceRemovalSheet.swift; sourceTree = ""; }; + C39DD28724F3318C008590FC /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; C3AA6BB824CE8F1B002358B6 /* Migrating Translations from Android.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "Migrating Translations from Android.md"; sourceTree = ""; }; C3AECBEA24EF5244005743DE /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = translations/fa.lproj/Localizable.strings; sourceTree = ""; }; C3C3CF8824D8EED300E1CCE7 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; @@ -2615,6 +2619,7 @@ children = ( B8C9689023FA1401005F64E0 /* AppMode.swift */, B8BB829F238F322400BA5194 /* Colors.swift */, + C39DD28724F3318C008590FC /* Colors.xcassets */, B8BB82BD2394D4CE00BA5194 /* Fonts.swift */, B8BB82A8238F62FB00BA5194 /* Gradients.swift */, B8BB82A1238F356100BA5194 /* Values.swift */, @@ -3174,6 +3179,7 @@ 347850331FD7494A007B8332 /* fontawesome-webfont.ttf in Resources */, 3478504C1FD7496D007B8332 /* Images.xcassets in Resources */, 347850311FD7494A007B8332 /* dripicons-v2.ttf in Resources */, + C39DD28B24F3336F008590FC /* Colors.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3181,6 +3187,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + C39DD28824F3318C008590FC /* Colors.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3241,6 +3248,7 @@ 45B74A852044AAB600CD42F8 /* bamboo.aifc in Resources */, 45B74A782044AAB600CD42F8 /* bamboo-quiet.aifc in Resources */, 45B74A7B2044AAB600CD42F8 /* chord.aifc in Resources */, + C39DD28A24F3336E008590FC /* Colors.xcassets in Resources */, 45B74A812044AAB600CD42F8 /* chord-quiet.aifc in Resources */, 45B74A832044AAB600CD42F8 /* circles.aifc in Resources */, 45B74A892044AAB600CD42F8 /* circles-quiet.aifc in Resources */, diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index af121ada0..b91d44ca3 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -5,9 +5,9 @@ BuildDetails CarthageVersion - 0.35.0 + 0.34.0 OSXVersion - 10.15.6 + 10.15.5 WebRTCCommit 1445d719bf05280270e9f77576f80f973fd847f8 M73 diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 4faa52ac1..eeb6fc4d9 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -56,7 +56,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; static NSTimeInterval launchStartedAt; -@interface AppDelegate () +@interface AppDelegate () @property (nonatomic) BOOL hasInitialRootViewController; @property (nonatomic) BOOL areVersionMigrationsComplete; @@ -190,6 +190,8 @@ static NSTimeInterval launchStartedAt; launchStartedAt = CACurrentMediaTime(); + [LKAppModeManager configureWithDelegate:self]; + BOOL isLoggingEnabled; #ifdef DEBUG // Specified at Product -> Scheme -> Edit Scheme -> Test -> Arguments -> Environment to avoid things like @@ -933,6 +935,35 @@ static NSTimeInterval launchStartedAt; - (void)stopOpenGroupPollers { [LKPublicChatManager.shared stopPollers]; } +# pragma mark - App Mode + +- (LKAppMode)getCurrentAppMode { + UIWindow *window = UIApplication.sharedApplication.keyWindow; + if (window == nil) { return LKAppModeLight; } + UIUserInterfaceStyle userInterfaceStyle = window.traitCollection.userInterfaceStyle; + BOOL isLightMode = userInterfaceStyle == UIUserInterfaceStyleUnspecified || userInterfaceStyle == UIUserInterfaceStyleLight; + return isLightMode ? LKAppModeLight : LKAppModeDark; +} + +- (void)setCurrentAppModeTo:(LKAppMode)appMode { + UIWindow *window = UIApplication.sharedApplication.keyWindow; + if (window == nil) { return; } + switch (appMode) { + case LKAppModeLight: { + if (@available(iOS 13.0, *)) { + window.overrideUserInterfaceStyle = UIUserInterfaceStyleUnspecified; + } + break; + } + case LKAppModeDark: { + if (@available(iOS 13.0, *)) { + window.overrideUserInterfaceStyle = UIUserInterfaceStyleDark; + } + break; + } + } +} + # pragma mark - Other - (void)handleDataNukeRequested:(NSNotification *)notification diff --git a/Signal/src/Loki/View Controllers/SettingsVC.swift b/Signal/src/Loki/View Controllers/SettingsVC.swift index 9f93aed86..231de81d5 100644 --- a/Signal/src/Loki/View Controllers/SettingsVC.swift +++ b/Signal/src/Loki/View Controllers/SettingsVC.swift @@ -128,12 +128,6 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { stackView.pin(to: scrollView) view.addSubview(scrollView) scrollView.pin(to: view) - // Register for notifications - NotificationCenter.default.addObserver(self, selector: #selector(handleAppModeSwitchedNotification(_:)), name: .appModeSwitched, object: nil) - } - - deinit { - NotificationCenter.default.removeObserver(self) } private func getSettingButtons() -> [UIView] { @@ -239,12 +233,16 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { let closeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "X"), style: .plain, target: self, action: #selector(close)) closeButton.tintColor = Colors.text navigationItem.leftBarButtonItem = closeButton - let appModeIcon = UserDefaults.standard[.isUsingDarkMode] ? #imageLiteral(resourceName: "ic_dark_theme_on") : #imageLiteral(resourceName: "ic_dark_theme_off") - let appModeButton = UIBarButtonItem(image: appModeIcon, style: .plain, target: self, action: #selector(switchAppMode)) - appModeButton.tintColor = Colors.text let qrCodeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "QRCode"), style: .plain, target: self, action: #selector(showQRCode)) qrCodeButton.tintColor = Colors.text - navigationItem.rightBarButtonItems = [ qrCodeButton/*, appModeButton*/ ] + var rightBarButtonItems: [UIBarButtonItem] = [ qrCodeButton ] + if #available(iOS 13, *) { // Pre iOS 13 the user can't switch actively but the app still responds to system changes + let appModeIcon = isDarkMode ? #imageLiteral(resourceName: "ic_dark_theme_on") : #imageLiteral(resourceName: "ic_dark_theme_off") + let appModeButton = UIBarButtonItem(image: appModeIcon, style: .plain, target: self, action: #selector(switchAppMode)) + appModeButton.tintColor = Colors.text + rightBarButtonItems.append(appModeButton) + } + navigationItem.rightBarButtonItems = rightBarButtonItems } } @@ -297,9 +295,8 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { } @objc private func switchAppMode() { - let isUsingDarkMode = UserDefaults.standard[.isUsingDarkMode] - UserDefaults.standard[.isUsingDarkMode] = !isUsingDarkMode - NotificationCenter.default.post(name: .appModeSwitched, object: nil) + let newAppMode: AppMode = isLightMode ? .dark : .light + AppModeManager.shared.setCurrentAppMode(to: newAppMode) } @objc private func showQRCode() { diff --git a/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift b/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift index 26fadb3d5..aa507d26b 100644 --- a/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift +++ b/SignalMessaging/Loki/Redesign/Style Guide/AppMode.swift @@ -1,28 +1,58 @@ -public enum AppMode { +@objc(LKAppModeManager) +public final class AppModeManager : NSObject { + private let delegate: AppModeManagerDelegate + + public var currentAppMode: AppMode { + return delegate.getCurrentAppMode() + } + + public static var shared: AppModeManager! + + @objc(configureWithDelegate:) + public static func configure(delegate: AppModeManagerDelegate) { + shared = AppModeManager(delegate: delegate) + } + + private init(delegate: AppModeManagerDelegate) { + self.delegate = delegate + super.init() + } + + private override init() { preconditionFailure("Use init(delegate:) instead.") } + + public func setCurrentAppMode(to appMode: AppMode) { + delegate.setCurrentAppMode(to: appMode) + } +} + +@objc(LKAppModeManagerDelegate) +public protocol AppModeManagerDelegate { + + func getCurrentAppMode() -> AppMode + func setCurrentAppMode(to appMode: AppMode) +} + +@objc(LKAppMode) +public enum AppMode : Int { case light, dark - - public static var current: AppMode = .dark -// public static var current: AppMode { -// return UserDefaults.standard[.isUsingDarkMode] ? .dark : .light -// } } public var isLightMode: Bool { - return AppMode.current == .light + return AppModeManager.shared.currentAppMode == .light } public var isDarkMode: Bool { - return AppMode.current == .dark + return AppModeManager.shared.currentAppMode == .dark } @objc public final class LKAppModeUtilities : NSObject { @objc public static var isLightMode: Bool { - return AppMode.current == .light + return AppModeManager.shared.currentAppMode == .light } @objc public static var isDarkMode: Bool { - return AppMode.current == .dark + return AppModeManager.shared.currentAppMode == .dark } } diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.swift b/SignalMessaging/Loki/Redesign/Style Guide/Colors.swift index a76bba513..8b08ddc50 100644 --- a/SignalMessaging/Loki/Redesign/Style Guide/Colors.swift +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.swift @@ -12,31 +12,31 @@ @objc(LKColors) public final class Colors : NSObject { - @objc public static var accent = isLightMode ? UIColor(hex: 0x00E97B) : UIColor(hex: 0x00F782) - @objc public static var text = isLightMode ? UIColor(hex: 0x000000) : UIColor(hex: 0xFFFFFF) - @objc public static var destructive = UIColor(hex: 0xFF453A) - @objc public static var unimportant = UIColor(hex: 0xD8D8D8) - @objc public static var border = UIColor(hex: 0x979797) - @objc public static var cellBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x1B1B1B) - @objc public static var cellSelected = isLightMode ? UIColor(hex: 0xDFDFDF) : UIColor(hex: 0x0C0C0C) - @objc public static var navigationBarBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x161616) - @objc public static var searchBarPlaceholder = UIColor(hex: 0x8E8E93) // Also used for the icons - @objc public static var searchBarBackground = UIColor(red: 142 / 255, green: 142 / 255, blue: 147 / 255, alpha: 0.12) - @objc public static var newConversationButtonShadow = UIColor(hex: 0x077C44) - @objc public static var separator = UIColor(hex: 0x36383C) - @objc public static var unimportantButtonBackground = isLightMode ? UIColor.clear : UIColor(hex: 0x323232) - @objc public static var buttonBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x1B1B1B) - @objc public static var settingButtonSelected = isLightMode ? UIColor(hex: 0xDFDFDF) : UIColor(hex: 0x0C0C0C) - @objc public static var modalBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x101011) - @objc public static var modalBorder = UIColor(hex: 0x212121) - @objc public static var fakeChatBubbleBackground = isLightMode ? UIColor(hex: 0xF5F5F5) : UIColor(hex: 0x3F4146) - @objc public static var fakeChatBubbleText = UIColor(hex: 0x000000) - @objc public static var composeViewBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x1B1B1B) - @objc public static var composeViewTextFieldBackground = isLightMode ? UIColor(hex: 0xEDEDED) : UIColor(hex: 0x141414) - @objc public static var receivedMessageBackground = isLightMode ? UIColor(hex: 0xF5F5F5) : UIColor(hex: 0x222325) - @objc public static var sentMessageBackground = isLightMode ? UIColor(hex: 0x00E97B) : UIColor(hex: 0x3F4146) - @objc public static var newConversationButtonCollapsedBackground = isLightMode ? UIColor(hex: 0xF5F5F5) : UIColor(hex: 0x1F1F1F) - @objc public static var pnOptionBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x1B1B1B) - @objc public static var pnOptionBorder = UIColor(hex: 0x212121) - @objc public static var pathsBuilding = UIColor(hex: 0xFFCE3A) + @objc public static var accent = UIColor(named: "session_accent")! + @objc public static var text = UIColor(named: "session_text")! + @objc public static var destructive = UIColor(named: "session_destructive")! + @objc public static var unimportant = UIColor(named: "session_unimportant")! + @objc public static var border = UIColor(named: "session_border")! + @objc public static var cellBackground = UIColor(named: "session_cell_background")! + @objc public static var cellSelected = UIColor(named: "session_cell_selected")! + @objc public static var navigationBarBackground = UIColor(named: "session_navigation_bar_background")! + @objc public static var searchBarPlaceholder = UIColor(named: "session_search_bar_placeholder")! // Also used for the icons + @objc public static var searchBarBackground = UIColor(named: "session_search_bar_background")! + @objc public static var newConversationButtonShadow = UIColor(named: "session_new_conversation_button_shadow")! + @objc public static var separator = UIColor(named: "session_separator")! + @objc public static var unimportantButtonBackground = UIColor(named: "session_unimportant_button_background")! + @objc public static var buttonBackground = UIColor(named: "session_button_background")! + @objc public static var settingButtonSelected = UIColor(named: "session_setting_button_selected")! + @objc public static var modalBackground = UIColor(named: "session_modal_background")! + @objc public static var modalBorder = UIColor(named: "session_modal_border")! + @objc public static var fakeChatBubbleBackground = UIColor(named: "session_fake_chat_bubble_background")! + @objc public static var fakeChatBubbleText = UIColor(named: "session_fake_chat_bubble_text")! + @objc public static var composeViewBackground = UIColor(named: "session_compose_view_background")! + @objc public static var composeViewTextFieldBackground = UIColor(named: "session_compose_view_text_field_background")! + @objc public static var receivedMessageBackground = UIColor(named: "session_received_message_background")! + @objc public static var sentMessageBackground = UIColor(named: "session_sent_message_background")! + @objc public static var newConversationButtonCollapsedBackground = UIColor(named: "session_new_conversation_button_collapsed_background")! + @objc public static var pnOptionBackground = UIColor(named: "session_pn_option_background")! + @objc public static var pnOptionBorder = UIColor(named: "session_pn_option_border")! + @objc public static var pathsBuilding = UIColor(named: "session_paths_building")! } diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_accent.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_accent.colorset/Contents.json new file mode 100644 index 000000000..eb0929bd3 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_accent.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x7B", + "green" : "0xE9", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x82", + "green" : "0xF7", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_border.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_border.colorset/Contents.json new file mode 100644 index 000000000..d26719158 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_border.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x97", + "green" : "0x97", + "red" : "0x97" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_button_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_button_background.colorset/Contents.json new file mode 100644 index 000000000..9f3131695 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_button_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1B", + "green" : "0x1B", + "red" : "0x1B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_background.colorset/Contents.json new file mode 100644 index 000000000..9f3131695 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1B", + "green" : "0x1B", + "red" : "0x1B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_selected.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_selected.colorset/Contents.json new file mode 100644 index 000000000..6ac8ef346 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_cell_selected.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xDF", + "green" : "0xDF", + "red" : "0xDF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x0C", + "green" : "0x0C", + "red" : "0x0C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_background.colorset/Contents.json new file mode 100644 index 000000000..9f3131695 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1B", + "green" : "0x1B", + "red" : "0x1B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_text_field_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_text_field_background.colorset/Contents.json new file mode 100644 index 000000000..474c4bdf7 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_compose_view_text_field_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xED", + "green" : "0xED", + "red" : "0xED" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x14", + "green" : "0x14", + "red" : "0x14" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_destructive.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_destructive.colorset/Contents.json new file mode 100644 index 000000000..afefc4599 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_destructive.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3A", + "green" : "0x45", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_background.colorset/Contents.json new file mode 100644 index 000000000..9e50983f0 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF5", + "green" : "0xF5", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x46", + "green" : "0x41", + "red" : "0x3F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_text.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_text.colorset/Contents.json new file mode 100644 index 000000000..7e8f38fe3 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_fake_chat_bubble_text.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_background.colorset/Contents.json new file mode 100644 index 000000000..d49aebfdc --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x11", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_border.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_border.colorset/Contents.json new file mode 100644 index 000000000..5c9b7b975 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_modal_border.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x21", + "green" : "0x21", + "red" : "0x21" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_navigation_bar_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_navigation_bar_background.colorset/Contents.json new file mode 100644 index 000000000..0ecfa5c92 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_navigation_bar_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x16", + "green" : "0x16", + "red" : "0x16" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_collapsed_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_collapsed_background.colorset/Contents.json new file mode 100644 index 000000000..624351106 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_collapsed_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF5", + "green" : "0xF5", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x1F", + "red" : "0x1F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_shadow.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_shadow.colorset/Contents.json new file mode 100644 index 000000000..da8b43bc7 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_new_conversation_button_shadow.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x44", + "green" : "0x7C", + "red" : "0x07" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_paths_building.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_paths_building.colorset/Contents.json new file mode 100644 index 000000000..78122617a --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_paths_building.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3A", + "green" : "0xCE", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_background.colorset/Contents.json new file mode 100644 index 000000000..9f3131695 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xFC", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1B", + "green" : "0x1B", + "red" : "0x1B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_border.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_border.colorset/Contents.json new file mode 100644 index 000000000..5c9b7b975 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_pn_option_border.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x21", + "green" : "0x21", + "red" : "0x21" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_received_message_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_received_message_background.colorset/Contents.json new file mode 100644 index 000000000..07b1767dd --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_received_message_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF5", + "green" : "0xF5", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x25", + "green" : "0x23", + "red" : "0x22" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_background.colorset/Contents.json new file mode 100644 index 000000000..2e2e0b5ba --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_background.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.120", + "blue" : "147", + "green" : "142", + "red" : "142" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_placeholder.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_placeholder.colorset/Contents.json new file mode 100644 index 000000000..11d344a13 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_search_bar_placeholder.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x93", + "green" : "0x8E", + "red" : "0x8E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_sent_message_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_sent_message_background.colorset/Contents.json new file mode 100644 index 000000000..3ecf00826 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_sent_message_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x7B", + "green" : "0xE9", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x46", + "green" : "0x41", + "red" : "0x3F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_separator.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_separator.colorset/Contents.json new file mode 100644 index 000000000..e8339b30e --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_separator.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3C", + "green" : "0x38", + "red" : "0x36" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_setting_button_selected.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_setting_button_selected.colorset/Contents.json new file mode 100644 index 000000000..6ac8ef346 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_setting_button_selected.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xDF", + "green" : "0xDF", + "red" : "0xDF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x0C", + "green" : "0x0C", + "red" : "0x0C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_text.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_text.colorset/Contents.json new file mode 100644 index 000000000..d89071918 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_text.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.000", + "green" : "0.000", + "red" : "0.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant.colorset/Contents.json new file mode 100644 index 000000000..615ea3a00 --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD8", + "green" : "0xD8", + "red" : "0xD8" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant_button_background.colorset/Contents.json b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant_button_background.colorset/Contents.json new file mode 100644 index 000000000..a8196c65c --- /dev/null +++ b/SignalMessaging/Loki/Redesign/Style Guide/Colors.xcassets/session_unimportant_button_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x32", + "green" : "0x32", + "red" : "0x32" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SignalMessaging/Loki/Redesign/Style Guide/Gradients.swift b/SignalMessaging/Loki/Redesign/Style Guide/Gradients.swift index e95c8a17a..e9e2f4821 100644 --- a/SignalMessaging/Loki/Redesign/Style Guide/Gradients.swift +++ b/SignalMessaging/Loki/Redesign/Style Guide/Gradients.swift @@ -27,14 +27,14 @@ public final class Gradient : NSObject { final public class Gradients : NSObject { @objc public static var defaultLokiBackground: Gradient { - switch AppMode.current { + switch AppModeManager.shared.currentAppMode { case .light: return Gradient(start: UIColor(hex: 0xFCFCFC), end: UIColor(hex: 0xFFFFFF)) case .dark: return Gradient(start: UIColor(hex: 0x171717), end: UIColor(hex: 0x121212)) } } @objc public static var homeVCFade: Gradient { - switch AppMode.current { + switch AppModeManager.shared.currentAppMode { case .light: return Gradient(start: UIColor(hex: 0xFFFFFF).withAlphaComponent(0), end: UIColor(hex: 0xFFFFFF)) case .dark: return Gradient(start: UIColor(hex: 0x000000).withAlphaComponent(0), end: UIColor(hex: 0x000000)) } diff --git a/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift b/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift index 7023b3a49..21ab9158d 100644 --- a/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift +++ b/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift @@ -10,7 +10,6 @@ public enum LKUserDefaults { case hasViewedSeed /// Whether the device was unlinked as a slave device (used to notify the user on the landing screen). case wasUnlinked - case isUsingDarkMode case isUsingFullAPNs } diff --git a/SignalServiceKit/src/Loki/Utilities/Notification+Loki.swift b/SignalServiceKit/src/Loki/Utilities/Notification+Loki.swift index 1385a044a..da6894d6d 100644 --- a/SignalServiceKit/src/Loki/Utilities/Notification+Loki.swift +++ b/SignalServiceKit/src/Loki/Utilities/Notification+Loki.swift @@ -2,7 +2,6 @@ public extension Notification.Name { // State changes - public static let appModeSwitched = Notification.Name("appModeSwitched") public static let blockedContactsUpdated = Notification.Name("blockedContactsUpdated") public static let contactOnlineStatusChanged = Notification.Name("contactOnlineStatusChanged") public static let groupThreadUpdated = Notification.Name("groupThreadUpdated") @@ -29,7 +28,6 @@ public extension Notification.Name { @objc public extension NSNotification { // State changes - @objc public static let appModeSwitched = Notification.Name.appModeSwitched.rawValue as NSString @objc public static let blockedContactsUpdated = Notification.Name.blockedContactsUpdated.rawValue as NSString @objc public static let contactOnlineStatusChanged = Notification.Name.contactOnlineStatusChanged.rawValue as NSString @objc public static let groupThreadUpdated = Notification.Name.groupThreadUpdated.rawValue as NSString