Refactor: Improve connection state display in UI (#2353)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-07-05 22:32:03 +00:00 committed by GitHub
parent 5fdf383539
commit fa0679b3f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 110 additions and 88 deletions

View file

@ -952,7 +952,10 @@ fun TracerouteActionButton(
@Suppress("LongMethod")
@Composable
fun NodeActionButton(
modifier: Modifier = Modifier,
modifier: Modifier = Modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
.height(48.dp),
title: String,
enabled: Boolean,
icon: ImageVector? = null,
@ -966,9 +969,6 @@ fun NodeActionButton(
},
enabled = enabled,
modifier = modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
.height(48.dp),
) {
Row(
verticalAlignment = Alignment.CenterVertically,

View file

@ -23,8 +23,8 @@ import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.NoCell
import androidx.compose.material.icons.rounded.Star
import androidx.compose.material.icons.twotone.CloudOff
import androidx.compose.material.icons.twotone.CloudDone
import androidx.compose.material.icons.twotone.CloudOff
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -150,6 +150,6 @@ fun StatusIconsPreview() {
isThisNode = true,
isUnmessageable = true,
isFavorite = true,
isConnected = true,
isConnected = false,
)
}