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/TimeLine.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 8aeb883..bab6e5e 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -448,6 +448,9 @@ const idToEvent = computed(() => { // Maps visible event IDs to HistEvents
 		if ((store.ctgs as {[ctg: string]: boolean})[event.ctg] == false){
 			continue;
 		}
+		if (store.reqImgs && event.imgId == null){
+			continue;
+		}
 		map.set(event.id, event);
 	}
 	return map;
@@ -1288,7 +1291,7 @@ function eventImgStyles(eventId: number){
 	return {
 		width: store.eventImgSz + 'px',
 		height: store.eventImgSz + 'px',
-		backgroundImage: `url(${getImagePath(event.imgId)})`,
+		backgroundImage: event.imgId == null ? 'none' : `url(${getImagePath(event.imgId)})`,
 		backgroundColor: store.color.bgDark,
 		backgroundSize: 'cover',
 		borderColor: color,
-- 
cgit v1.2.3

