chore: update dark mode color for background. Make blocking high priority then blocked

This commit is contained in:
CMK 2021-04-06 17:12:25 +08:00
parent 9612cc3902
commit 021d6036cd
8 changed files with 31 additions and 62 deletions

View File

@ -5,9 +5,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "255", "blue" : "0xFE",
"green" : "255", "green" : "0xFF",
"red" : "255" "red" : "0xFE"
} }
}, },
"idiom" : "universal" "idiom" : "universal"
@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0x37", "blue" : "0x2E",
"green" : "0x2D", "green" : "0x2C",
"red" : "0x29" "red" : "0x2C"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0.216", "blue" : "0x00",
"green" : "0.176", "green" : "0x00",
"red" : "0.161" "red" : "0x00"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -5,9 +5,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0xFF", "blue" : "0xFE",
"green" : "0xFF", "green" : "0xFF",
"red" : "0xFF" "red" : "0xFE"
} }
}, },
"idiom" : "universal" "idiom" : "universal"
@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0x2B", "blue" : "0x2E",
"green" : "0x23", "green" : "0x2C",
"red" : "0x1F" "red" : "0x2C"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -23,9 +23,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0x2B", "blue" : "0x00",
"green" : "0x23", "green" : "0x00",
"red" : "0x1F" "red" : "0x00"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -5,9 +5,9 @@
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"alpha" : "0.600", "alpha" : "0.600",
"blue" : "67", "blue" : "0x43",
"green" : "60", "green" : "0x3C",
"red" : "60" "red" : "0x3C"
} }
}, },
"idiom" : "universal" "idiom" : "universal"

View File

@ -34,7 +34,13 @@ extension ProfileRelationshipActionButton {
setTitleColor(UIColor.white.withAlphaComponent(0.5), for: .highlighted) setTitleColor(UIColor.white.withAlphaComponent(0.5), for: .highlighted)
setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .normal) setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .normal)
setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .highlighted) setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .highlighted)
setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .disabled) setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .disabled)
if let option = actionOptionSet.highPriorityAction(except: .editOptions), option == .blocked {
isEnabled = false
} else {
isEnabled = true
}
} }
} }

View File

@ -419,43 +419,6 @@ extension ProfileViewController {
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) // os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
// coordinator.present(scene: .drawerSidebar, from: self, transition: .custom(transitioningDelegate: drawerSidebarTransitionController)) // coordinator.present(scene: .drawerSidebar, from: self, transition: .custom(transitioningDelegate: drawerSidebarTransitionController))
// } // }
//
// @objc private func unmuteBarButtonItemPressed(_ sender: UIBarButtonItem) {
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
// guard let twitterUser = viewModel.twitterUser.value else {
// assertionFailure()
// return
// }
//
// UserProviderFacade.toggleMuteUser(
// context: context,
// twitterUser: twitterUser,
// muted: viewModel.muted.value
// )
// .sink { _ in
// // do nothing
// } receiveValue: { _ in
// // do nothing
// }
// .store(in: &disposeBag)
// }
//
// @objc private func moreMenuBarButtonItemPressed(_ sender: UIBarButtonItem) {
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
// guard let twitterUser = viewModel.twitterUser.value else {
// assertionFailure()
// return
// }
//
// let moreMenuAlertController = UserProviderFacade.createMoreMenuAlertControllerForUser(
// twitterUser: twitterUser,
// muted: viewModel.muted.value,
// blocked: viewModel.blocked.value,
// sender: sender,
// dependency: self
// )
// present(moreMenuAlertController, animated: true, completion: nil)
// }
} }

View File

@ -307,8 +307,8 @@ extension ProfileViewModel {
case pending case pending
case following case following
case muting case muting
case blocking
case blocked case blocked
case blocking
case edit case edit
case editing case editing
@ -326,8 +326,8 @@ extension ProfileViewModel {
static let pending = RelationshipAction.pending.option static let pending = RelationshipAction.pending.option
static let following = RelationshipAction.following.option static let following = RelationshipAction.following.option
static let muting = RelationshipAction.muting.option static let muting = RelationshipAction.muting.option
static let blocking = RelationshipAction.blocking.option
static let blocked = RelationshipAction.blocked.option static let blocked = RelationshipAction.blocked.option
static let blocking = RelationshipAction.blocking.option
static let edit = RelationshipAction.edit.option static let edit = RelationshipAction.edit.option
static let editing = RelationshipAction.editing.option static let editing = RelationshipAction.editing.option
@ -353,8 +353,8 @@ extension ProfileViewModel {
case .pending: return L10n.Common.Controls.Firendship.pending case .pending: return L10n.Common.Controls.Firendship.pending
case .following: return L10n.Common.Controls.Firendship.following case .following: return L10n.Common.Controls.Firendship.following
case .muting: return L10n.Common.Controls.Firendship.muted case .muting: return L10n.Common.Controls.Firendship.muted
case .blocking: return L10n.Common.Controls.Firendship.blocked
case .blocked: return L10n.Common.Controls.Firendship.follow // blocked by user case .blocked: return L10n.Common.Controls.Firendship.follow // blocked by user
case .blocking: return L10n.Common.Controls.Firendship.blocked
case .edit: return L10n.Common.Controls.Firendship.editInfo case .edit: return L10n.Common.Controls.Firendship.editInfo
case .editing: return L10n.Common.Controls.Actions.done case .editing: return L10n.Common.Controls.Actions.done
} }
@ -371,8 +371,8 @@ extension ProfileViewModel {
case .pending: return Asset.Colors.Button.normal.color case .pending: return Asset.Colors.Button.normal.color
case .following: return Asset.Colors.Button.normal.color case .following: return Asset.Colors.Button.normal.color
case .muting: return Asset.Colors.Background.alertYellow.color case .muting: return Asset.Colors.Background.alertYellow.color
case .blocking: return Asset.Colors.Background.danger.color
case .blocked: return Asset.Colors.Button.disabled.color case .blocked: return Asset.Colors.Button.disabled.color
case .blocking: return Asset.Colors.Background.danger.color
case .edit: return Asset.Colors.Button.normal.color case .edit: return Asset.Colors.Button.normal.color
case .editing: return Asset.Colors.Button.normal.color case .editing: return Asset.Colors.Button.normal.color
} }