diff --git a/components/CardPreview.vue b/components/CardPreview.vue index 35145c5..539fe10 100644 --- a/components/CardPreview.vue +++ b/components/CardPreview.vue @@ -10,6 +10,7 @@ export interface Props { interactible?: boolean; noEffects?: boolean; used_effects_indexes?: number[]; + discardable?: boolean; } const props = withDefaults(defineProps(), { @@ -18,6 +19,7 @@ const props = withDefaults(defineProps(), { locked: () => true, interactible: () => true, noEffects: () => false, + discardable: () => false, }); const emit = defineEmits([ @@ -225,6 +227,7 @@ onUnmounted(() => { unlocked: !props.locked, zoom: isZooming, no_effects: noEffects || !props.locked, + discardable, }" @contextmenu.prevent="false" @mousedown.right="rightClickDown" @@ -281,43 +284,6 @@ onUnmounted(() => { diff --git a/components/CardsGrouped.vue b/components/CardsGrouped.vue index 84c85f5..436484e 100644 --- a/components/CardsGrouped.vue +++ b/components/CardsGrouped.vue @@ -18,6 +18,7 @@ export interface Props { noEffects?: boolean; tokens?: Effect[]; championsKillable?: boolean; + discardable?: boolean; } const props = withDefaults(defineProps(), { @@ -26,6 +27,7 @@ const props = withDefaults(defineProps(), { noEffects: () => false, tokens: () => [], championsKillable: () => false, + discardable: () => false, }); const emit = defineEmits([ @@ -33,6 +35,7 @@ const emit = defineEmits([ "effectClick", "tokenClick", "damageChampionClick", + "discardCardClick", ]); const settingsStore = useSettingsStore(); @@ -123,6 +126,10 @@ function tokenClick(token: Effect, card: Card) { function damageChampionClick(card: Card) { emit("damageChampionClick", card); } + +function discardCardClick(card: Card) { + emit("discardCardClick", card); +}