Adding publication to typesense details

Made paragraph numbers more subdued
Fixed publication translation in all languages
This commit is contained in:
Julio Ruiz 2026-05-21 13:08:15 -05:00
parent d632846e24
commit 7d62d40642
7 changed files with 24 additions and 16 deletions

View File

@ -344,7 +344,7 @@ const lightboxImgStyle = computed(() => ({
</span> </span>
<span <span
v-else v-else
class="font-semibold text-sm min-w-0 max-w-full block whitespace-normal leading-snug pr-1 [overflow-wrap:anywhere]" class="font-semibold text-sm min-w-0 max-w-full block whitespace-normal leading-snug pr-1 wrap-anywhere"
:title="title" :title="title"
> >
{{ title }} {{ title }}

View File

@ -777,6 +777,10 @@ function highlightTextNodes(root: HTMLElement, terms: string[]): number {
<UIcon name="ph:calendar" class="size-4 text-green-600" /> <UIcon name="ph:calendar" class="size-4 text-green-600" />
{{ safeDate() }} {{ safeDate() }}
</p> </p>
<p v-if="document?.activity" class="text-sm flex items-center gap-1.5 text-muted shrink-0">
<UIcon name="ph:hash" class="size-4 text-green-600 shrink-0" />
{{ $t('search.publication') }} {{ document.activity }}
</p>
<p v-if="safeLocation()" class="text-sm flex items-center gap-1.5 text-muted min-w-0"> <p v-if="safeLocation()" class="text-sm flex items-center gap-1.5 text-muted min-w-0">
<UIcon name="ph:map-pin" class="size-4 text-green-600 shrink-0" /> <UIcon name="ph:map-pin" class="size-4 text-green-600 shrink-0" />
<span class="truncate max-w-55">{{ safeLocation() }}</span> <span class="truncate max-w-55">{{ safeLocation() }}</span>
@ -832,7 +836,7 @@ function highlightTextNodes(root: HTMLElement, terms: string[]): number {
<div v-else-if="paragraphs.length" ref="paragraphsContainer" class="p-1 sm:p-4 max-w-4xl m-4 sm:mx-auto sm:my-6"> <div v-else-if="paragraphs.length" ref="paragraphsContainer" class="p-1 sm:p-4 max-w-4xl m-4 sm:mx-auto sm:my-6">
<div class="bg-white rounded-lg shadow-md p-4 sm:p-8 mb-4 last:mb-0"> <div class="bg-white rounded-lg shadow-md p-4 sm:p-8 mb-4 last:mb-0">
<div v-for="(hit, idx) in paragraphs" :key="idx" :data-paragraph-number="hit.document.number"> <div v-for="(hit, idx) in paragraphs" :key="idx" :data-paragraph-number="hit.document.number">
<div class="grid grid-cols-[32px_1fr] items-start gap-4 mb-2"> <div class="grid grid-cols-1fr items-start gap-4 mb-2" :class="(showParagraphNumbers && 'grid-cols-[32px_1fr]')">
<div v-if="showParagraphNumbers" class="w-10 select-none cursor-pointer flex justify-end"> <div v-if="showParagraphNumbers" class="w-10 select-none cursor-pointer flex justify-end">
<UBadge <UBadge
v-if="hit.document.number" v-if="hit.document.number"
@ -840,7 +844,7 @@ function highlightTextNodes(root: HTMLElement, terms: string[]): number {
size="md" size="md"
variant="ghost" variant="ghost"
@click="copyToClipboard(hit.document.text, hit.document.type)" @click="copyToClipboard(hit.document.text, hit.document.type)"
class="text-gray-400 hover:text-white" class="text-gray-300 hover:text-white"
:class="(hit.document.type=='activities'?'hover:bg-carpagreen':'hover:bg-carpablue')" :class="(hit.document.type=='activities'?'hover:bg-carpagreen':'hover:bg-carpablue')"
/> />
</div> </div>

View File

@ -29,45 +29,45 @@ const links = computed(() => {
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.conferences"), label: t('nav.conferences'),
icon: 'ph:books', icon: 'ph:books',
to: '/conferencias', to: '/conferencias',
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.bible_studies_ts"), label: t('nav.bible_studies_ts'),
icon: 'ph:books', icon: 'ph:books',
to: '/estudios-typensense', to: '/estudios-typensense',
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.conferences_ts"), label: t('nav.conferences_ts'),
icon: 'ph:books', icon: 'ph:books',
to: '/conferencias-typensense', to: '/conferencias-typensense',
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.between_the_lines"), label: t('nav.between_the_lines'),
icon: 'ph:list-magnifying-glass', icon: 'ph:list-magnifying-glass',
to: '/entrelineas', to: '/entrelineas',
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.my_list"), label: t('nav.my_list'),
icon: 'i-lucide-bookmark', icon: 'i-lucide-bookmark',
to: '/favoritos', to: '/favoritos',
badge: favTotal.value > 0 ? String(favTotal.value) : undefined, badge: favTotal.value > 0 ? String(favTotal.value) : undefined,
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.history"), label: t('nav.history'),
icon: 'i-lucide-history', icon: 'i-lucide-history',
to: '/historial', to: '/historial',
badge: histTotal.value > 0 ? String(histTotal.value) : undefined, badge: histTotal.value > 0 ? String(histTotal.value) : undefined,
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
}, },
{ {
label: t("nav.settings"), label: t('nav.settings'),
icon: 'i-lucide-settings', icon: 'i-lucide-settings',
to: '/configuracion', to: '/configuracion',
onSelect: () => { open.value = false } onSelect: () => { open.value = false }
@ -106,11 +106,11 @@ const links = computed(() => {
</template> </template>
<template #footer="{ collapsed }"> <template #footer="{ collapsed }">
<ULocaleSelect <ULocaleSelect
:model-value="$i18n.locale.value" :model-value="$i18n.locale.value"
:locales="Object.values(locales)" :locales="Object.values(locales)"
@update:model-value="setLocale($event)" @update:model-value="setLocale($event)"
/> />
</template> </template>
</UDashboardSidebar> </UDashboardSidebar>

View File

@ -15,6 +15,7 @@
"placeholder": "Search for...", "placeholder": "Search for...",
"searching": "Searching...", "searching": "Searching...",
"tip": "Tip: wrap in \"quotes\" for exact phrase in that order.", "tip": "Tip: wrap in \"quotes\" for exact phrase in that order.",
"publication": "Publication",
"country": "Country", "country": "Country",
"state": "State", "state": "State",
"city": "City", "city": "City",

View File

@ -14,6 +14,7 @@
"placeholder": "Buscar...", "placeholder": "Buscar...",
"searching": "Buscando...", "searching": "Buscando...",
"tip": "Consejo: envuelve en \"comillas\" para frase exacta en ese orden.", "tip": "Consejo: envuelve en \"comillas\" para frase exacta en ese orden.",
"publication": "Publicación",
"country": "País", "country": "País",
"state": "Estado", "state": "Estado",
"city": "Ciudad", "city": "Ciudad",

View File

@ -12,7 +12,8 @@
"settings": "Paramètres" "settings": "Paramètres"
}, },
"search": { "search": {
"placeholder": "Rechercher des activités" "placeholder": "Rechercher des activités",
"publication": "Publicación"
}, },
"locale": { "locale": {
"en": "English", "en": "English",

View File

@ -13,6 +13,7 @@
}, },
"search": { "search": {
"placeholder": "Digite para pesquisar...", "placeholder": "Digite para pesquisar...",
"publication": "Publicação",
"for": "Para", "for": "Para",
"city": "Cidade", "city": "Cidade",
"page": "Página", "page": "Página",