parent
3d54899b3e
commit
b7b12184db
|
|
@ -802,10 +802,7 @@ const links = computed(() => {
|
||||||
|
|
||||||
const items = computed(() => {
|
const items = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
label: 'Debug',
|
|
||||||
content: debugDocument(props.document)
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -961,8 +958,7 @@ const items = computed(() => {
|
||||||
<UPageHeader
|
<UPageHeader
|
||||||
:title="document?.title"
|
:title="document?.title"
|
||||||
:description="formatSignature(document)"
|
:description="formatSignature(document)"
|
||||||
:headline="document?.draft ? 'Borrador' : ''"
|
:headline="document?.draft ? $t('ui.draft') : ''"
|
||||||
:links="links"
|
|
||||||
class="py-0 pb-2"
|
class="py-0 pb-2"
|
||||||
/>
|
/>
|
||||||
<div v-if="paragraphsLoading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
|
<div v-if="paragraphsLoading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
|
||||||
|
|
@ -1005,6 +1001,21 @@ const items = computed(() => {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</UPageBody>
|
</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>
|
</UPage>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1044,11 +1055,11 @@ const items = computed(() => {
|
||||||
<UButton
|
<UButton
|
||||||
variant="soft"
|
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"
|
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="Copiar texto"
|
:aria-label="$t('ui.copy')"
|
||||||
@click="copyToClipboard(collection)"
|
@click="copyToClipboard(collection)"
|
||||||
>
|
>
|
||||||
<UIcon name="ph-copy" class="size-5" />
|
<UIcon name="ph-copy" class="size-7" />
|
||||||
<span class="group-hover:text-black text-[9px] font-semibold leading-none">Copiar</span>
|
<span class="group-hover:text-black text-xs font-semibold leading-none">{{ $t('ui.copy') }}</span>
|
||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@
|
||||||
panel-id="conferencias-ts-list"
|
panel-id="conferencias-ts-list"
|
||||||
nav-title-key="nav.conferences_ts"
|
nav-title-key="nav.conferences_ts"
|
||||||
accent-color="blue"
|
accent-color="blue"
|
||||||
empty-detail-text="Selecciona una conferencia para ver el detalle"
|
:empty-detail-text="$t('ui.empty_conferences')"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
panel-id="estudios-ts-list"
|
panel-id="estudios-ts-list"
|
||||||
nav-title-key="nav.bible_studies_ts"
|
nav-title-key="nav.bible_studies_ts"
|
||||||
accent-color="green"
|
accent-color="green"
|
||||||
empty-detail-text="Selecciona una actividad para ver el detalle"
|
:empty-detail-text="$t('ui.empty_bible_studies')"
|
||||||
:show-draft="true"
|
:show-draft="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,78 +1,100 @@
|
||||||
import dayjs from "dayjs";
|
import dayjs from 'dayjs'
|
||||||
|
|
||||||
export interface ItemObject {
|
export interface ItemObject {
|
||||||
id: string;
|
id: string
|
||||||
date: number;
|
date: number
|
||||||
slug: string;
|
timestamp: number
|
||||||
type: string;
|
slug: string
|
||||||
place: string;
|
type: string
|
||||||
city: string;
|
place: string
|
||||||
state: string;
|
city: string
|
||||||
country: string;
|
state: string
|
||||||
thumbnail: string;
|
country: string
|
||||||
|
thumbnail: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FilesObject {
|
export interface FilesObject {
|
||||||
youtube?: string;
|
youtube?: string
|
||||||
video?: string;
|
video?: string
|
||||||
audio?: string;
|
audio?: string
|
||||||
booklet?: string;
|
booklet?: string
|
||||||
simple?: string;
|
simple?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatFiles(files: FilesObject) {
|
export function formatFiles(files: FilesObject) {
|
||||||
const { $i18n } = useNuxtApp();
|
const { $i18n } = useNuxtApp()
|
||||||
const t = $i18n.t;
|
const t = $i18n.t
|
||||||
|
|
||||||
let items = [];
|
const items = []
|
||||||
if (files) {
|
if (files) {
|
||||||
if (files.youtube) {
|
if (files.youtube) {
|
||||||
items.push({
|
items.push({
|
||||||
to: files.youtube,
|
to: files.youtube,
|
||||||
target: "_blank",
|
target: '_blank',
|
||||||
label: "Youtube",
|
label: 'Youtube',
|
||||||
icon: "ph:youtube-logo-thin",
|
icon: 'ph:youtube-logo-thin',
|
||||||
labelClass: "text-xs",
|
labelClass: 'text-xs'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (files.video) {
|
if (files.video) {
|
||||||
items.push({
|
items.push({
|
||||||
to: files.video,
|
to: files.video,
|
||||||
target: "_blank",
|
target: '_blank',
|
||||||
label: t("Activities.video"),
|
label: t('downloads.video'),
|
||||||
icon: "ph:file-video-thin",
|
icon: 'ph:file-video-thin',
|
||||||
labelClass: "text-xs",
|
labelClass: 'text-xs'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (files.audio) {
|
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({
|
items.push({
|
||||||
to: `https://actividadeswp.carpa.com/wp-content/uploads/${files.audio}`,
|
to: fileUrl,
|
||||||
target: "_blank",
|
target: '_blank',
|
||||||
label: t("Activities.audio"),
|
label: t('downloads.audio'),
|
||||||
icon: "ph:file-audio-thin",
|
icon: 'ph:file-audio-thin',
|
||||||
labelClass: "text-xs",
|
labelClass: 'text-xs'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (files.booklet) {
|
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({
|
items.push({
|
||||||
to: files.booklet,
|
to: fileUrl,
|
||||||
target: "_blank",
|
target: '_blank',
|
||||||
label: t("Activities.book"),
|
label: t('downloads.book'),
|
||||||
icon: "ph:notebook-thin",
|
icon: 'ph:notebook-thin',
|
||||||
labelClass: "text-xs",
|
labelClass: 'text-xs'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (files.simple) {
|
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({
|
items.push({
|
||||||
to: files.simple,
|
to: fileUrl,
|
||||||
target: "_blank",
|
target: '_blank',
|
||||||
label: t("Activities.simple"),
|
label: t('downloads.simple'),
|
||||||
icon: "ph:note-thin",
|
icon: 'ph:note-thin',
|
||||||
labelClass: "text-xs",
|
labelClass: 'text-xs'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return items;
|
return items
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatDate(d: number) {
|
export function formatDate(d: number) {
|
||||||
|
|
@ -129,70 +151,69 @@ export function formatSignature(i: ItemObject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDay(d: number) {
|
export function getDay(d: number) {
|
||||||
const { $i18n } = useNuxtApp();
|
const { $i18n } = useNuxtApp()
|
||||||
const locale = $i18n.locale;
|
const locale = $i18n.locale
|
||||||
let date = new Date(d * 1000);
|
const date = new Date(d * 1000)
|
||||||
|
|
||||||
return date.toLocaleString(locale.value, {
|
return date.toLocaleString(locale.value, {
|
||||||
weekday: "long",
|
weekday: 'long',
|
||||||
timeZone: "utc",
|
timeZone: 'utc'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDayDate(d: number) {
|
export function getDayDate(d: number) {
|
||||||
const { $i18n } = useNuxtApp();
|
const { $i18n } = useNuxtApp()
|
||||||
const locale = $i18n.locale;
|
const locale = $i18n.locale
|
||||||
let date = new Date(d * 1000);
|
const 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) {
|
export function getMonth(d: number) {
|
||||||
const { $i18n } = useNuxtApp();
|
const { $i18n } = useNuxtApp()
|
||||||
const locale = $i18n.locale;
|
const locale = $i18n.locale
|
||||||
let date = new Date(d * 1000);
|
const 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) {
|
export function setUrl(item: ItemObject, isSearch: boolean) {
|
||||||
const { $i18n } = useNuxtApp();
|
const { $i18n } = useNuxtApp()
|
||||||
const locale = $i18n.locale;
|
const locale = $i18n.locale
|
||||||
const date = dayjs(item.date * 1000);
|
const date = dayjs(item.date * 1000)
|
||||||
const month = (date.month() + 1).toString();
|
const month = (date.month() + 1).toString()
|
||||||
const slug = item.slug || item.slug === "undefined" ? item.slug : item.id;
|
const slug = item.slug || item.slug === 'undefined' ? item.slug : item.id
|
||||||
|
|
||||||
if (isSearch) {
|
if (isSearch) {
|
||||||
return false;
|
return false
|
||||||
} else {
|
} 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) {
|
export function getThumbnail(item: ItemObject) {
|
||||||
console.log("ITEM", item);
|
const path = item.thumbnail
|
||||||
let path = item.thumbnail;
|
|
||||||
if (!path) {
|
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 {
|
} 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) {
|
export function getAuthor(type: string) {
|
||||||
let author = "";
|
let author = ''
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "activities":
|
case 'activities':
|
||||||
author = "Dr. José Benjamín Pérez Matos";
|
author = 'Dr. José Benjamín Pérez Matos'
|
||||||
break;
|
break
|
||||||
case "conferences":
|
case 'conferences':
|
||||||
author = "Dr. William Soto Santiago";
|
author = 'Dr. William Soto Santiago'
|
||||||
break;
|
break
|
||||||
case "sermons":
|
case 'sermons':
|
||||||
author = "William Marrion Branham";
|
author = 'William Marrion Branham'
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return author;
|
return author
|
||||||
}
|
}
|
||||||
|
|
||||||
// removed: openItem relied on a Pinia store that is not installed in this app.
|
// removed: openItem relied on a Pinia store that is not installed in this app.
|
||||||
|
|
|
||||||
13
lang/en.json
13
lang/en.json
|
|
@ -46,5 +46,16 @@
|
||||||
"numbered_desc": "Navigate between pages with pagination controls.",
|
"numbered_desc": "Navigate between pages with pagination controls.",
|
||||||
"paragraph_numbers_title": "Paragraph numbers",
|
"paragraph_numbers_title": "Paragraph numbers",
|
||||||
"paragraph_numbers_desc": "Show the paragraph number next to each paragraph in the document detail."
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
lang/es.json
11
lang/es.json
|
|
@ -51,5 +51,16 @@
|
||||||
"numbered_desc": "Navega entre páginas con controles de paginación.",
|
"numbered_desc": "Navega entre páginas con controles de paginación.",
|
||||||
"paragraph_numbers_title": "Números de párrafo",
|
"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."
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
lang/fr.json
10
lang/fr.json
|
|
@ -34,5 +34,15 @@
|
||||||
"numbered_desc": "Naviguez entre les pages avec des contrôles de pagination.",
|
"numbered_desc": "Naviguez entre les pages avec des contrôles de pagination.",
|
||||||
"paragraph_numbers_title": "Numéros de paragraphe",
|
"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."
|
"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"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,5 +44,14 @@
|
||||||
"numbered_desc": "Navegue entre páginas com controles de paginação.",
|
"numbered_desc": "Navegue entre páginas com controles de paginação.",
|
||||||
"paragraph_numbers_title": "Números de parágrafo",
|
"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."
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue