@crm-market/template-shared 1.0.3 → 1.0.4

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.
Files changed (64) hide show
  1. package/components/AddAddress/index.vue +10 -12
  2. package/components/Cart/index.vue +15 -17
  3. package/components/ChangePassword/index.vue +11 -13
  4. package/components/Checkout/index.vue +35 -37
  5. package/components/Common/DashboardNavigation.vue +11 -13
  6. package/components/Common/PageBanner.vue +4 -6
  7. package/components/Common/ProductCard.vue +38 -52
  8. package/components/Common/Services.vue +10 -12
  9. package/components/Contact/ContactForm.vue +13 -18
  10. package/components/Dashboard/index.vue +8 -10
  11. package/components/EditAddress/index.vue +14 -16
  12. package/components/EditProfile/index.vue +10 -12
  13. package/components/ForgotPassword/index.vue +7 -9
  14. package/components/Layout/Copyright.vue +3 -5
  15. package/components/Layout/Footer.vue +36 -51
  16. package/components/Layout/FooterTwo.vue +34 -40
  17. package/components/Layout/MiddleHeader.vue +11 -9
  18. package/components/Layout/MiddleHeaderThree.vue +7 -5
  19. package/components/Layout/MiddleHeaderTwo.vue +9 -7
  20. package/components/Layout/Navbar.vue +10 -8
  21. package/components/Layout/NavbarStyleThree.vue +10 -8
  22. package/components/Layout/NavbarStyleTwo.vue +8 -6
  23. package/components/Layout/ResponsiveNavbar.vue +40 -38
  24. package/components/Layout/TopHeader.vue +30 -63
  25. package/components/Login/index.vue +14 -19
  26. package/components/MyAccount/index.vue +31 -31
  27. package/components/OrderDetails/index.vue +16 -18
  28. package/components/OrderHistory/index.vue +13 -15
  29. package/components/ProductDetails/index.vue +17 -15
  30. package/components/Products/RecentlyViewed.vue +12 -14
  31. package/components/Products/index.vue +20 -18
  32. package/components/Register/index.vue +14 -19
  33. package/components/Wishlist/index.vue +12 -14
  34. package/composables/useI18n.ts +114 -0
  35. package/locales/ar.json +234 -0
  36. package/locales/en.json +234 -0
  37. package/locales/ru.json +234 -0
  38. package/locales/uk.json +234 -0
  39. package/nuxt.config.ts +1 -0
  40. package/package.json +6 -4
  41. package/pages/about-us.vue +2 -1
  42. package/pages/address.vue +2 -1
  43. package/pages/cart.vue +2 -1
  44. package/pages/categories.vue +2 -1
  45. package/pages/change-password.vue +2 -1
  46. package/pages/checkout.vue +2 -1
  47. package/pages/contact.vue +2 -1
  48. package/pages/dashboard.vue +2 -1
  49. package/pages/edit-address.vue +2 -1
  50. package/pages/edit-profile.vue +2 -1
  51. package/pages/faq.vue +2 -1
  52. package/pages/forgot-password.vue +2 -1
  53. package/pages/login.vue +2 -1
  54. package/pages/my-account.vue +2 -1
  55. package/pages/order-details.vue +2 -1
  56. package/pages/order-history.vue +2 -1
  57. package/pages/privacy-policy.vue +2 -1
  58. package/pages/product-details.vue +2 -1
  59. package/pages/products.vue +2 -1
  60. package/pages/register.vue +2 -1
  61. package/pages/terms-conditions.vue +2 -1
  62. package/pages/wishlist.vue +2 -1
  63. package/plugins/i18n.ts +7 -0
  64. package/plugins/vuetify.ts +0 -1
@@ -8,35 +8,35 @@
8
8
 
9
9
  <div class="col-lg-8">
10
10
  <div class="address-list">
11
- <h3 class="mb-3">Address</h3>
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>Add address</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>Billing Address</h3>
24
+ <h3>{{ t('account.billingAddress') }}</h3>
25
25
  <ul>
26
26
  <li class="p-0">Doreen McCool</li>
27
27
  <li>
28
- <span>Address:</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>Phone:</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>Email:</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
- Edit
49
+ {{ t('common.edit') }}
50
50
  </NuxtLink>
51
51
 
52
52
  <button class="btn btn-warning text-white ms-3">
