mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(release): fixes to prep for release (#4546)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
c5f2b1bbea
commit
80d9a2e0aa
30 changed files with 2324 additions and 312 deletions
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2025-2026 Meshtastic LLC
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.meshtastic.core.ui.component
|
||||
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
import org.meshtastic.core.strings.Res
|
||||
import org.meshtastic.core.strings.internal
|
||||
import org.meshtastic.core.strings.via_api
|
||||
import org.meshtastic.core.strings.via_mqtt
|
||||
import org.meshtastic.core.strings.via_udp
|
||||
import org.meshtastic.core.ui.icon.Api
|
||||
import org.meshtastic.core.ui.icon.Cloud
|
||||
import org.meshtastic.core.ui.icon.Device
|
||||
import org.meshtastic.core.ui.icon.MeshtasticIcons
|
||||
import org.meshtastic.core.ui.icon.Udp
|
||||
import org.meshtastic.proto.MeshPacket
|
||||
|
||||
@Composable
|
||||
fun TransportIcon(transport: Int, viaMqtt: Boolean, modifier: Modifier = Modifier) {
|
||||
val (icon, description) =
|
||||
when {
|
||||
viaMqtt || transport == MeshPacket.TransportMechanism.TRANSPORT_MQTT.value ->
|
||||
MeshtasticIcons.Cloud to stringResource(Res.string.via_mqtt)
|
||||
transport == MeshPacket.TransportMechanism.TRANSPORT_MULTICAST_UDP.value ->
|
||||
MeshtasticIcons.Udp to stringResource(Res.string.via_udp)
|
||||
transport == MeshPacket.TransportMechanism.TRANSPORT_API.value ->
|
||||
MeshtasticIcons.Api to stringResource(Res.string.via_api)
|
||||
transport == MeshPacket.TransportMechanism.TRANSPORT_INTERNAL.value ->
|
||||
MeshtasticIcons.Device to stringResource(Res.string.internal)
|
||||
else -> return
|
||||
}
|
||||
Icon(icon, contentDescription = description, modifier = modifier)
|
||||
}
|
||||
|
|
@ -28,10 +28,13 @@ import androidx.compose.material.icons.rounded.Cloud
|
|||
import androidx.compose.material.icons.rounded.CloudOff
|
||||
import androidx.compose.material.icons.rounded.Dangerous
|
||||
import androidx.compose.material.icons.rounded.History
|
||||
import androidx.compose.material.icons.rounded.Lan
|
||||
import androidx.compose.material.icons.rounded.NoCell
|
||||
import androidx.compose.material.icons.rounded.SettingsEthernet
|
||||
import androidx.compose.material.icons.rounded.SpeakerNotesOff
|
||||
import androidx.compose.material.icons.rounded.Star
|
||||
import androidx.compose.material.icons.rounded.StarBorder
|
||||
import androidx.compose.material.icons.rounded.Terminal
|
||||
import androidx.compose.material.icons.twotone.Cloud
|
||||
import androidx.compose.material.icons.twotone.CloudDone
|
||||
import androidx.compose.material.icons.twotone.CloudOff
|
||||
|
|
@ -84,3 +87,10 @@ val MeshtasticIcons.CheckCircle: ImageVector
|
|||
|
||||
val MeshtasticIcons.Acknowledged: ImageVector
|
||||
get() = Icons.TwoTone.HowToReg
|
||||
|
||||
val MeshtasticIcons.Udp: ImageVector
|
||||
get() = Icons.Rounded.Lan
|
||||
val MeshtasticIcons.Api: ImageVector
|
||||
get() = Icons.Rounded.Terminal
|
||||
val MeshtasticIcons.Ethernet: ImageVector
|
||||
get() = Icons.Rounded.SettingsEthernet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue