Added character list in search
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { computed, type Ref, type ComputedRef, ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { useUrlSearchParams } from '@vueuse/core'
|
||||
import type { LeimDate, LeimPeriod, LeimPeriodShort } from '@/models/Date'
|
||||
import { isDigit, isInt, isSignedInt } from '@/utils/Regex'
|
||||
import { useUrlSearchParams } from '@vueuse/core'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref, type ComputedRef, type Ref } from 'vue'
|
||||
|
||||
type CalendarViewType = 'month' | 'year' | 'decade' | 'century'
|
||||
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import type { Character } from '@/models/Characters'
|
||||
import { defineStore } from 'pinia'
|
||||
import type { LeimDate } from '@/models/Date'
|
||||
import { computed, type ComputedRef } from 'vue'
|
||||
|
||||
export type Character = {
|
||||
name: string
|
||||
birth?: LeimDate
|
||||
death?: LeimDate
|
||||
}
|
||||
|
||||
export const useCharacters = defineStore('characters', () => {
|
||||
const characters: Character[] = [
|
||||
// Counts of the Alliance
|
||||
|
||||
@@ -1,24 +1,8 @@
|
||||
import type { CalendarEvent } from '@/models/Events'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, watch, type Ref, ref, toRaw } from 'vue'
|
||||
import { useCharacters } from './characters'
|
||||
|
||||
import type { LeimDate } from '@/models/Date'
|
||||
import { computed, ref, watch, type Ref } from 'vue'
|
||||
import { useCalendar } from './calendar'
|
||||
|
||||
export type CalendarEvent = {
|
||||
title: string
|
||||
date: LeimDate
|
||||
description?: string
|
||||
category?: CalendarEventCategory
|
||||
}
|
||||
|
||||
export type CalendarEventCategory =
|
||||
| 'birth'
|
||||
| 'death'
|
||||
| 'catastrophe'
|
||||
| 'legal'
|
||||
| 'natural-disaster'
|
||||
| 'player'
|
||||
import { useCharacters } from './characters'
|
||||
|
||||
export const useCalendarEvents = defineStore('calendar-events', () => {
|
||||
const { currentDate, currentConfig } = useCalendar()
|
||||
@@ -130,5 +114,5 @@ export const useCalendarEvents = defineStore('calendar-events', () => {
|
||||
return allEvents.value.filter((event) => shouldEventBeDisplayed(event))
|
||||
}
|
||||
|
||||
return { allEvents, currentEvents }
|
||||
return { baseEvents, allEvents, currentEvents }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user