remove: delete features not planned for current phase
This commit is contained in:
parent
1c5a3e510f
commit
1355c93974
|
|
@ -18,6 +18,7 @@ interface EntrelineaDoc {
|
|||
link?: string
|
||||
locale?: string
|
||||
origin?: string
|
||||
filter?: string
|
||||
page?: number | string
|
||||
text?: string
|
||||
studies?: Study[]
|
||||
|
|
@ -334,44 +335,8 @@ const lightboxImgStyle = computed(() => ({
|
|||
/>
|
||||
</template>
|
||||
|
||||
<template #title>
|
||||
<span
|
||||
v-if="showStudies"
|
||||
class="font-semibold text-sm block"
|
||||
>
|
||||
Estudios relacionados
|
||||
<span class="text-muted font-normal">({{ document.studies?.length }})</span>
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
class="font-semibold text-sm min-w-0 max-w-full block whitespace-normal leading-snug pr-1 wrap-anywhere"
|
||||
:title="title"
|
||||
>
|
||||
{{ title }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #right>
|
||||
<template v-if="!showStudies">
|
||||
<UTooltip
|
||||
v-if="document.studies?.length"
|
||||
:text="`Estudios relacionados (${document.studies.length})`"
|
||||
>
|
||||
<UChip
|
||||
:text="document.studies.length"
|
||||
color="primary"
|
||||
size="sm"
|
||||
:show="!!document.studies?.length"
|
||||
>
|
||||
<UButton
|
||||
icon="i-lucide-book-open"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
aria-label="Estudios relacionados"
|
||||
@click="showStudies = true"
|
||||
/>
|
||||
</UChip>
|
||||
</UTooltip>
|
||||
<UTooltip v-if="collection" :text="isFav ? 'Quitar de mi lista' : 'Guardar en mi lista'">
|
||||
<UButton
|
||||
:icon="isFav ? 'i-lucide-bookmark-check' : 'i-lucide-bookmark-plus'"
|
||||
|
|
@ -398,36 +363,22 @@ const lightboxImgStyle = computed(() => ({
|
|||
size="xs"
|
||||
class="shrink-0"
|
||||
/>
|
||||
<UBadge
|
||||
v-if="document.filter"
|
||||
:label="String(document.filter)"
|
||||
color="neutral"
|
||||
variant="subtle"
|
||||
size="xs"
|
||||
class="shrink-0 uppercase"
|
||||
/>
|
||||
<span
|
||||
v-if="origin && origin !== document.id"
|
||||
v-if="origin"
|
||||
class="inline-flex items-start rounded-md bg-primary/10 text-primary text-xs font-medium px-2 py-0.5 min-w-0 max-w-full whitespace-normal leading-snug [overflow-wrap:anywhere]"
|
||||
:title="origin"
|
||||
>
|
||||
{{ origin }}
|
||||
</span>
|
||||
<span v-if="document.page != null" class="text-xs text-muted flex items-center gap-1 shrink-0">
|
||||
<UIcon name="i-lucide-file-text" class="size-3" />
|
||||
Pág. {{ document.page }}
|
||||
</span>
|
||||
<span
|
||||
v-if="document.id && document.id !== origin"
|
||||
class="text-xs text-dimmed font-mono truncate max-w-[160px] shrink-0"
|
||||
:title="String(document.id)"
|
||||
>
|
||||
{{ document.id }}
|
||||
</span>
|
||||
</div>
|
||||
<UButton
|
||||
v-if="document.link"
|
||||
:to="document.link"
|
||||
target="_blank"
|
||||
icon="i-lucide-external-link"
|
||||
label="Ver en sitio"
|
||||
color="primary"
|
||||
variant="soft"
|
||||
size="xs"
|
||||
class="shrink-0"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- ------------------------------------------------------------------ -->
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ interface EntrelineaDoc {
|
|||
image?: string
|
||||
link?: string
|
||||
locale?: string
|
||||
origin?: string
|
||||
description?: string
|
||||
page?: number | string
|
||||
text?: string
|
||||
studies?: Study[]
|
||||
|
|
@ -374,22 +374,14 @@ function highlightedFor(hit: TypesenseHit, field: string): string | null {
|
|||
>
|
||||
<div class="flex items-start justify-between gap-2 mb-1">
|
||||
<div class="min-w-0 flex-1 flex gap-2">
|
||||
<UBadge
|
||||
v-if="hit.document?.studies?.[0]?.date"
|
||||
:label="hit.document?.studies?.[0]?.date"
|
||||
size="sm"
|
||||
variant="subtle"
|
||||
color="info"
|
||||
class="mb-1 uppercase"
|
||||
/>
|
||||
<UBadge
|
||||
<!-- <UBadge
|
||||
v-if="hit.document?.page"
|
||||
:label="`Página ${hit.document?.page}`"
|
||||
size="sm"
|
||||
variant="subtle"
|
||||
color="error"
|
||||
class="mb-1 uppercase"
|
||||
/>
|
||||
/> -->
|
||||
<UBadge
|
||||
v-if="hit.document?.filter"
|
||||
:label="hit.document?.filter"
|
||||
|
|
@ -419,10 +411,6 @@ function highlightedFor(hit: TypesenseHit, field: string): string | null {
|
|||
</UTooltip>
|
||||
</div>
|
||||
|
||||
<div class="text-sm font-semibold tracking-wide truncate mb-2">
|
||||
{{ (hit.document?.studies?.[0]?.title as string) || hit.document.id || `entrelinea_${index}` }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="highlightedFor(hit, 'text') || hit.document.text"
|
||||
class="snippet-html text-sm text-toned"
|
||||
|
|
@ -431,9 +419,9 @@ function highlightedFor(hit: TypesenseHit, field: string): string | null {
|
|||
|
||||
<USeparator class="my-2"/>
|
||||
|
||||
<div class="text-xs text-dimmed">
|
||||
{{ hit.document?.origin }}
|
||||
</div>
|
||||
<!-- <div class="text-xs text-dimmed">
|
||||
esta es la página {{ hit.document?.description }}
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- Infinite scroll: cargando más -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue