From 3b712a2b8e68962718dea45713b5129cd1c5e725 Mon Sep 17 00:00:00 2001 From: Dora Jurcevic Date: Tue, 2 Apr 2024 15:32:45 +0200 Subject: [PATCH 1/4] imp: selected variant displayed with border --- components/product/ProductVariants.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/product/ProductVariants.vue b/components/product/ProductVariants.vue index 7b9fa46c..b1592b27 100644 --- a/components/product/ProductVariants.vue +++ b/components/product/ProductVariants.vue @@ -12,6 +12,7 @@ v-if="product?.images?.[0]" :image="product.images[0]" class="hit__image" + :class="{'hit__image--selected': selected === product.id}" >
@@ -36,9 +37,16 @@ export default { return this.variants.filter((variant) => variant.id !== null) } }, + data() { + return { + selected: null as number | null + } + }, methods: { selectVariant(product: Product) { + this.selected = product.id this.$emit('selectVariant', product) + }, mouseoverVariant(product: Product) { this.$emit('mouseover', product) @@ -56,6 +64,9 @@ export default { @apply w-1/5 pr-2; .hit__image { @apply cursor-pointer border p-2; + &--selected { + @apply border-primary; + } } .hit__title { @apply text-center text-xs font-bold uppercase; From 7b74648d9f8177751a9fb7c67b9f0022016cd056 Mon Sep 17 00:00:00 2001 From: Dora Jurcevic Date: Tue, 2 Apr 2024 17:56:26 +0200 Subject: [PATCH 2/4] fix: fixed tailwind colors and header redirect --- components/global/header/HeaderUser.vue | 2 +- tailwind.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/global/header/HeaderUser.vue b/components/global/header/HeaderUser.vue index 5a20105e..cf2c1959 100644 --- a/components/global/header/HeaderUser.vue +++ b/components/global/header/HeaderUser.vue @@ -16,7 +16,7 @@ const auth = useShopinvaderService('auth') const user = auth?.getUser() const next = () => { const localePath = useLocalePath() - auth?.loginRedirect(localePath({name: 'account'})) + auth?.loginRedirect(localePath({name: 'login'})) }