53
- Remove
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
- export default {
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">Product</th>
9
- <th scope="col">Name</th>
10
- <th scope="col">Unit Price</th>
11
- <th scope="col">Quantity</th>
12
- <th scope="col">Subtotal</th>
13
- <th scope="col">Remove</th>
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="Coupon"
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
- Apply Coupon
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
- Update Price
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>Cart Totals</h3>
143
+ <h3>{{ t('cart.cartTotals') }}</h3>
144
144
  <ul>
145
145
  <li class="d-flex justify-content-between">
146
- <span class="title">Subtotal</span>
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">Total</span>
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
- Proceed To Checkout
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
- export default {
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
- Change Password
20
+ {{ t('auth.changePassword') }}
21
21
  </NuxtLink>
22
22
  </li>
23
23
  </ul>
24
- <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit.</p>
24
+ <p>{{ t('auth.loginDescription') }}</p>
25
25
  <form>
26
26
  <div class="form-group mb-4">
27
- <label class="label">Old Password *</label>
27
+ <label class="label">{{ t('auth.oldPassword') }} *</label>
28
28
  <input
29
29
  type="password"
30
30
  class="form-control"
31
- placeholder="Enter your password"
31
+ :placeholder="t('auth.oldPassword')"
32
32
  />
33
33
  </div>
34
34
  <div class="form-group mb-4">
35
- <label class="label">New Password *</label>
35
+ <label class="label">{{ t('auth.newPassword') }} *</label>
36
36
  <input
37
37
  type="password"
38
38
  class="form-control"
39
- placeholder="Enter your password"
39
+ :placeholder="t('auth.newPassword')"
40
40
  />
41
41
  </div>
42
42
  <div class="form-group mb-4">
43
- <label class="label">Confirm Password *</label>
43
+ <label class="label">{{ t('auth.confirmPassword') }} *</label>
44
44
  <input
45
45
  type="password"
46
46
  class="form-control"
47
- placeholder="Enter your password"
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
- Save Password
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
- export default {
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>Billing Details</h3>
7
+ <h3>{{ t('checkout.billingDetails') }}</h3>
8
8
  <div class="form-group mb-4">
9
- <label class="label">First Name</label>
9
+ <label class="label">{{ t('checkout.firstName') }}</label>
10
10
  <input
11
11
  type="text"
12
12
  class="form-control"
13
- placeholder="First Name"
13
+ :placeholder="t('checkout.firstName')"
14
14
  />
15
15
  </div>
16
16
  <div class="form-group mb-4">
17
- <label class="label">Last Name</label>
18
- <input type="text" class="form-control" placeholder="Last Name" />
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">Email Address</label>
21
+ <label class="label">{{ t('checkout.emailAddress') }}</label>
22
22
  <input
23
23
  type="email"
24
24
  class="form-control"
25
- placeholder="Email Address"
25
+ :placeholder="t('checkout.emailAddress')"
26
26
  />
27
27
  </div>
28
28
  <div class="form-group mb-4">
29
- <label class="label">Company Name</label>
29
+ <label class="label">{{ t('checkout.companyName') }}</label>
30
30
  <input
31
31
  type="text"
32
32
  class="form-control"
33
- placeholder="Company Name (Optional)"
33
+ :placeholder="t('checkout.companyName')"
34
34
  />
35
35
  </div>
36
36
  <div class="form-group mb-4">
37
- <label class="label">Country/Region</label>
37
+ <label class="label">{{ t('checkout.countryRegion') }}</label>
38
38
  <input
39
39
  type="text"
40
40
  class="form-control"
41
- placeholder="Company Name (Optional)"
41
+ :placeholder="t('checkout.countryRegion')"
42
42
  />
43
43
  </div>
44
44
  <div class="form-group mb-4">
45
- <label class="label">Finding Source</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">Street Address</label>
56
+ <label class="label">{{ t('checkout.streetAddress') }}</label>
57
57
  <input
58
58
  type="text"
59
59
  class="form-control"
60
- placeholder="Address line 1"
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="Address line 2"
67
+ :placeholder="t('checkout.addressLine2')"
68
68
  />
69
69
  </div>
70
70
  <div class="form-group mb-4">
71
- <label class="label">Town/City</label>
72
- <input type="text" class="form-control" placeholder="Town/City" />
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">Postal Code</label>
75
+ <label class="label">{{ t('checkout.postalCode') }}</label>
76
76
  <input
77
77
  type="text"
78
78
  class="form-control"
79
- placeholder="Postal Code"
79
+ :placeholder="t('checkout.postalCode')"
80
80
  />
81
81
  </div>
82
82
  <div class="form-group mb-4">
83
- <label class="label">Phone</label>
84
- <input type="text" class="form-control" placeholder="Phone" />
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">Additional Info</label>
87
+ <label class="label">{{ t('checkout.additionalInfo') }}</label>
88
88
  <textarea
89
89
  class="form-control"
90
- placeholder="Notes (Optional)"
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>Your Order</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">Product</th>
107
- <th scope="col">Quantity</th>
108
- <th scope="col">Subtotal</th>
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">Subtotal</td>
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">Total</td>
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>Payment Option</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
- Card Payment
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
- Cash on Delivery
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">Place Order</button>
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
- export default {
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>Navigation</h3>
4
+ <h3>{{ t('account.navigation') }}</h3>
5
5
  </li>
6
6
  <li>
7
- <NuxtLink to="/dashboard">Dashboard</NuxtLink>
7
+ <NuxtLink to="/dashboard">{{ t('account.dashboard') }}</NuxtLink>
8
8
  </li>
9
9
  <li>
10
- <NuxtLink to="/edit-profile">Edit Profile</NuxtLink>
10
+ <NuxtLink to="/edit-profile">{{ t('account.editProfile') }}</NuxtLink>
11
11
  </li>
12
12
  <li>
13
- <NuxtLink to="/edit-address">Edit Address</NuxtLink>
13
+ <NuxtLink to="/edit-address">{{ t('account.editAddress') }}</NuxtLink>
14
14
  </li>
15
15
  <li>
16
- <NuxtLink to="/order-history">Order History</NuxtLink>
16
+ <NuxtLink to="/order-history">{{ t('account.orderHistory') }}</NuxtLink>
17
17
  </li>
18
18
  <li>
19
- <NuxtLink to="/order-details">Order Details</NuxtLink>
19
+ <NuxtLink to="/order-details">{{ t('account.orderDetails') }}</NuxtLink>
20
20
  </li>
21
21
  <li>
22
- <NuxtLink to="/address">Address</NuxtLink>
22
+ <NuxtLink to="/address">{{ t('account.address') }}</NuxtLink>
23
23
  </li>
24
24
  <li>
25
- <NuxtLink to="/password">Password</NuxtLink>
25
+ <NuxtLink to="/password">{{ t('auth.changePassword') }}</NuxtLink>
26
26
  </li>
27
27
  <li>
28
- <NuxtLink to="/my-account">Log Out</NuxtLink>
28
+ <NuxtLink to="/my-account">{{ t('auth.logOut') }}</NuxtLink>
29
29
  </li>
30
30
  </ul>
31
31
  </template>
32
32
 
33
- <script>
34
- export default {
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">Home</NuxtLink>
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
- export default {
25
- name: "PageBanner",
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 ? 'In cart' : 'Add to cart'"
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 { defineComponent, computed } from "vue";
53
+ <script setup lang="ts">
54
+ import { computed } from "vue";
55
55
  import { resolveImageUrl } from "~/utils/image";
56
56
 
57
- export default defineComponent({
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
- const productImage = computed(() => {
69
- const images = props.product.images;
70
- if (images && images.length > 0) {
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
- const effectivePrice = computed(() =>
81
- hasDiscount.value ? props.product.discountPrice : props.product.price
82
- );
63
+ const { addToCart, isInCart } = useCart();
83
64
 
84
- const discountPercent = computed(() => {
85
- if (!hasDiscount.value) return 0;
86
- return Math.round(((props.product.price - props.product.discountPrice) / props.product.price) * 100);
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
- const inCart = computed(() => isInCart(props.product.id));
73
+ const hasDiscount = computed(() =>
74
+ props.product.discountPrice && props.product.discountPrice < props.product.price
75
+ );
90
76
 
91
- const handleAddToCart = () => {
92
- if (!inCart.value) {
93
- addToCart({
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
- return {
104
- productImage,
105
- hasDiscount,
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>Fast Delivery</h3>
12
- <span>Experience Lightning-Fast Delivery</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>Secured Payment</h3>
23
- <span>Shop with Confidence</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>Money Back</h3>
34
- <span>100% Money-Back Guarantee</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>24/7 Support</h3>
45
- <span>Always Here for You</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
- export default {
56
- name: "Services",
57
- };
54
+ <script setup lang="ts">
55
+ const { t } = useI18n();
58
56
  </script>