Skip to content

Commit

Permalink
Improve button colors in ContactDetails
Browse files Browse the repository at this point in the history
Change the `Add Contact` button to primary color.
Make the notification and encryption button text match their label's color.
  • Loading branch information
lissine0 authored and tmolitor-stud-tu committed Sep 16, 2024
1 parent 7b25993 commit 8683326
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Monal/Classes/ContactDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,25 +275,24 @@ struct ContactDetails: View {
contact.isMuc ? Text("Notifications disabled") : Text("Contact is muted")
} icon: {
Image(systemName: "bell.slash.fill")
.foregroundColor(.red)
}
.foregroundStyle(Color.red)
} else if contact.isMuc && contact.isMentionOnly {
Label {
Text("Notify only when mentioned")
} icon: {
Image(systemName: "bell.badge")
.foregroundColor(.primary)
}
.foregroundStyle(Color.primary)
} else {
Label {
contact.isMuc ? Text("Notify on all messages") : Text("Contact is not muted")
} icon: {
Image(systemName: "bell.fill")
.foregroundColor(.green)
}
.foregroundStyle(Color.green)
}
}
.tint(Color.primary)
}

#if !DISABLE_OMEMO
Expand All @@ -310,15 +309,15 @@ struct ContactDetails: View {
Text("Messages are encrypted")
} icon: {
Image(systemName: "lock.fill")
.foregroundColor(.green)
}
.foregroundStyle(Color.green)
} else {
Label {
Text("Messages are NOT encrypted")
} icon: {
Image(systemName: "lock.open.fill")
.foregroundColor(.red)
}
.foregroundStyle(Color.red)
}
}
.alert(isPresented: $showingCannotEncryptAlert) {
Expand Down Expand Up @@ -394,7 +393,6 @@ struct ContactDetails: View {
}) {
Text("Show shared Media and Files")
}
.tint(Color.primary)
}
NavigationLink(destination: LazyClosureView{MediaGalleryView(contact: contact.contactJid as String, accountID: contact.accountID)}) {
Text("View Media Gallery")
Expand Down Expand Up @@ -632,6 +630,7 @@ struct ContactDetails: View {
#endif
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.tint(Color.primary)
.addLoadingOverlay(overlay)
.navigationBarTitle(contact.contactDisplayName as String, displayMode:.inline)
.alert(isPresented: $showAlert) {
Expand Down

0 comments on commit 8683326

Please sign in to comment.