-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
90 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,8 +65,8 @@ async function addComment() { | |
<template> | ||
<div> | ||
<h4 v-if="reviews.edges.length" class="font-semibold text-sm text-2xl text-gray-900">{{ $t('messages.shop.customerReviews') }}</h4> | ||
<h4 v-else class="font-semibold text-sm text-2xl text-gray-900">{{ $t('messages.shop.noReviews') }}</h4> | ||
<h4 v-if="reviews.edges.length" class="font-semibold text-2xl text-gray-900">{{ $t('messages.shop.customerReviews') }}</h4> | ||
<h4 v-else class="font-semibold text-2xl text-gray-900">{{ $t('messages.shop.noReviews') }}</h4> | ||
<div v-if="reviews.edges.length" class="my-2"> | ||
<StarRating :rating="reviews.averageRating" :hide-count="true" class="text-sm mr-2" /> | ||
<span class="text-sm"> {{ $t('messages.general.basedOn') }} {{ reviews.edges.length }} {{ $t('messages.shop.reviews') }}</span> | ||
|
@@ -85,7 +85,9 @@ async function addComment() { | |
</div> | ||
<div class="mt-10 text-xl mb-2 text-gray-900">Share your thoughts</div> | ||
<div class="text-sm mb-4">If you have used this product, we would love to hear about your experience.</div> | ||
<button @click="show = !show" class="border rounded-lg text-center w-full p-2">{{ show ? $t('messages.shop.close') : $t('messages.shop.writeReview') }}</button> | ||
<button @click="show = !show" class="border rounded-lg text-center w-full p-2"> | ||
{{ show ? $t('messages.shop.close') : $t('messages.shop.writeReview') }} | ||
</button> | ||
<transition class="ease-in-out transform transition-all" name="scale-y"> | ||
<form v-if="show" @submit.prevent="addComment" class="writeReview"> | ||
<div class="w-full text-gray-500"> | ||
|
@@ -111,7 +113,14 @@ async function addComment() { | |
</div> | ||
<div class="w-full col-span-full"> | ||
<label for="author" class="text-sm mb-0.5">{{ $t('messages.shop.rateEmail') }} <span class="text-red-500">*</span></label> | ||
<input class="w-full" id="author" placeholder="[email protected]" type="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" v-model="authorEmail" required /> | ||
<input | ||
class="w-full" | ||
id="author" | ||
placeholder="[email protected]" | ||
type="email" | ||
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" | ||
v-model="authorEmail" | ||
required /> | ||
</div> | ||
<Transition name="scale-y" mode="out-in"> | ||
<div v-if="errorMessage" class="my-4 text-sm text-red-500" v-html="errorMessage"></div> | ||
|
@@ -120,7 +129,9 @@ async function addComment() { | |
<div v-if="successMessage" class="my-4 text-sm text-green-500" v-html="successMessage"></div> | ||
</Transition> | ||
<div class="w-full col-span-full text-center mt-3"> | ||
<button class="flex gap-4 justify-center items-center transition font-semibold rounded-md w-full p-2 bg-amber-300 text-amber-900 hover:bg-amber-400" type="submit"> | ||
<button | ||
class="flex gap-4 justify-center items-center transition font-semibold rounded-md w-full p-2 bg-amber-300 text-amber-900 hover:bg-amber-400" | ||
type="submit"> | ||
<LoadingIcon v-if="isPending" stroke="4" size="16" color="#78350F" /> | ||
<span>{{ $t('messages.shop.submit') }}</span> | ||
</button> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fragment Image on MediaItem { | ||
sourceUrl | ||
altText | ||
title | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.