Adding draft to bible studies display in list and detail.
Adding draft to translation files.
This commit is contained in:
parent
c883975e33
commit
3424b22fcf
|
|
@ -50,6 +50,7 @@ interface DocumentDoc {
|
||||||
}
|
}
|
||||||
slug?: string
|
slug?: string
|
||||||
body?: string
|
body?: string
|
||||||
|
draft?: boolean
|
||||||
[key: string]: unknown
|
[key: string]: unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -773,6 +774,10 @@ function highlightTextNodes(root: HTMLElement, terms: string[]): number {
|
||||||
<div class="flex flex-col gap-3 p-4 sm:px-6 border-b border-default shadow-sm z-10">
|
<div class="flex flex-col gap-3 p-4 sm:px-6 border-b border-default shadow-sm z-10">
|
||||||
<div class="flex flex-wrap items-start justify-between gap-2">
|
<div class="flex flex-wrap items-start justify-between gap-2">
|
||||||
<div class="flex flex-wrap items-center gap-x-4 gap-y-1 min-w-0">
|
<div class="flex flex-wrap items-center gap-x-4 gap-y-1 min-w-0">
|
||||||
|
<p v-if="document?.draft" class="text-sm text-highlighted flex items-center gap-1.5 shrink-0">
|
||||||
|
<UIcon name="ph:file-dashed" class="size-4 text-carpared" />
|
||||||
|
{{ $t('search.draft') }}
|
||||||
|
</p>
|
||||||
<p v-if="safeDate()" class="text-sm text-highlighted flex items-center gap-1.5 shrink-0">
|
<p v-if="safeDate()" class="text-sm text-highlighted flex items-center gap-1.5 shrink-0">
|
||||||
<UIcon name="ph:calendar" class="size-4 text-green-600" />
|
<UIcon name="ph:calendar" class="size-4 text-green-600" />
|
||||||
{{ safeDate() }}
|
{{ safeDate() }}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ interface DocMeta {
|
||||||
country?: string
|
country?: string
|
||||||
type?: string
|
type?: string
|
||||||
slug?: string
|
slug?: string
|
||||||
|
draft?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DocumentDoc extends DocMeta {
|
export interface DocumentDoc extends DocMeta {
|
||||||
|
|
@ -188,7 +189,7 @@ async function fetchDocumentMeta(docIds: string[]) {
|
||||||
q: '*',
|
q: '*',
|
||||||
queryBy: 'title',
|
queryBy: 'title',
|
||||||
filterBy: `id:=[${unique.join(',')}]`,
|
filterBy: `id:=[${unique.join(',')}]`,
|
||||||
includeFields: 'id,title,date,timestamp,place,city,state,country,type,slug',
|
includeFields: 'id,title,date,timestamp,place,city,state,country,type,slug,draft',
|
||||||
perPage: unique.length,
|
perPage: unique.length,
|
||||||
page: 1
|
page: 1
|
||||||
}]
|
}]
|
||||||
|
|
@ -320,7 +321,7 @@ async function runBrowse(page = 1, append = false) {
|
||||||
sortBy: 'timestamp:desc',
|
sortBy: 'timestamp:desc',
|
||||||
perPage: settings.pageSize,
|
perPage: settings.pageSize,
|
||||||
page: typePage,
|
page: typePage,
|
||||||
includeFields: 'id,title,date,timestamp,place,city,state,country,type,slug'
|
includeFields: 'id,title,date,timestamp,place,city,state,country,type,slug,draft'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -674,12 +675,30 @@ function metaLocation(meta: DocMeta | undefined): string {
|
||||||
@click="selectGroup(group)"
|
@click="selectGroup(group)"
|
||||||
>
|
>
|
||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<p class="text-sm font-semibold line-clamp-2 text-highlighted">
|
<p class="text-sm font-semibold line-clamp-2 text-highlighted ">
|
||||||
|
<UTooltip
|
||||||
|
:text="$t('search.draft')"
|
||||||
|
color="error"
|
||||||
|
>
|
||||||
|
<UIcon
|
||||||
|
name="ph-file-dashed"
|
||||||
|
v-if="group.meta?.draft"
|
||||||
|
class="bg-carpared"
|
||||||
|
/>
|
||||||
|
<!-- <UBadge
|
||||||
|
v-if="group.meta?.draft"
|
||||||
|
label="borrador"
|
||||||
|
variant="solid"
|
||||||
|
color="error"
|
||||||
|
size="xs"
|
||||||
|
class="text-white bg-carpared uppercase font-bold text-xs text-[10px]"
|
||||||
|
/> -->
|
||||||
|
</UTooltip>
|
||||||
{{ group.meta?.title || group.docId }}
|
{{ group.meta?.title || group.docId }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2 text-xs mb-2 text-muted">
|
<p class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2 text-xs mb-2 text-muted justify-between">
|
||||||
<span
|
<span
|
||||||
v-if="metaDate(group.meta)"
|
v-if="metaDate(group.meta)"
|
||||||
class="flex items-center gap-1"
|
class="flex items-center gap-1"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
"searching": "Searching...",
|
"searching": "Searching...",
|
||||||
"tip": "Tip: wrap in \"quotes\" for exact phrase in that order.",
|
"tip": "Tip: wrap in \"quotes\" for exact phrase in that order.",
|
||||||
"publication": "Publication",
|
"publication": "Publication",
|
||||||
|
"draft": "Draft",
|
||||||
"country": "Country",
|
"country": "Country",
|
||||||
"state": "State",
|
"state": "State",
|
||||||
"city": "City",
|
"city": "City",
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
"searching": "Buscando...",
|
"searching": "Buscando...",
|
||||||
"tip": "Consejo: envuelve en \"comillas\" para frase exacta en ese orden.",
|
"tip": "Consejo: envuelve en \"comillas\" para frase exacta en ese orden.",
|
||||||
"publication": "Publicación",
|
"publication": "Publicación",
|
||||||
|
"draft": "Borrador",
|
||||||
"country": "País",
|
"country": "País",
|
||||||
"state": "Estado",
|
"state": "Estado",
|
||||||
"city": "Ciudad",
|
"city": "Ciudad",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Rechercher des activités",
|
"placeholder": "Rechercher des activités",
|
||||||
"publication": "Publicación"
|
"publication": "Publicación",
|
||||||
|
"draft": ""
|
||||||
},
|
},
|
||||||
"locale": {
|
"locale": {
|
||||||
"en": "English",
|
"en": "English",
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Digite para pesquisar...",
|
"placeholder": "Digite para pesquisar...",
|
||||||
"publication": "Publicação",
|
"publication": "Publicação",
|
||||||
|
"draft": "Borrador",
|
||||||
"for": "Para",
|
"for": "Para",
|
||||||
"city": "Cidade",
|
"city": "Cidade",
|
||||||
"page": "Página",
|
"page": "Página",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue