Add code code to the notifications icons
This commit is contained in:
parent
e0d6340a9d
commit
d2c520d306
|
@ -53,7 +53,7 @@ struct NotificationRowView: View {
|
||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
Circle()
|
Circle()
|
||||||
.strokeBorder(Color.white, lineWidth: 1)
|
.strokeBorder(Color.white, lineWidth: 1)
|
||||||
.background(Circle().foregroundColor(theme.tintColor))
|
.background(Circle().foregroundColor(type.tintColor()))
|
||||||
.frame(width: 24, height: 24)
|
.frame(width: 24, height: 24)
|
||||||
|
|
||||||
Image(systemName: type.iconName())
|
Image(systemName: type.iconName())
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Models
|
import Models
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import DesignSystem
|
||||||
|
|
||||||
extension Models.Notification.NotificationType {
|
extension Models.Notification.NotificationType {
|
||||||
func label(count: Int) -> LocalizedStringKey {
|
func label(count: Int) -> LocalizedStringKey {
|
||||||
|
@ -42,6 +43,19 @@ extension Models.Notification.NotificationType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func tintColor() -> Color {
|
||||||
|
switch self {
|
||||||
|
case .status, .mention, .update, .poll:
|
||||||
|
return Theme.shared.tintColor.opacity(0.80)
|
||||||
|
case .reblog:
|
||||||
|
return Color.teal.opacity(0.80)
|
||||||
|
case .follow, .follow_request:
|
||||||
|
return Color.cyan.opacity(0.80)
|
||||||
|
case .favourite:
|
||||||
|
return Color.yellow.opacity(0.80)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func menuTitle() -> LocalizedStringKey {
|
func menuTitle() -> LocalizedStringKey {
|
||||||
switch self {
|
switch self {
|
||||||
case .status:
|
case .status:
|
||||||
|
|
Loading…
Reference in New Issue