feat: better messages for no favourites and bookmarks (#2031)

This commit is contained in:
patak 2023-04-30 17:49:33 +02:00 committed by GitHub
parent ccf115ca4c
commit d4e0d5c5f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 9 deletions

View file

@ -11,7 +11,7 @@ const {
virtualScroller = false,
eventType = 'update',
preprocess,
noEndMessage = false,
endMessage = true,
} = defineProps<{
paginator: Paginator<T[], O>
keyProp?: keyof T
@ -19,7 +19,7 @@ const {
stream?: Promise<WsEvents>
eventType?: 'notification' | 'update'
preprocess?: (items: (U | T)[]) => U[]
noEndMessage?: boolean
endMessage?: boolean | string
}>()
defineSlots<{
@ -109,9 +109,9 @@ defineExpose({ createEntry, removeEntry, updateEntry })
<slot v-if="state === 'loading'" name="loading">
<TimelineSkeleton />
</slot>
<slot v-else-if="state === 'done' && !noEndMessage" name="done">
<slot v-else-if="state === 'done' && endMessage !== false" name="done">
<div p5 text-secondary italic text-center>
{{ t('common.end_of_list') }}
{{ t(typeof endMessage === 'string' ? endMessage : 'common.end_of_list') }}
</div>
</slot>
<div v-else-if="state === 'error'" p5 text-secondary>