diff --git a/components/CardPreview.vue b/components/CardPreview.vue index 97b1d78..ab24abd 100644 --- a/components/CardPreview.vue +++ b/components/CardPreview.vue @@ -22,6 +22,8 @@ const settingsStore = useSettingsStore() const childCount = ref(0) +const card = ref() + function cardClick() { if (!props.card_id) return emit("click") @@ -42,12 +44,17 @@ watch( props.wrapped ? rotation.value = (Math.random() * 4) - 2 : rotation.value = Math.random() > .5 ? 2 : -2 }, { immediate: true }) + + +onMounted(() => { + card.value?.style.setProperty("--random-seed", -Math.abs(Math.random() * 2) + 's') +})