mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat(nodes): Display role-specific icons (#4572)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
8c5bc65334
commit
5d198c7407
7 changed files with 145 additions and 21 deletions
|
|
@ -88,8 +88,8 @@ import org.meshtastic.core.ui.icon.KeyOff
|
|||
import org.meshtastic.core.ui.icon.Lock
|
||||
import org.meshtastic.core.ui.icon.MeshtasticIcons
|
||||
import org.meshtastic.core.ui.icon.Person
|
||||
import org.meshtastic.core.ui.icon.Role
|
||||
import org.meshtastic.core.ui.icon.Verified
|
||||
import org.meshtastic.core.ui.icon.role
|
||||
import org.meshtastic.core.ui.theme.AppTheme
|
||||
import org.meshtastic.core.ui.util.formatAgo
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ private fun NameAndRoleRow(node: Node) {
|
|||
InfoItem(
|
||||
label = stringResource(Res.string.role),
|
||||
value = node.user.role?.name ?: "",
|
||||
icon = MeshtasticIcons.Role,
|
||||
icon = MeshtasticIcons.role(node.user.role),
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ private fun NodeItemFooter(thatNode: Node, contentColor: Color) {
|
|||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
HardwareInfo(hwModel = thatNode.user.hw_model.name, contentColor = contentColor)
|
||||
RoleInfo(role = thatNode.user.role.name, contentColor = contentColor)
|
||||
RoleInfo(role = thatNode.user.role, contentColor = contentColor)
|
||||
NodeIdInfo(id = thatNode.user.id.ifEmpty { "???" }, contentColor = contentColor)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue