diff --git a/app/components/PublicationDetail.vue b/app/components/PublicationDetail.vue index 394793f..3f64983 100644 --- a/app/components/PublicationDetail.vue +++ b/app/components/PublicationDetail.vue @@ -592,6 +592,21 @@ function clearLocalQuery() { const localQuery = ref('') const debouncedLocalQuery = useDebounce(localQuery, 200) +const showInternalSearch = ref(false) +const internalSearchRef = ref<{ input?: HTMLInputElement } | null>(null) +const metaExpanded = ref(true) + +function toggleInternalSearch() { + showInternalSearch.value = !showInternalSearch.value + if (showInternalSearch.value) { + metaExpanded.value = true + nextTick(() => internalSearchRef.value?.input?.focus()) + } else { + clearLocalQuery() + } +} + +watch(() => props.document?.id, () => { metaExpanded.value = true }) watch(debouncedLocalQuery, (q) => { // Cualquier cambio en el input activa el Estado 2 @@ -791,17 +806,7 @@ function onSelectionChange() { if (!sel || sel.toString().trim().length === 0) clearSelectionTooltip() } -const links = computed(() => { - return [ - { - label: 'Ver en sitio', - icon: 'ph-arrow-square-out', - to: matchUrl, - target: '_blank' - }, - ...formatFiles(props.document?.files) - ] -}) +const links = computed(() => []) const items = computed(() => { return [ @@ -830,6 +835,15 @@ const items = computed(() => { + + + -
+

@@ -887,24 +910,12 @@ const items = computed(() => { />

-
- -
+ -
+
{
-
diff --git a/app/components/entrelineas/EntrelineaDetail.vue b/app/components/entrelineas/EntrelineaDetail.vue index 3f308c1..caf2190 100644 --- a/app/components/entrelineas/EntrelineaDetail.vue +++ b/app/components/entrelineas/EntrelineaDetail.vue @@ -22,6 +22,7 @@ interface EntrelineaDoc { page?: number | string text?: string html?: string + draft?: boolean studies?: Study[] [key: string]: unknown } @@ -39,6 +40,8 @@ const showStudies = ref(false) // Volver al detalle cuando cambia el documento watch(() => props.document?.id, () => { showStudies.value = false }) +const { unlocked } = useDevMode() + const imageUrl = computed(() => getEntrelineaImageUrl(props.document?.image, 'detail') ) @@ -268,8 +271,6 @@ function onLightboxTouchStart(e: TouchEvent) { } function onLightboxTouchMove(e: TouchEvent) { - // Prevent page scroll while interacting inside the lightbox - e.preventDefault() if (e.touches.length === 1 && lightboxScale.value > 1) { const dx = e.touches[0].clientX - lbLastTouchX const dy = e.touches[0].clientY - lbLastTouchY @@ -391,13 +392,13 @@ const lightboxImgStyle = computed(() => ({
- diff --git a/app/components/inbox/InboxActivity.vue b/app/components/inbox/InboxActivity.vue index b73559a..57168a9 100755 --- a/app/components/inbox/InboxActivity.vue +++ b/app/components/inbox/InboxActivity.vue @@ -434,21 +434,7 @@ function onInputKey(e: KeyboardEvent) { />
- -
- -
+
{ // ---- State ---------------------------------------------------------------- +const exactSearch = ref(false) + const groupedHits = ref([]) const total = ref(0) const currentPage = ref(1) @@ -257,7 +259,7 @@ async function runSearch(q: string, page = 1, append = false) { multiSearchSearchesParameter: { searches: [{ collection: props.paragraphsCollection, - q: q || '*', + q: exactSearch.value && q ? `"${q}"` : q || '*', queryBy: QUERY_BY, filterBy: filterBy.value, perPage: settings.pageSize, @@ -422,6 +424,10 @@ watch(debouncedQuery, (q) => { } }) +watch(exactSearch, () => { + if (query.value.trim()) runSearch(query.value, 1, false) +}) + // ---- Selección y carga del detalle ---------------------------------------- const selectedDocId = ref(null) @@ -576,15 +582,30 @@ function metaLocation(meta: DocMeta | undefined): string { -
+
+
+ + +
(null) +const exactSearch = ref(false) interface Study { id?: number @@ -53,6 +54,7 @@ interface EntrelineaDoc { page?: number | string text?: string html?: string + draft?: boolean studies?: Study[] [key: string]: unknown } @@ -120,7 +122,7 @@ async function runSearch(q: string, page = 1, append = false) { multiSearchSearchesParameter: { searches: [{ collection: COLLECTION, - q: q || '*', + q: exactSearch.value && q ? `"${q}"` : q || '*', queryBy: QUERY_BY, includeFields: INCLUDE_FIELDS, filterBy: filterBy.value, @@ -188,6 +190,10 @@ watch(debouncedQuery, (q) => { runSearch(q, 1, false) }) +watch(exactSearch, () => { + if (query.value.trim()) runSearch(query.value, 1, false) +}) + const selected = ref(null) const isPanelOpen = computed({ @@ -311,14 +317,31 @@ function highlightedFor(hit: TypesenseHit, field: string): string | null {