Skip to content

Commit

Permalink
enhancement: add server version in node info (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkesiSeli authored Oct 9, 2024
1 parent 34625c2 commit d355846
Showing 1 changed file with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowForwardIos
import androidx.compose.material.icons.filled.AlternateEmail
import androidx.compose.material.icons.filled.Hub
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.Shield
import androidx.compose.material.ripple.rememberRipple
Expand Down Expand Up @@ -59,6 +60,7 @@ import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.ContentBo
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.ContentTitle
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.GenericPlaceholder
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.SettingsHeader
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.SettingsRow
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.TextWithCustomEmojis
import com.livefast.eattrash.raccoonforfriendica.core.commonui.content.UserItemPlaceholder
import com.livefast.eattrash.raccoonforfriendica.core.l10n.messages.LocalStrings
Expand Down Expand Up @@ -179,7 +181,7 @@ class NodeInfoScreen : Screen {
if (title != null) {
item {
ContentTitle(
modifier = Modifier.padding(horizontal = Spacing.s),
modifier = Modifier.padding(horizontal = Spacing.m),
content = title,
onOpenUrl = {
uriHandler.openUri(it)
Expand All @@ -192,7 +194,7 @@ class NodeInfoScreen : Screen {
if (description != null) {
item {
ContentBody(
modifier = Modifier.padding(horizontal = Spacing.s),
modifier = Modifier.padding(horizontal = Spacing.m),
content = description,
onOpenUrl = {
uriHandler.openUri(it)
Expand Down Expand Up @@ -236,7 +238,7 @@ class NodeInfoScreen : Screen {
}
items(rules) { rule ->
RuleItem(
modifier = Modifier.padding(horizontal = 10.dp),
modifier = Modifier.padding(horizontal = Spacing.m),
rule = rule,
onOpenUrl = {
uriHandler.openUri(it)
Expand All @@ -245,6 +247,22 @@ class NodeInfoScreen : Screen {
}
}

item {
SettingsHeader(
title = LocalStrings.current.itemOther,
icon = Icons.Default.Hub,
)
}

item {
SettingsRow(
title = LocalStrings.current.settingsAboutAppVersion,
value =
uiState.info?.version
?: LocalStrings.current.shortUnavailable,
)
}

item {
Spacer(modifier = Modifier.height(Spacing.xxl))
}
Expand Down

0 comments on commit d355846

Please sign in to comment.