Compare commits

..

No commits in common. "9f7d868d2b538dcbadceee7d3545ff70cb01e2bc" and "364fbe0ad769daaf147a044bf759840f25d4ea25" have entirely different histories.

8 changed files with 95 additions and 168 deletions

View File

@ -802,7 +802,10 @@ const links = computed(() => {
const items = computed(() => {
return [
{
label: 'Debug',
content: debugDocument(props.document)
}
]
})
</script>
@ -958,7 +961,8 @@ const items = computed(() => {
<UPageHeader
:title="document?.title"
:description="formatSignature(document)"
:headline="document?.draft ? $t('ui.draft') : ''"
:headline="document?.draft ? 'Borrador' : ''"
:links="links"
class="py-0 pb-2"
/>
<div v-if="paragraphsLoading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
@ -1001,21 +1005,6 @@ const items = computed(() => {
</p>
</div>
</UPageBody>
<template #right>
<UPageAside
class="py-0 my-0"
>
<UPageAnchors :links="links" />
<UAccordion :items="items">
<template #body="{ item }">
<pre>{{ item.content }}</pre>
</template>
</UAccordion>
</UPageAside>
</template>
</UPage>
</div>
@ -1055,11 +1044,11 @@ const items = computed(() => {
<UButton
variant="soft"
class="group flex flex-col items-center gap-1 px-4 py-2.5 text-amber-300 hover:bg-white/10 active:bg-white/20 transition-colors"
:aria-label="$t('ui.copy')"
aria-label="Copiar texto"
@click="copyToClipboard(collection)"
>
<UIcon name="ph-copy" class="size-7" />
<span class="group-hover:text-black text-xs font-semibold leading-none">{{ $t('ui.copy') }}</span>
<UIcon name="ph-copy" class="size-5" />
<span class="group-hover:text-black text-[9px] font-semibold leading-none">Copiar</span>
</UButton>
</div>
</Transition>

View File

@ -7,6 +7,6 @@
panel-id="conferencias-ts-list"
nav-title-key="nav.conferences_ts"
accent-color="blue"
:empty-detail-text="$t('ui.empty_conferences')"
empty-detail-text="Selecciona una conferencia para ver el detalle"
/>
</template>

View File

@ -7,7 +7,7 @@
panel-id="estudios-ts-list"
nav-title-key="nav.bible_studies_ts"
accent-color="green"
:empty-detail-text="$t('ui.empty_bible_studies')"
empty-detail-text="Selecciona una actividad para ver el detalle"
:show-draft="true"
/>
</template>

View File

@ -1,100 +1,78 @@
import dayjs from 'dayjs'
import dayjs from "dayjs";
export interface ItemObject {
id: string
date: number
timestamp: number
slug: string
type: string
place: string
city: string
state: string
country: string
thumbnail: string
id: string;
date: number;
slug: string;
type: string;
place: string;
city: string;
state: string;
country: string;
thumbnail: string;
}
export interface FilesObject {
youtube?: string
video?: string
audio?: string
booklet?: string
simple?: string
youtube?: string;
video?: string;
audio?: string;
booklet?: string;
simple?: string;
}
export function formatFiles(files: FilesObject) {
const { $i18n } = useNuxtApp()
const t = $i18n.t
const { $i18n } = useNuxtApp();
const t = $i18n.t;
const items = []
let items = [];
if (files) {
if (files.youtube) {
items.push({
to: files.youtube,
target: '_blank',
label: 'Youtube',
icon: 'ph:youtube-logo-thin',
labelClass: 'text-xs'
})
target: "_blank",
label: "Youtube",
icon: "ph:youtube-logo-thin",
labelClass: "text-xs",
});
}
if (files.video) {
items.push({
to: files.video,
target: '_blank',
label: t('downloads.video'),
icon: 'ph:file-video-thin',
labelClass: 'text-xs'
})
target: "_blank",
label: t("Activities.video"),
icon: "ph:file-video-thin",
labelClass: "text-xs",
});
}
if (files.audio) {
let fileUrl = ''
if (files.audio.startsWith('http')) {
fileUrl = files.audio
} else {
fileUrl = `https://actividadeswp.carpa.com/wp-content/uploads/${files.audio}`
}
items.push({
to: fileUrl,
target: '_blank',
label: t('downloads.audio'),
icon: 'ph:file-audio-thin',
labelClass: 'text-xs'
})
to: `https://actividadeswp.carpa.com/wp-content/uploads/${files.audio}`,
target: "_blank",
label: t("Activities.audio"),
icon: "ph:file-audio-thin",
labelClass: "text-xs",
});
}
if (files.booklet) {
let fileUrl = ''
if (files.booklet.startsWith('http')) {
fileUrl = files.booklet
} else {
fileUrl = `https://actividadeswp.carpa.com/wp-content/uploads/${files.booklet}`
}
items.push({
to: fileUrl,
target: '_blank',
label: t('downloads.book'),
icon: 'ph:notebook-thin',
labelClass: 'text-xs'
})
to: files.booklet,
target: "_blank",
label: t("Activities.book"),
icon: "ph:notebook-thin",
labelClass: "text-xs",
});
}
if (files.simple) {
let fileUrl = ''
if (files.simple.startsWith('http')) {
fileUrl = files.simple
} else {
fileUrl = `https://actividadeswp.carpa.com/wp-content/uploads/${files.simple}`
}
items.push({
to: fileUrl,
target: '_blank',
label: t('downloads.simple'),
icon: 'ph:note-thin',
labelClass: 'text-xs'
})
to: files.simple,
target: "_blank",
label: t("Activities.simple"),
icon: "ph:note-thin",
labelClass: "text-xs",
});
}
}
return items
return items;
}
export function formatDate(d: number) {
@ -151,69 +129,70 @@ export function formatSignature(i: ItemObject) {
}
export function getDay(d: number) {
const { $i18n } = useNuxtApp()
const locale = $i18n.locale
const date = new Date(d * 1000)
const { $i18n } = useNuxtApp();
const locale = $i18n.locale;
let date = new Date(d * 1000);
return date.toLocaleString(locale.value, {
weekday: 'long',
timeZone: 'utc'
})
weekday: "long",
timeZone: "utc",
});
}
export function getDayDate(d: number) {
const { $i18n } = useNuxtApp()
const locale = $i18n.locale
const date = new Date(d * 1000)
const { $i18n } = useNuxtApp();
const locale = $i18n.locale;
let date = new Date(d * 1000);
return date.toLocaleString(locale.value, { day: 'numeric', timeZone: 'utc' })
return date.toLocaleString(locale.value, { day: "numeric", timeZone: "utc" });
}
export function getMonth(d: number) {
const { $i18n } = useNuxtApp()
const locale = $i18n.locale
const date = new Date(d * 1000)
const { $i18n } = useNuxtApp();
const locale = $i18n.locale;
let date = new Date(d * 1000);
return date.toLocaleString(locale.value, { month: 'long', timeZone: 'utc' })
return date.toLocaleString(locale.value, { month: "long", timeZone: "utc" });
}
export function setUrl(item: ItemObject, isSearch: boolean) {
const { $i18n } = useNuxtApp()
const locale = $i18n.locale
const date = dayjs(item.date * 1000)
const month = (date.month() + 1).toString()
const slug = item.slug || item.slug === 'undefined' ? item.slug : item.id
const { $i18n } = useNuxtApp();
const locale = $i18n.locale;
const date = dayjs(item.date * 1000);
const month = (date.month() + 1).toString();
const slug = item.slug || item.slug === "undefined" ? item.slug : item.id;
if (isSearch) {
return false
return false;
} else {
return `/${locale.value}/${item.type}/${date.year()}/${month.padStart(2, '0')}/${slug}`
return `/${locale.value}/${item.type}/${date.year()}/${month.padStart(2, "0")}/${slug}`;
}
}
export function getThumbnail(item: ItemObject) {
const path = item.thumbnail
console.log("ITEM", item);
let path = item.thumbnail;
if (!path) {
return 'https://images.carpa.com/tr:w-900,f-auto/youtube_thumbnail_46396.png'
return "https://images.carpa.com/tr:w-900,f-auto/youtube_thumbnail_46396.png";
} else {
return `https://images.carpa.com/${item.type}/${path}?tr=w-900`
return `https://images.carpa.com/${item.type}/${path}?tr=w-900`;
}
}
export function getAuthor(type: string) {
let author = ''
let author = "";
switch (type) {
case 'activities':
author = 'Dr. José Benjamín Pérez Matos'
break
case 'conferences':
author = 'Dr. William Soto Santiago'
break
case 'sermons':
author = 'William Marrion Branham'
break
case "activities":
author = "Dr. José Benjamín Pérez Matos";
break;
case "conferences":
author = "Dr. William Soto Santiago";
break;
case "sermons":
author = "William Marrion Branham";
break;
}
return author
return author;
}
// removed: openItem relied on a Pinia store that is not installed in this app.

