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",
"components" : {
"alpha" : "1.000",
"blue" : "255",
"green" : "255",
"red" : "255"
"blue" : "0xFE",
"green" : "0xFF",
"red" : "0xFE"
}
},
"idiom" : "universal"
@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x37",
"green" : "0x2D",
"red" : "0x29"
"blue" : "0x2E",
"green" : "0x2C",
"red" : "0x2C"
}
},
"idiom" : "universal"

View File

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

View File

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

View File

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

View File

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

View File

@ -34,7 +34,13 @@ extension ProfileRelationshipActionButton {
setTitleColor(UIColor.white.withAlphaComponent(0.5), for: .highlighted)
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: .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)
// 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 following
case muting
case blocking
case blocked
case blocking
case edit
case editing
@ -326,8 +326,8 @@ extension ProfileViewModel {
static let pending = RelationshipAction.pending.option
static let following = RelationshipAction.following.option
static let muting = RelationshipAction.muting.option
static let blocking = RelationshipAction.blocking.option
static let blocked = RelationshipAction.blocked.option
static let blocking = RelationshipAction.blocking.option
static let edit = RelationshipAction.edit.option
static let editing = RelationshipAction.editing.option
@ -353,8 +353,8 @@ extension ProfileViewModel {
case .pending: return L10n.Common.Controls.Firendship.pending
case .following: return L10n.Common.Controls.Firendship.following
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 .blocking: return L10n.Common.Controls.Firendship.blocked
case .edit: return L10n.Common.Controls.Firendship.editInfo
case .editing: return L10n.Common.Controls.Actions.done
}
@ -371,8 +371,8 @@ extension ProfileViewModel {
case .pending: return Asset.Colors.Button.normal.color
case .following: return Asset.Colors.Button.normal.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 .blocking: return Asset.Colors.Background.danger.color
case .edit: return Asset.Colors.Button.normal.color
case .editing: return Asset.Colors.Button.normal.color
}