feat: add hub
This commit is contained in:
@@ -12,8 +12,8 @@ function toEntries(reviews: Review[], notes: Note[]): Entry[] {
|
||||
function searchableText(entry: Entry): string {
|
||||
const date = `${formatDate(entry.date)} ${entry.date}`
|
||||
const text = entry.kind === 'review'
|
||||
? `review ${entry.review.medium ?? ''} ${date} ${entry.review.title} ${entry.review.author ?? ''} ${entry.text}`
|
||||
: `note ${date} ${entry.text}`
|
||||
? `rezension ${entry.review.medium ? MEDIUM_NAMES[entry.review.medium] : ''} ${date} ${entry.review.title} ${entry.review.author ?? ''} ${entry.text}`
|
||||
: `notiz ${date} ${entry.text}`
|
||||
return text.toLowerCase()
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ export function useDiary(search: Ref<string>) {
|
||||
})
|
||||
|
||||
const errors = computed(() => [
|
||||
{ what: 'reviews', error: reviewsError.value },
|
||||
{ what: 'notes', error: notesError.value }
|
||||
{ what: 'Rezensionen', error: reviewsError.value },
|
||||
{ what: 'Notizen', error: notesError.value }
|
||||
].filter(({ error }) => error))
|
||||
|
||||
return { years, errors }
|
||||
|
||||
Reference in New Issue
Block a user