View File

@ -46,16 +46,5 @@
"numbered_desc": "Navigate between pages with pagination controls.",
"paragraph_numbers_title": "Paragraph numbers",
"paragraph_numbers_desc": "Show the paragraph number next to each paragraph in the document detail."
},
"downloads": {
"audio": "Audio",
"book": "Book",
"simple": "Simple"
},
"ui": {
"copy": "Copy",
"draft": "Draft",
"empty_bible_studies": "Choose a Bible Study to see the detail",
"empty_conferences": "Choose a Conference to see the detail"
}
}
}

View File

@ -51,16 +51,5 @@
"numbered_desc": "Navega entre páginas con controles de paginación.",
"paragraph_numbers_title": "Números de párrafo",
"paragraph_numbers_desc": "Muestra el número de párrafo al lado de cada párrafo en el detalle del documento."
},
"downloads": {
"audio": "Audio",
"book": "Libro",
"simple": "Sencillo",
},
"ui": {
"copy": "Copiar",
"draft": "Borrador",
"empty_bible_studies": "Selecciona un Estudio Bíblico para ver el detalle",
"empty_conferences": "Selecciona una Conferencia para ver el detalle"
}
}

View File

@ -34,15 +34,5 @@
"numbered_desc": "Naviguez entre les pages avec des contrôles de pagination.",
"paragraph_numbers_title": "Numéros de paragraphe",
"paragraph_numbers_desc": "Affiche le numéro de paragraphe à côté de chaque paragraphe dans le détail du document."
},
"downloads": {
"audio": "Audio",
"book": "Libre",
"simple": "Simple"
},
"ui": {
"copy": "Copie",
"draft": "Brouillon"
}
}

View File

@ -44,14 +44,5 @@
"numbered_desc": "Navegue entre páginas com controles de paginação.",
"paragraph_numbers_title": "Números de parágrafo",
"paragraph_numbers_desc": "Exibe o número do parágrafo ao lado de cada parágrafo no detalhe do documento."
},
"downloads": {
"audio": "Áudio",
"book": "Livro",
"simple": "Simples"
},
"ui": {
"copy": "Cópia",
"draft": "Rascunho"
}
}