diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 960ecab..634a47c 100755 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -40,6 +40,12 @@ const links = computed(() => { to: '/estudios-typensense', onSelect: () => { open.value = false } }, + { + label: t("nav.conferences_ts"), + icon: 'i-lucide-database', + to: '/conferencias-typensense', + onSelect: () => { open.value = false } + }, { label: t("nav.between_the_lines"), icon: 'ph:list-magnifying-glass', diff --git a/app/pages/conferencias-typensense.vue b/app/pages/conferencias-typensense.vue new file mode 100644 index 0000000..cc775a4 --- /dev/null +++ b/app/pages/conferencias-typensense.vue @@ -0,0 +1,782 @@ + + + + + diff --git a/app/pages/estudios-typensense.vue b/app/pages/estudios-typensense.vue index 4fb4093..af82666 100644 --- a/app/pages/estudios-typensense.vue +++ b/app/pages/estudios-typensense.vue @@ -13,7 +13,7 @@ const { $i18n } = useNuxtApp() const t = $i18n.t const { locale } = useI18n() -const filterBy = computed(() => `locale:=${locale.value}`) +const filterBy = computed(() => `locale:=${locale.value} && type:=activities`) const REQUEST_TIMEOUT_MS = 15000 const settings = useSettingsStore() @@ -180,7 +180,7 @@ const { documentsApi } = useTypesenseApi() async function fetchDocumentMeta(docIds: string[]) { const unique = docIds.filter(id => id && !(id in docCache.value)) - if (!unique.length) return + console.log('Fetching metadata for documents', unique) try { const res = await documentsApi.multiSearch({ multiSearchParameters: {}, @@ -244,7 +244,8 @@ async function runSearch(q: string, page = 1, append = false) { highlightFullFields: QUERY_BY, highlightFields: QUERY_BY, highlightStartTag: '', - highlightEndTag: '' + highlightEndTag: '', + highlightAffixNumTokens: 30 }] } }) @@ -309,6 +310,7 @@ async function runBrowse(page = 1, append = false) { collection: DOCUMENTS_COLLECTION, q: '*', queryBy: 'title', + filterBy: filterBy.value, sortBy: 'timestamp:desc', perPage: settings.pageSize, page: typePage, diff --git a/lang/en.json b/lang/en.json index 8dd34e7..374c8fa 100644 --- a/lang/en.json +++ b/lang/en.json @@ -4,6 +4,7 @@ "home": "Home", "bible_studies": "Bible Studies", "bible_studies_ts": "Bible Studies Typesense", + "conferences_ts": "Conferences Typesense", "conferences": "Conferences", "between_the_lines": "Between the Lines", "my_list": "My List", diff --git a/lang/es.json b/lang/es.json index 2c0d6bf..0f54540 100644 --- a/lang/es.json +++ b/lang/es.json @@ -3,6 +3,7 @@ "home": "Inicio", "bible_studies": "Estudios Bíblicos", "bible_studies_ts": "Estudios Bíblicos Typesense", + "conferences_ts": "Conferencias Typesense", "conferences": "Conferencias", "between_the_lines": "Entrelíneas", "my_list": "Mi Listado", diff --git a/lang/fr.json b/lang/fr.json index fdaa316..983b6b3 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -4,6 +4,7 @@ "home": "Commencer", "bible_studies": "Études Bibliques", "bible_studies_ts": "Études Bibliques Typesense", + "conferences_ts": "Conférences Typesense", "conferences": "Conférences", "between_the_lines": "Entre les lignes", "my_list": "Ma liste", diff --git a/lang/pt.json b/lang/pt.json index 314ab7c..14cd15e 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -4,6 +4,7 @@ "home": "Inicio", "bible_studies": "Estudios Bíblicos", "bible_studies_ts": "Estudos Bíblicos Typesense", + "conferences_ts": "Conferências Typesense", "conferences": "Conferências", "between_the_lines": "Entre as linhas", "my_list": "Minha lista",