From 87dffc64d85d641b90fa745fdb0344ab1f5379d6 Mon Sep 17 00:00:00 2001 From: Konrad Mohrfeldt <km@roko.li> Date: Wed, 31 Jul 2024 11:33:47 +0200 Subject: [PATCH] fix(Calendar): only display playlist warning for scheduled program entries refs #128 --- src/Pages/Calendar.vue | 2 +- src/components/calendar/ACalendarDayEntry.vue | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Pages/Calendar.vue b/src/Pages/Calendar.vue index 11b81d7a..fa4df594 100644 --- a/src/Pages/Calendar.vue +++ b/src/Pages/Calendar.vue @@ -192,7 +192,7 @@ const calendarEvents = computedAsync( continue } - const isEmpty = entry.playlistId === null + const isEmpty = entry.timeslotId && entry.playlistId === null const emptyText = isEmpty ? `: ${t('calendar.empty')} âš ` : '' const ts = entry.timeslotId ? await timeslotStore.retrieve(entry.timeslotId, { useCached: true }) diff --git a/src/components/calendar/ACalendarDayEntry.vue b/src/components/calendar/ACalendarDayEntry.vue index 89cf09b9..e87abc9f 100644 --- a/src/components/calendar/ACalendarDayEntry.vue +++ b/src/components/calendar/ACalendarDayEntry.vue @@ -80,6 +80,7 @@ <APill v-if="timeslot?.repetitionOfId" class="tw-text-teal-700 tw-text-sm"> {{ t('calendar.repetition') }} </APill> + <APill v-if=" playlistDurationInSeconds !== null && @@ -89,14 +90,11 @@ > {{ t('calendar.mismatchedLength') }} </APill> + <APill v-if="timeslot && !timeslot.playlistId" class="tw-text-amber-700 tw-text-sm"> {{ t('calendar.fallback') }} </APill> </template> - - <APill v-else-if="!entry.playlistId" class="tw-text-rose-700 tw-text-sm"> - {{ t('calendar.empty') }} - </APill> </div> </ATimelineContent> </ATimelineItem> -- GitLab