add: new list layout design

New design, custom uuid, better handling of swipe
This commit is contained in:
Fiona Lena Urban 2025-05-10 13:32:28 +02:00
parent 628659c39d
commit 11bcdce6cb
7 changed files with 21 additions and 36 deletions

View file

@ -17,7 +17,7 @@
@click="sort"
/>
</aside>
<div class="pc-wrapper flex-col" role="list">
<div class="flex-col" role="list">
<PpPriceCard
v-for="(card, index) in cards"
:key="card.uuid"
@ -70,7 +70,7 @@ const createCard = (uuid : string) : Card => ({
})
const cards = useState<Card[]>('cards', () => [
createCard(crypto.randomUUID()),
createCard(randomUUID()),
])
const addCard = (card : Card) => {
@ -102,8 +102,7 @@ const updateCard = () => {
const openModal = (createNew : boolean, index : number) => {
if (createNew) {
currentCardIndex.value = -1
currentCard.value = createCard(crypto.randomUUID())
currentCard.value = createCard(randomUUID())
modal.value?.$el.showModal()
return
}