add: OpenGraph image, timeline card state
Added three states to timeline card, added open graph image and description
This commit is contained in:
parent
f75d66a0d0
commit
d71e59b9c0
12 changed files with 112 additions and 34 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue