@crm-market/template-shared 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AddAddress/index.vue +10 -12
- package/components/Cart/index.vue +15 -17
- package/components/ChangePassword/index.vue +11 -13
- package/components/Checkout/index.vue +35 -37
- package/components/Common/DashboardNavigation.vue +11 -13
- package/components/Common/PageBanner.vue +4 -6
- package/components/Common/ProductCard.vue +38 -52
- package/components/Common/Services.vue +10 -12
- package/components/Contact/ContactForm.vue +13 -18
- package/components/Dashboard/index.vue +8 -10
- package/components/EditAddress/index.vue +14 -16
- package/components/EditProfile/index.vue +10 -12
- package/components/ForgotPassword/index.vue +7 -9
- package/components/Layout/Copyright.vue +3 -5
- package/components/Layout/Footer.vue +36 -51
- package/components/Layout/FooterTwo.vue +34 -40
- package/components/Layout/MiddleHeader.vue +12 -11
- package/components/Layout/MiddleHeaderThree.vue +8 -7
- package/components/Layout/MiddleHeaderTwo.vue +10 -9
- package/components/Layout/Navbar.vue +10 -8
- package/components/Layout/NavbarStyleThree.vue +10 -8
- package/components/Layout/NavbarStyleTwo.vue +8 -6
- package/components/Layout/ResponsiveNavbar.vue +40 -38
- package/components/Layout/TopHeader.vue +30 -63
- package/components/Login/index.vue +14 -19
- package/components/MyAccount/index.vue +31 -31
- package/components/OrderDetails/index.vue +16 -18
- package/components/OrderHistory/index.vue +13 -15
- package/components/ProductDetails/index.vue +17 -15
- package/components/Products/RecentlyViewed.vue +12 -14
- package/components/Products/index.vue +20 -18
- package/components/Register/index.vue +14 -19
- package/components/Wishlist/index.vue +12 -14
- package/composables/useCategories.ts +2 -1
- package/composables/useCheckout.ts +2 -2
- package/composables/useI18n.ts +114 -0
- package/composables/useProducts.ts +4 -3
- package/composables/useSiteConfig.ts +2 -1
- package/locales/ar.json +234 -0
- package/locales/en.json +234 -0
- package/locales/ru.json +234 -0
- package/locales/uk.json +234 -0
- package/nuxt.config.ts +3 -0
- package/package.json +6 -4
- package/pages/about-us.vue +2 -1
- package/pages/address.vue +2 -1
- package/pages/cart.vue +2 -1
- package/pages/categories.vue +2 -1
- package/pages/change-password.vue +2 -1
- package/pages/checkout.vue +2 -1
- package/pages/contact.vue +2 -1
- package/pages/dashboard.vue +2 -1
- package/pages/edit-address.vue +2 -1
- package/pages/edit-profile.vue +2 -1
- package/pages/faq.vue +2 -1
- package/pages/forgot-password.vue +2 -1
- package/pages/login.vue +2 -1
- package/pages/my-account.vue +2 -1
- package/pages/order-details.vue +2 -1
- package/pages/order-history.vue +2 -1
- package/pages/privacy-policy.vue +2 -1
- package/pages/product-details.vue +2 -1
- package/pages/products.vue +2 -1
- package/pages/register.vue +2 -1
- package/pages/terms-conditions.vue +2 -1
- package/pages/wishlist.vue +2 -1
- package/plugins/i18n.ts +7 -0
- package/plugins/vuetify.ts +0 -1
- package/utils/api.ts +17 -0
- package/utils/image.ts +2 -2
|
@@ -8,35 +8,35 @@
|
|
|
8
8
|
|
|
9
9
|
<div class="col-lg-8">
|
|
10
10
|
<div class="address-list">
|
|
11
|
-
<h3 class="mb-3">
|
|
11
|
+
<h3 class="mb-3">{{ t('account.address') }}</h3>
|
|
12
12
|
|
|
13
13
|
<div class="row">
|
|
14
14
|
<div class="col-lg-6">
|
|
15
15
|
<div class="added-address">
|
|
16
16
|
<NuxtLink to="/address" class="text-decoration-none">
|
|
17
17
|
<i class="ri-add-line"></i>
|
|
18
|
-
<span>
|
|
18
|
+
<span>{{ t('account.addAddress') }}</span>
|
|
19
19
|
</NuxtLink>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="col-lg-6">
|
|
23
23
|
<div class="billing-address-bar mb-0">
|
|
24
|
-
<h3>
|
|
24
|
+
<h3>{{ t('account.billingAddress') }}</h3>
|
|
25
25
|
<ul>
|
|
26
26
|
<li class="p-0">Doreen McCool</li>
|
|
27
27
|
<li>
|
|
28
|
-
<span>
|
|
28
|
+
<span>{{ t('account.address') }}:</span>
|
|
29
29
|
2491 Reel Avenue Albuquerque
|
|
30
30
|
</li>
|
|
31
31
|
</ul>
|
|
32
32
|
|
|
33
33
|
<ul>
|
|
34
34
|
<li>
|
|
35
|
-
<span>
|
|
35
|
+
<span>{{ t('account.phone') }}:</span>
|
|
36
36
|
<a href="tel:+1-(514)-321-4566">+1 (514) 321-4566</a>
|
|
37
37
|
</li>
|
|
38
38
|
<li>
|
|
39
|
-
<span>
|
|
39
|
+
<span>{{ t('account.email') }}:</span>
|
|
40
40
|
<a href="mailto:hello@tuan.com">hello@tuan.com</a>
|
|
41
41
|
</li>
|
|
42
42
|
</ul>
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
to="/edit-address"
|
|
47
47
|
class="btn edit btn-warning text-white"
|
|
48
48
|
>
|
|
49
|
-
|
|
49
|
+
{{ t('common.edit') }}
|
|
50
50
|
</NuxtLink>
|
|
51
51
|
|
|
52
52
|
<button class="btn btn-warning text-white ms-3">
|
|
53
|
-
|
|
53
|
+
{{ t('product.remove') }}
|
|
54
54
|
</button>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
@@ -63,8 +63,6 @@
|
|
|
63
63
|
</section>
|
|
64
64
|
</template>
|
|
65
65
|
|
|
66
|
-
<script>
|
|
67
|
-
|
|
68
|
-
name: "AddAddress",
|
|
69
|
-
};
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
const { t } = useI18n();
|
|
70
68
|
</script>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<table class="table align-middle">
|
|
6
6
|
<thead>
|
|
7
7
|
<tr>
|
|
8
|
-
<th scope="col">
|
|
9
|
-
<th scope="col">
|
|
10
|
-
<th scope="col">
|
|
11
|
-
<th scope="col">
|
|
12
|
-
<th scope="col">
|
|
13
|
-
<th scope="col">
|
|
8
|
+
<th scope="col">{{ t('product.product') }}</th>
|
|
9
|
+
<th scope="col">{{ t('product.name') }}</th>
|
|
10
|
+
<th scope="col">{{ t('product.unitPrice') }}</th>
|
|
11
|
+
<th scope="col">{{ t('product.quantity') }}</th>
|
|
12
|
+
<th scope="col">{{ t('product.subtotal') }}</th>
|
|
13
|
+
<th scope="col">{{ t('product.remove') }}</th>
|
|
14
14
|
</tr>
|
|
15
15
|
</thead>
|
|
16
16
|
<tbody>
|
|
@@ -117,13 +117,13 @@
|
|
|
117
117
|
<input
|
|
118
118
|
type="text"
|
|
119
119
|
class="form-control w-100"
|
|
120
|
-
placeholder="
|
|
120
|
+
:placeholder="t('cart.coupon')"
|
|
121
121
|
/>
|
|
122
122
|
<button
|
|
123
123
|
type="submit"
|
|
124
124
|
class="btn btn-warning text-white mt-3 mt-md-0 w-100"
|
|
125
125
|
>
|
|
126
|
-
|
|
126
|
+
{{ t('cart.applyCoupon') }}
|
|
127
127
|
<i class="flaticon-up-right-arrow"></i>
|
|
128
128
|
</button>
|
|
129
129
|
</div>
|
|
@@ -133,26 +133,26 @@
|
|
|
133
133
|
type="submit"
|
|
134
134
|
class="btn btn-warning text-white w-100 mt-3 mt-lg-0"
|
|
135
135
|
>
|
|
136
|
-
|
|
136
|
+
{{ t('cart.updatePrice') }}
|
|
137
137
|
<i class="flaticon-up-right-arrow"></i>
|
|
138
138
|
</button>
|
|
139
139
|
</div>
|
|
140
140
|
</div>
|
|
141
141
|
|
|
142
142
|
<div class="total-cart">
|
|
143
|
-
<h3>
|
|
143
|
+
<h3>{{ t('cart.cartTotals') }}</h3>
|
|
144
144
|
<ul>
|
|
145
145
|
<li class="d-flex justify-content-between">
|
|
146
|
-
<span class="title">
|
|
146
|
+
<span class="title">{{ t('cart.subtotal') }}</span>
|
|
147
147
|
<span class="price">$595</span>
|
|
148
148
|
</li>
|
|
149
149
|
<li class="d-flex justify-content-between">
|
|
150
|
-
<span class="title">
|
|
150
|
+
<span class="title">{{ t('cart.total') }}</span>
|
|
151
151
|
<span class="price">$595</span>
|
|
152
152
|
</li>
|
|
153
153
|
</ul>
|
|
154
154
|
<NuxtLink to="/checkout" class="btn btn-warning text-white">
|
|
155
|
-
|
|
155
|
+
{{ t('cart.proceedToCheckout') }}
|
|
156
156
|
<i class="flaticon-up-right-arrow"></i>
|
|
157
157
|
</NuxtLink>
|
|
158
158
|
</div>
|
|
@@ -160,8 +160,6 @@
|
|
|
160
160
|
</div>
|
|
161
161
|
</template>
|
|
162
162
|
|
|
163
|
-
<script>
|
|
164
|
-
|
|
165
|
-
name: "Cart",
|
|
166
|
-
};
|
|
163
|
+
<script setup lang="ts">
|
|
164
|
+
const { t } = useI18n();
|
|
167
165
|
</script>
|
|
@@ -17,34 +17,34 @@
|
|
|
17
17
|
<ul class="nav nav-tabs login-tabs" id="myTab" role="tablist">
|
|
18
18
|
<li class="nav-item" role="presentation">
|
|
19
19
|
<NuxtLink to="/change-password" class="nav-link active">
|
|
20
|
-
|
|
20
|
+
{{ t('auth.changePassword') }}
|
|
21
21
|
</NuxtLink>
|
|
22
22
|
</li>
|
|
23
23
|
</ul>
|
|
24
|
-
<p>
|
|
24
|
+
<p>{{ t('auth.loginDescription') }}</p>
|
|
25
25
|
<form>
|
|
26
26
|
<div class="form-group mb-4">
|
|
27
|
-
<label class="label">
|
|
27
|
+
<label class="label">{{ t('auth.oldPassword') }} *</label>
|
|
28
28
|
<input
|
|
29
29
|
type="password"
|
|
30
30
|
class="form-control"
|
|
31
|
-
placeholder="
|
|
31
|
+
:placeholder="t('auth.oldPassword')"
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="form-group mb-4">
|
|
35
|
-
<label class="label">
|
|
35
|
+
<label class="label">{{ t('auth.newPassword') }} *</label>
|
|
36
36
|
<input
|
|
37
37
|
type="password"
|
|
38
38
|
class="form-control"
|
|
39
|
-
placeholder="
|
|
39
|
+
:placeholder="t('auth.newPassword')"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
42
|
<div class="form-group mb-4">
|
|
43
|
-
<label class="label">
|
|
43
|
+
<label class="label">{{ t('auth.confirmPassword') }} *</label>
|
|
44
44
|
<input
|
|
45
45
|
type="password"
|
|
46
46
|
class="form-control"
|
|
47
|
-
placeholder="
|
|
47
|
+
:placeholder="t('auth.confirmPassword')"
|
|
48
48
|
/>
|
|
49
49
|
</div>
|
|
50
50
|
<div class="form-group mb-0">
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
type="submit"
|
|
53
53
|
class="btn btn-warning btn-pill text-white w-100 d-block"
|
|
54
54
|
>
|
|
55
|
-
|
|
55
|
+
{{ t('auth.savePassword') }}
|
|
56
56
|
</button>
|
|
57
57
|
</div>
|
|
58
58
|
</form>
|
|
@@ -64,8 +64,6 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
|
-
<script>
|
|
68
|
-
|
|
69
|
-
name: "ChangePassword",
|
|
70
|
-
};
|
|
67
|
+
<script setup lang="ts">
|
|
68
|
+
const { t } = useI18n();
|
|
71
69
|
</script>
|
|
@@ -4,45 +4,45 @@
|
|
|
4
4
|
<div class="row">
|
|
5
5
|
<div class="col-lg-5">
|
|
6
6
|
<div class="checkout-content">
|
|
7
|
-
<h3>
|
|
7
|
+
<h3>{{ t('checkout.billingDetails') }}</h3>
|
|
8
8
|
<div class="form-group mb-4">
|
|
9
|
-
<label class="label">
|
|
9
|
+
<label class="label">{{ t('checkout.firstName') }}</label>
|
|
10
10
|
<input
|
|
11
11
|
type="text"
|
|
12
12
|
class="form-control"
|
|
13
|
-
placeholder="
|
|
13
|
+
:placeholder="t('checkout.firstName')"
|
|
14
14
|
/>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="form-group mb-4">
|
|
17
|
-
<label class="label">
|
|
18
|
-
<input type="text" class="form-control" placeholder="
|
|
17
|
+
<label class="label">{{ t('checkout.lastName') }}</label>
|
|
18
|
+
<input type="text" class="form-control" :placeholder="t('checkout.lastName')" />
|
|
19
19
|
</div>
|
|
20
20
|
<div class="form-group mb-4">
|
|
21
|
-
<label class="label">
|
|
21
|
+
<label class="label">{{ t('checkout.emailAddress') }}</label>
|
|
22
22
|
<input
|
|
23
23
|
type="email"
|
|
24
24
|
class="form-control"
|
|
25
|
-
placeholder="
|
|
25
|
+
:placeholder="t('checkout.emailAddress')"
|
|
26
26
|
/>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="form-group mb-4">
|
|
29
|
-
<label class="label">
|
|
29
|
+
<label class="label">{{ t('checkout.companyName') }}</label>
|
|
30
30
|
<input
|
|
31
31
|
type="text"
|
|
32
32
|
class="form-control"
|
|
33
|
-
placeholder="
|
|
33
|
+
:placeholder="t('checkout.companyName')"
|
|
34
34
|
/>
|
|
35
35
|
</div>
|
|
36
36
|
<div class="form-group mb-4">
|
|
37
|
-
<label class="label">
|
|
37
|
+
<label class="label">{{ t('checkout.countryRegion') }}</label>
|
|
38
38
|
<input
|
|
39
39
|
type="text"
|
|
40
40
|
class="form-control"
|
|
41
|
-
placeholder="
|
|
41
|
+
:placeholder="t('checkout.countryRegion')"
|
|
42
42
|
/>
|
|
43
43
|
</div>
|
|
44
44
|
<div class="form-group mb-4">
|
|
45
|
-
<label class="label">
|
|
45
|
+
<label class="label">{{ t('checkout.countryRegion') }}</label>
|
|
46
46
|
<select
|
|
47
47
|
class="form-select form-control"
|
|
48
48
|
aria-label="Default select example"
|
|
@@ -53,41 +53,41 @@
|
|
|
53
53
|
</select>
|
|
54
54
|
</div>
|
|
55
55
|
<div class="form-group mb-4">
|
|
56
|
-
<label class="label">
|
|
56
|
+
<label class="label">{{ t('checkout.streetAddress') }}</label>
|
|
57
57
|
<input
|
|
58
58
|
type="text"
|
|
59
59
|
class="form-control"
|
|
60
|
-
placeholder="
|
|
60
|
+
:placeholder="t('checkout.addressLine1')"
|
|
61
61
|
/>
|
|
62
62
|
</div>
|
|
63
63
|
<div class="form-group mb-4">
|
|
64
64
|
<input
|
|
65
65
|
type="text"
|
|
66
66
|
class="form-control"
|
|
67
|
-
placeholder="
|
|
67
|
+
:placeholder="t('checkout.addressLine2')"
|
|
68
68
|
/>
|
|
69
69
|
</div>
|
|
70
70
|
<div class="form-group mb-4">
|
|
71
|
-
<label class="label">
|
|
72
|
-
<input type="text" class="form-control" placeholder="
|
|
71
|
+
<label class="label">{{ t('checkout.townCity') }}</label>
|
|
72
|
+
<input type="text" class="form-control" :placeholder="t('checkout.townCity')" />
|
|
73
73
|
</div>
|
|
74
74
|
<div class="form-group mb-4">
|
|
75
|
-
<label class="label">
|
|
75
|
+
<label class="label">{{ t('checkout.postalCode') }}</label>
|
|
76
76
|
<input
|
|
77
77
|
type="text"
|
|
78
78
|
class="form-control"
|
|
79
|
-
placeholder="
|
|
79
|
+
:placeholder="t('checkout.postalCode')"
|
|
80
80
|
/>
|
|
81
81
|
</div>
|
|
82
82
|
<div class="form-group mb-4">
|
|
83
|
-
<label class="label">
|
|
84
|
-
<input type="text" class="form-control" placeholder="
|
|
83
|
+
<label class="label">{{ t('checkout.phone') }}</label>
|
|
84
|
+
<input type="text" class="form-control" :placeholder="t('checkout.phone')" />
|
|
85
85
|
</div>
|
|
86
86
|
<div class="form-group mb-4">
|
|
87
|
-
<label class="label">
|
|
87
|
+
<label class="label">{{ t('checkout.additionalInfo') }}</label>
|
|
88
88
|
<textarea
|
|
89
89
|
class="form-control"
|
|
90
|
-
placeholder="
|
|
90
|
+
:placeholder="t('checkout.notes')"
|
|
91
91
|
cols="30"
|
|
92
92
|
rows="5"
|
|
93
93
|
></textarea>
|
|
@@ -97,15 +97,15 @@
|
|
|
97
97
|
|
|
98
98
|
<div class="col-lg-7">
|
|
99
99
|
<div class="your-order">
|
|
100
|
-
<h3>
|
|
100
|
+
<h3>{{ t('checkout.yourOrder') }}</h3>
|
|
101
101
|
|
|
102
102
|
<div class="your-order-form table-responsive bg-fffbf5">
|
|
103
103
|
<table class="table table-bordered">
|
|
104
104
|
<thead>
|
|
105
105
|
<tr>
|
|
106
|
-
<th scope="col">
|
|
107
|
-
<th scope="col">
|
|
108
|
-
<th scope="col">
|
|
106
|
+
<th scope="col">{{ t('product.product') }}</th>
|
|
107
|
+
<th scope="col">{{ t('product.quantity') }}</th>
|
|
108
|
+
<th scope="col">{{ t('product.subtotal') }}</th>
|
|
109
109
|
</tr>
|
|
110
110
|
</thead>
|
|
111
111
|
<tbody>
|
|
@@ -137,19 +137,19 @@
|
|
|
137
137
|
<td class="price">$398</td>
|
|
138
138
|
</tr>
|
|
139
139
|
<tr>
|
|
140
|
-
<td class="sub-title">
|
|
140
|
+
<td class="sub-title">{{ t('cart.subtotal') }}</td>
|
|
141
141
|
<td class="sub-price"></td>
|
|
142
142
|
<td class="sub-price">$595</td>
|
|
143
143
|
</tr>
|
|
144
144
|
<tr class="total">
|
|
145
|
-
<td class="sub-title">
|
|
145
|
+
<td class="sub-title">{{ t('cart.total') }}</td>
|
|
146
146
|
<td class="sub-price"></td>
|
|
147
147
|
<td class="sub-price">$595</td>
|
|
148
148
|
</tr>
|
|
149
149
|
</tbody>
|
|
150
150
|
</table>
|
|
151
151
|
|
|
152
|
-
<h3>
|
|
152
|
+
<h3>{{ t('checkout.paymentOption') }}</h3>
|
|
153
153
|
<div class="form-check">
|
|
154
154
|
<input
|
|
155
155
|
class="form-check-input"
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
id="flexCheckDefault"
|
|
159
159
|
/>
|
|
160
160
|
<label class="form-check-label" for="flexCheckDefault">
|
|
161
|
-
|
|
161
|
+
{{ t('checkout.cardPayment') }}
|
|
162
162
|
</label>
|
|
163
163
|
</div>
|
|
164
164
|
<div class="form-check mb-0">
|
|
@@ -170,12 +170,12 @@
|
|
|
170
170
|
checked
|
|
171
171
|
/>
|
|
172
172
|
<label class="form-check-label" for="flexCheckChecked">
|
|
173
|
-
|
|
173
|
+
{{ t('checkout.cashOnDelivery') }}
|
|
174
174
|
</label>
|
|
175
175
|
</div>
|
|
176
176
|
|
|
177
177
|
<div class="mt-5">
|
|
178
|
-
<button class="btn btn-warning text-white">
|
|
178
|
+
<button class="btn btn-warning text-white">{{ t('checkout.placeOrder') }}</button>
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
</div>
|
|
@@ -185,8 +185,6 @@
|
|
|
185
185
|
</div>
|
|
186
186
|
</template>
|
|
187
187
|
|
|
188
|
-
<script>
|
|
189
|
-
|
|
190
|
-
name: "Checkout",
|
|
191
|
-
};
|
|
188
|
+
<script setup lang="ts">
|
|
189
|
+
const { t } = useI18n();
|
|
192
190
|
</script>
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ul class="dashboard-navigation">
|
|
3
3
|
<li>
|
|
4
|
-
<h3>
|
|
4
|
+
<h3>{{ t('account.navigation') }}</h3>
|
|
5
5
|
</li>
|
|
6
6
|
<li>
|
|
7
|
-
<NuxtLink to="/dashboard">
|
|
7
|
+
<NuxtLink to="/dashboard">{{ t('account.dashboard') }}</NuxtLink>
|
|
8
8
|
</li>
|
|
9
9
|
<li>
|
|
10
|
-
<NuxtLink to="/edit-profile">
|
|
10
|
+
<NuxtLink to="/edit-profile">{{ t('account.editProfile') }}</NuxtLink>
|
|
11
11
|
</li>
|
|
12
12
|
<li>
|
|
13
|
-
<NuxtLink to="/edit-address">
|
|
13
|
+
<NuxtLink to="/edit-address">{{ t('account.editAddress') }}</NuxtLink>
|
|
14
14
|
</li>
|
|
15
15
|
<li>
|
|
16
|
-
<NuxtLink to="/order-history">
|
|
16
|
+
<NuxtLink to="/order-history">{{ t('account.orderHistory') }}</NuxtLink>
|
|
17
17
|
</li>
|
|
18
18
|
<li>
|
|
19
|
-
<NuxtLink to="/order-details">
|
|
19
|
+
<NuxtLink to="/order-details">{{ t('account.orderDetails') }}</NuxtLink>
|
|
20
20
|
</li>
|
|
21
21
|
<li>
|
|
22
|
-
<NuxtLink to="/address">
|
|
22
|
+
<NuxtLink to="/address">{{ t('account.address') }}</NuxtLink>
|
|
23
23
|
</li>
|
|
24
24
|
<li>
|
|
25
|
-
<NuxtLink to="/password">
|
|
25
|
+
<NuxtLink to="/password">{{ t('auth.changePassword') }}</NuxtLink>
|
|
26
26
|
</li>
|
|
27
27
|
<li>
|
|
28
|
-
<NuxtLink to="/my-account">
|
|
28
|
+
<NuxtLink to="/my-account">{{ t('auth.logOut') }}</NuxtLink>
|
|
29
29
|
</li>
|
|
30
30
|
</ul>
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
|
-
<script>
|
|
34
|
-
|
|
35
|
-
name: "DashboardNavigation",
|
|
36
|
-
};
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
const { t } = useI18n();
|
|
37
35
|
</script>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="d-flex justify-content-between align-items-center">
|
|
5
5
|
<ul class="d-flex align-content-center list-unstyled mb-0 page-content">
|
|
6
6
|
<li>
|
|
7
|
-
<NuxtLink to="/" class="text-decoration-none">
|
|
7
|
+
<NuxtLink to="/" class="text-decoration-none">{{ t('nav.home') }}</NuxtLink>
|
|
8
8
|
</li>
|
|
9
9
|
<li>
|
|
10
10
|
<span>{{ pageTitle }}</span>
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
|
-
<script>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
props: ["pageTitle"],
|
|
27
|
-
};
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
defineProps<{ pageTitle: string }>();
|
|
25
|
+
const { t } = useI18n();
|
|
28
26
|
</script>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
class="btn btn-sm"
|
|
20
20
|
:class="inCart ? 'btn-success' : 'btn-outline-primary'"
|
|
21
21
|
@click="handleAddToCart"
|
|
22
|
-
:title="inCart ? '
|
|
22
|
+
:title="inCart ? t('product.inCart') : t('product.addToCart')"
|
|
23
23
|
>
|
|
24
24
|
<i :class="inCart ? 'ri-check-line' : 'ri-shopping-cart-line'"></i>
|
|
25
25
|
</button>
|
|
@@ -50,66 +50,52 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
|
-
<script lang="ts">
|
|
54
|
-
import {
|
|
53
|
+
<script setup lang="ts">
|
|
54
|
+
import { computed } from "vue";
|
|
55
55
|
import { resolveImageUrl } from "~/utils/image";
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
name: "ProductCard",
|
|
59
|
-
props: {
|
|
60
|
-
product: {
|
|
61
|
-
type: Object,
|
|
62
|
-
required: true,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
setup(props) {
|
|
66
|
-
const { addToCart, isInCart } = useCart();
|
|
57
|
+
const { t } = useI18n();
|
|
67
58
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return resolveImageUrl(images[0]);
|
|
72
|
-
}
|
|
73
|
-
return '';
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const hasDiscount = computed(() =>
|
|
77
|
-
props.product.discountPrice && props.product.discountPrice < props.product.price
|
|
78
|
-
);
|
|
59
|
+
const props = defineProps<{
|
|
60
|
+
product: Record<string, any>;
|
|
61
|
+
}>();
|
|
79
62
|
|
|
80
|
-
|
|
81
|
-
hasDiscount.value ? props.product.discountPrice : props.product.price
|
|
82
|
-
);
|
|
63
|
+
const { addToCart, isInCart } = useCart();
|
|
83
64
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
const productImage = computed(() => {
|
|
66
|
+
const images = props.product.images;
|
|
67
|
+
if (images && images.length > 0) {
|
|
68
|
+
return resolveImageUrl(images[0]);
|
|
69
|
+
}
|
|
70
|
+
return '';
|
|
71
|
+
});
|
|
88
72
|
|
|
89
|
-
|
|
73
|
+
const hasDiscount = computed(() =>
|
|
74
|
+
props.product.discountPrice && props.product.discountPrice < props.product.price
|
|
75
|
+
);
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
productId: props.product.id,
|
|
95
|
-
name: props.product.name,
|
|
96
|
-
price: props.product.price,
|
|
97
|
-
discountPrice: props.product.discountPrice,
|
|
98
|
-
image: props.product.images?.[0] || '',
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
};
|
|
77
|
+
const effectivePrice = computed(() =>
|
|
78
|
+
hasDiscount.value ? props.product.discountPrice : props.product.price
|
|
79
|
+
);
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
effectivePrice,
|
|
107
|
-
discountPercent,
|
|
108
|
-
inCart,
|
|
109
|
-
handleAddToCart,
|
|
110
|
-
};
|
|
111
|
-
},
|
|
81
|
+
const discountPercent = computed(() => {
|
|
82
|
+
if (!hasDiscount.value) return 0;
|
|
83
|
+
return Math.round(((props.product.price - props.product.discountPrice) / props.product.price) * 100);
|
|
112
84
|
});
|
|
85
|
+
|
|
86
|
+
const inCart = computed(() => isInCart(props.product.id));
|
|
87
|
+
|
|
88
|
+
const handleAddToCart = () => {
|
|
89
|
+
if (!inCart.value) {
|
|
90
|
+
addToCart({
|
|
91
|
+
productId: props.product.id,
|
|
92
|
+
name: props.product.name,
|
|
93
|
+
price: props.product.price,
|
|
94
|
+
discountPrice: props.product.discountPrice,
|
|
95
|
+
image: props.product.images?.[0] || '',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
113
99
|
</script>
|
|
114
100
|
|
|
115
101
|
<style scoped>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<img src="~/assets/images/shipped.png" alt="shipped" />
|
|
9
9
|
</div>
|
|
10
10
|
<div class="flex-grow-1 ms-3">
|
|
11
|
-
<h3>
|
|
12
|
-
<span>
|
|
11
|
+
<h3>{{ t('services.fastDelivery') }}</h3>
|
|
12
|
+
<span>{{ t('services.fastDeliveryDesc') }}</span>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
</v-col>
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<img src="~/assets/images/credit.png" alt="shipped" />
|
|
20
20
|
</div>
|
|
21
21
|
<div class="flex-grow-1 ms-3">
|
|
22
|
-
<h3>
|
|
23
|
-
<span>
|
|
22
|
+
<h3>{{ t('services.securedPayment') }}</h3>
|
|
23
|
+
<span>{{ t('services.securedPaymentDesc') }}</span>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
</v-col>
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
<img src="~/assets/images/wallet.png" alt="shipped" />
|
|
31
31
|
</div>
|
|
32
32
|
<div class="flex-grow-1 ms-3">
|
|
33
|
-
<h3>
|
|
34
|
-
<span>
|
|
33
|
+
<h3>{{ t('services.moneyBack') }}</h3>
|
|
34
|
+
<span>{{ t('services.moneyBackDesc') }}</span>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
</v-col>
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
<img src="~/assets/images/headphones.png" alt="shipped" />
|
|
42
42
|
</div>
|
|
43
43
|
<div class="flex-grow-1 ms-3">
|
|
44
|
-
<h3>
|
|
45
|
-
<span>
|
|
44
|
+
<h3>{{ t('services.support247') }}</h3>
|
|
45
|
+
<span>{{ t('services.support247Desc') }}</span>
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
48
48
|
</v-col>
|
|
@@ -51,8 +51,6 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
|
-
<script>
|
|
55
|
-
|
|
56
|
-
name: "Services",
|
|
57
|
-
};
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
const { t } = useI18n();
|
|
58
56
|
</script>
|