add: OpenGraph image, timeline card state

Added three states to timeline card, added open graph image and description
This commit is contained in:
Fiona Lena Urban 2025-05-23 08:58:14 +02:00
parent f75d66a0d0
commit d71e59b9c0
12 changed files with 112 additions and 34 deletions

View file

@ -46,19 +46,19 @@
</template>
<script setup lang="ts">
import type { Card } from '../../shared/Card'
import type { PriceCard } from '../../shared/PriceCard'
import type { Button } from '../../shared/ButtonGroup'
import { PpPriceCardDialog, PpDeleteDialog, PpPriceCard } from '#components'
const cards = useLocalStorage<Card[]>('cards', [])
const cards = useLocalStorage<PriceCard[]>('cards', [])
const currentSort = useLocalStorage<number>('sort', 0)
const currentCard = ref<Card>()
const currentCard = ref<PriceCard>()
const currentCardIndex = ref<number>(-1)
const modal = useTemplateRef<typeof PpPriceCardDialog>('modal')
const deleteModal = useTemplateRef<typeof PpDeleteDialog>('deleteModal')
const priceCards = useTemplateRef<(typeof PpPriceCard)[]>('priceCard')
const createCard = (uuid : string) : Card => ({
const createCard = (uuid : string) : PriceCard => ({
uuid,
name: '',
price: '',
@ -68,7 +68,7 @@ const createCard = (uuid : string) : Card => ({
})
const addCard = (card : Card) => {
const addCard = (card : PriceCard) => {
cards.value.unshift({ ...card })
sort()
}