From 442c0bbffc5c372c7ec3510914968f75ab6e4a4f Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 5 Jan 2023 17:13:03 +1100
Subject: Add partially-complete search modal

For now, use placeholder code for jumping to a search result.
Add db index for case-insensitive event title searching.
Make type=info requests accept title instead of ID (for looking up a searched-for title).
Make EventInfo contain an Event field (for showing info in search suggestions).
Add titleToEvent map in App, for use by SearchModal to look up searched-for titles.
Add keyboard shortcuts to open/close search and info modals.
---
 src/components/InfoModal.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/components/InfoModal.vue b/src/components/InfoModal.vue
index 6ab2bde..3e03187 100644
--- a/src/components/InfoModal.vue
+++ b/src/components/InfoModal.vue
@@ -74,7 +74,7 @@ import SCollapsible from './SCollapsible.vue';
 import CloseIcon from './icon/CloseIcon.vue';
 import DownIcon from './icon/DownIcon.vue';
 import ExternalLinkIcon from './icon/ExternalLinkIcon.vue';
-import {HistEvent, EventInfo} from '../lib';
+import {EventInfo} from '../lib';
 import {useStore} from '../store';
 
 // Refs
@@ -86,14 +86,14 @@ const store = useStore();
 
 // Props + events
 const props = defineProps({
-	event: {type: Object as PropType<HistEvent>, required: true},
 	eventInfo: {type: Object as PropType<EventInfo>, required: true},
 });
 const emit = defineEmits(['close']);
 
 // For data display
+const event = computed(() => props.eventInfo.event)
 const datesDisplayStr = computed(() => {
-	return props.event.start.toString() + (props.event.end == null ? '' : ' to ' + props.event.end.toString())
+	return event.value.start.toString() + (event.value.end == null ? '' : ' to ' + event.value.end.toString())
 });
 function licenseToUrl(license: string){
 	license = license.toLowerCase().replaceAll('-', ' ');
-- 
cgit v1.2.3

