From 5b6fa82d1b23c5733c0214672477df84773a7f9d Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Thu, 18 Apr 2024 23:02:05 +0200 Subject: [PATCH] Added tag search for events and characters --- src/components/calendar/CalendarEvent.vue | 2 +- .../calendar/search/CalendarSearch.vue | 189 ++++++++++++++++-- .../calendar/search/lists/SearchList.vue | 13 +- src/components/ui/command/Command.vue | 35 ++++ src/components/ui/command/CommandDialog.vue | 23 +++ src/components/ui/command/CommandEmpty.vue | 20 ++ src/components/ui/command/CommandGroup.vue | 36 ++++ src/components/ui/command/CommandInput.vue | 40 ++++ src/components/ui/command/CommandItem.vue | 31 +++ src/components/ui/command/CommandList.vue | 33 +++ .../ui/command/CommandSeparator.vue | 20 ++ src/components/ui/command/CommandShortcut.vue | 14 ++ src/components/ui/command/index.ts | 9 + src/components/ui/tags-input/TagsInput.vue | 35 ++++ .../ui/tags-input/TagsInputInput.vue | 22 ++ .../ui/tags-input/TagsInputItem.vue | 30 +++ .../ui/tags-input/TagsInputItemDelete.vue | 27 +++ .../ui/tags-input/TagsInputItemText.vue | 22 ++ src/components/ui/tags-input/index.ts | 5 + src/data/Characters.ts | 34 +++- src/data/Events.ts | 2 +- src/models/Characters.ts | 24 ++- src/models/Events.ts | 27 +-- src/utils/Strings.ts | 12 ++ 24 files changed, 649 insertions(+), 56 deletions(-) create mode 100644 src/components/ui/command/Command.vue create mode 100644 src/components/ui/command/CommandDialog.vue create mode 100644 src/components/ui/command/CommandEmpty.vue create mode 100644 src/components/ui/command/CommandGroup.vue create mode 100644 src/components/ui/command/CommandInput.vue create mode 100644 src/components/ui/command/CommandItem.vue create mode 100644 src/components/ui/command/CommandList.vue create mode 100644 src/components/ui/command/CommandSeparator.vue create mode 100644 src/components/ui/command/CommandShortcut.vue create mode 100644 src/components/ui/command/index.ts create mode 100644 src/components/ui/tags-input/TagsInput.vue create mode 100644 src/components/ui/tags-input/TagsInputInput.vue create mode 100644 src/components/ui/tags-input/TagsInputItem.vue create mode 100644 src/components/ui/tags-input/TagsInputItemDelete.vue create mode 100644 src/components/ui/tags-input/TagsInputItemText.vue create mode 100644 src/components/ui/tags-input/index.ts create mode 100644 src/utils/Strings.ts diff --git a/src/components/calendar/CalendarEvent.vue b/src/components/calendar/CalendarEvent.vue index cc9af2a..0feb07e 100644 --- a/src/components/calendar/CalendarEvent.vue +++ b/src/components/calendar/CalendarEvent.vue @@ -19,7 +19,7 @@ defineProps<{ 'text-white bg-lime-600 hover:bg-lime-700': event.category === 'naissance', 'text-white bg-stone-500 hover:bg-stone-700': event.category === 'mort', 'text-white bg-orange-600 hover:bg-orange-700': event.category === 'catastrophe', - 'text-white bg-pink-600 hover:bg-pink-700': event.category === 'catastrophe-naturelle', + 'text-white bg-pink-600 hover:bg-pink-700': event.category === 'catastrophe naturelle', 'text-white bg-sky-600 hover:bg-sky-700': event.category === 'législation', 'text-white bg-purple-600 hover:bg-purple-700': event.category === 'religion', 'text-white bg-emerald-600 hover:bg-emerald-700': event.category === 'joueurs', diff --git a/src/components/calendar/search/CalendarSearch.vue b/src/components/calendar/search/CalendarSearch.vue index 6ac478b..91623c7 100644 --- a/src/components/calendar/search/CalendarSearch.vue +++ b/src/components/calendar/search/CalendarSearch.vue @@ -1,16 +1,26 @@