From 104b836bbe75ebcf58cfd6a8787d5fe2ebb5db8c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Mar 2026 00:41:00 +0000 Subject: [PATCH] refactor: remove path listing from NIP-5A rendering Users should click through to view the website in the browser rather than seeing a list of file paths in the note card. https://claude.ai/code/session_01XTmqQ9QatUA7aPCWt7NHNt --- .../amethyst/ui/note/types/StaticWebsite.kt | 43 ------------------- amethyst/src/main/res/values/strings.xml | 4 +- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/StaticWebsite.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/StaticWebsite.kt index 316e54847..c3f120226 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/StaticWebsite.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/StaticWebsite.kt @@ -21,10 +21,7 @@ package com.vitorpamplona.amethyst.ui.note.types import androidx.compose.foundation.border -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi -import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth @@ -51,7 +48,6 @@ import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer import com.vitorpamplona.amethyst.ui.theme.subtleBorder import com.vitorpamplona.quartz.nip5aStaticWebsites.NamedSiteEvent import com.vitorpamplona.quartz.nip5aStaticWebsites.RootSiteEvent -import com.vitorpamplona.quartz.nip5aStaticWebsites.tags.PathTag @Composable fun RenderRootSiteEvent( @@ -66,7 +62,6 @@ fun RenderRootSiteEvent( description = event.description(), source = event.source(), servers = event.servers(), - paths = event.paths(), identifier = null, ) } @@ -84,19 +79,16 @@ fun RenderNamedSiteEvent( description = event.description(), source = event.source(), servers = event.servers(), - paths = event.paths(), identifier = event.identifier(), ) } -@OptIn(ExperimentalLayoutApi::class) @Composable private fun RenderStaticWebsite( title: String?, description: String?, source: String?, servers: List, - paths: List, identifier: String?, ) { Row( @@ -167,41 +159,6 @@ private fun RenderStaticWebsite( } } } - - if (paths.isNotEmpty()) { - Row(Modifier.fillMaxWidth().padding(top = Size5dp)) { - Text( - text = stringRes(id = R.string.nsite_files, paths.size), - maxLines = 1, - overflow = TextOverflow.Ellipsis, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - - FlowRow( - modifier = Modifier.fillMaxWidth().padding(top = Size5dp), - horizontalArrangement = Arrangement.spacedBy(Size5dp), - verticalArrangement = Arrangement.spacedBy(Size5dp), - ) { - paths.take(10).forEach { path -> - Text( - text = path.path, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - } - if (paths.size > 10) { - Text( - text = stringRes(id = R.string.nsite_more_files, paths.size - 10), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 1, - ) - } - } - } } } } diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 2fe6f2289..c11be6263 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -1492,9 +1492,7 @@ Root Site Source: Servers: - %1$d files - +%1$d more - OTS: %1$s +OTS: %1$s Timestamp Proof There\'s proof this post was signed sometime before %1$s. The proof was stamped in the Bitcoin blockchain at that date and time.