From 96805eeb9edbbdde2277d155090c955cfa664506 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 14 Jan 2023 16:10:31 +1100
Subject: Allow showing events without images

Add setting for showing such events
Fix searches not always avoiding filtered categories
---
 src/components/InfoModal.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/InfoModal.vue')

diff --git a/src/components/InfoModal.vue b/src/components/InfoModal.vue
index f709676..cd067e1 100644
--- a/src/components/InfoModal.vue
+++ b/src/components/InfoModal.vue
@@ -16,7 +16,7 @@
 		</div>
 		<!-- Main content -->
 		<div class="border-t border-stone-400 p-2 md:p-3">
-			<div class="mt-1 mr-2 md:mb-2 md:mr-4 md:float-left">
+			<div v-if="eventInfo.imgInfo != null" class="mt-1 mr-2 md:mb-2 md:mr-4 md:float-left">
 				<!-- Image -->
 				<a :href="eventInfo.imgInfo.url" target="_blank" class="block w-fit mx-auto" :style="imgStyles"></a>
 				<!-- Image Source -->
@@ -153,7 +153,7 @@ const imgStyles = computed(() => {
 	return {
 		width: '200px',
 		height: '200px',
-		backgroundImage: `url(${getImagePath(event.value.imgId)})`,
+		backgroundImage: event.value.imgId == null ? 'none' : `url(${getImagePath(event.value.imgId)})`,
 		backgroundColor: store.color.bgDark,
 		backgroundSize: 'cover',
 		borderRadius: store.borderRadius + 'px',
-- 
cgit v1.2.3

