feat(posts): plain bold titles; reserve View-original to the post card; provenance links to the posts feed

- Post titles arrived as stored HTML (e.g. <strong>…</strong>) rendering as
  literal markup. New toPlainText() strips tags; titles render plain + bold
  (ProvenancePanel and PostCard).
- Removed "View original post" from the provenance panel (modal) — the
  open-original button lives on the PostCard (the post view).
- Provenance "View post" now navigates to the /posts feed (post_id query),
  not the gallery image grid. (Feed in-context landing lands next.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 18:18:34 -04:00
parent 42ddac9996
commit 75b6b8056e
3 changed files with 34 additions and 15 deletions
@@ -19,7 +19,7 @@
<span v-if="postDate(e)" class="fc-prov__date">{{ postDate(e) }}</span>
</div>
<div class="fc-prov__post">
{{ e.post.title || `Post ${e.post.external_post_id}` }}
{{ postTitle(e) }}
</div>
<div class="fc-prov__meta">
<RouterLink :to="`/artist/${e.artist.slug}`">
@@ -30,12 +30,8 @@
</span>
</div>
<div class="fc-prov__actions">
<a
v-if="e.post.url" :href="e.post.url"
target="_blank" rel="noopener noreferrer"
> View original post</a>
<a href="#" @click.prevent="openPost(e.post.id)">
View images from this post
View post
</a>
<a
v-if="e.post.description_html"
@@ -83,6 +79,7 @@ import { useRouter } from 'vue-router'
import { useModalStore } from '../../stores/modal.js'
import { useProvenanceStore } from '../../stores/provenance.js'
import { formatPostDate } from '../../utils/date.js'
import { toPlainText } from '../../utils/htmlSanitize.js'
const modal = useModalStore()
const prov = useProvenanceStore()
@@ -134,9 +131,16 @@ const show = computed(() => {
const attachments = computed(() => state.value?.attachments || [])
function postDate(e) { return formatPostDate(e.post.date) }
function postTitle(e) {
// Titles can arrive as stored HTML (e.g. "<strong>…</strong>"); render
// as plain text (the CSS makes it bold).
return toPlainText(e.post.title) || `Post ${e.post.external_post_id}`
}
function openPost(postId) {
router.push({ path: '/gallery', query: { post_id: postId } })
// Land on the post in the posts feed (in context), not the gallery
// image grid. Operator-flagged 2026-05-28.
router.push({ path: '/posts', query: { post_id: postId } })
modal.close()
}
</script>
@@ -159,7 +163,7 @@ function openPost(postId) {
text-transform: lowercase;
}
.fc-prov__post {
font-weight: 600; margin: 4px 0;
font-weight: 700; margin: 4px 0;
color: rgb(var(--v-theme-on-surface));
}
.fc-prov__meta {