@lancom/shared 0.0.144 → 0.0.147
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/assets/js/utils/colors.js +3 -3
- package/components/order/order_view/order-view.mixin.js +3 -0
- package/components/order/order_view/order-view.vue +6 -1
- package/components/product/product_color_image/product-color-image.vue +2 -6
- package/nuxt.config.js +1 -1
- package/package.json +1 -1
- package/plugins/vue-recaptcha.js +12 -0
|
@@ -47,13 +47,13 @@ export const getProductMediumCover = (product, type, color) => getProductCover(p
|
|
|
47
47
|
export const getProductLargeCover = (product, type, color) => getProductCover(product, 'large', type, color);
|
|
48
48
|
export const getProductOriginCover = (product, type, color) => getProductCover(product, 'origin', type, color);
|
|
49
49
|
|
|
50
|
-
export function getColorBackgroundStyle(color
|
|
50
|
+
export function getColorBackgroundStyle(color) {
|
|
51
51
|
const { rgb, pattern, name } = color || {};
|
|
52
52
|
|
|
53
53
|
if (pattern) {
|
|
54
|
-
return
|
|
54
|
+
return {
|
|
55
55
|
'background-image': `url("${pattern}")`
|
|
56
|
-
}
|
|
56
|
+
};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
return {
|
|
@@ -136,11 +136,16 @@
|
|
|
136
136
|
Shipping Total: <b>{{ model.shippingTotal | price }}</b>
|
|
137
137
|
</div>
|
|
138
138
|
<div class="lc_regular16">
|
|
139
|
-
Total ex GST: <b>{{ model.total | price }}</b>
|
|
139
|
+
Total ex GST: <b>{{ (model.total + couponTotal) | price }}</b>
|
|
140
140
|
</div>
|
|
141
141
|
<div class="lc_regular16">
|
|
142
142
|
GST: <b>{{ model.totalGST - model.total | price }}</b>
|
|
143
143
|
</div>
|
|
144
|
+
<div
|
|
145
|
+
v-if="!invoice && order.couponCode"
|
|
146
|
+
class="lc_regular16">
|
|
147
|
+
Coupon: <b>{{ couponTotal | price }}</b>
|
|
148
|
+
</div>
|
|
144
149
|
<div class="lc_regular16">
|
|
145
150
|
Total inc GST: <b>{{ model.totalGST | price }}</b>
|
|
146
151
|
</div>
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="ProductColorImage"
|
|
4
4
|
:class="{ zoomedIn }"
|
|
5
|
-
:style="style"
|
|
6
|
-
v-lazy:background-image="pattern">
|
|
5
|
+
:style="style">
|
|
7
6
|
</div>
|
|
8
7
|
</template>
|
|
9
8
|
|
|
@@ -23,11 +22,8 @@ export default {
|
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
24
|
computed: {
|
|
26
|
-
pattern() {
|
|
27
|
-
return this.color.pattern;
|
|
28
|
-
},
|
|
29
25
|
style() {
|
|
30
|
-
return getColorBackgroundStyle(this.color
|
|
26
|
+
return getColorBackgroundStyle(this.color);
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
29
|
};
|
package/nuxt.config.js
CHANGED
|
@@ -45,7 +45,7 @@ module.exports = (config, axios, { raygunClient } = {}) => ({
|
|
|
45
45
|
'@/node_modules/@lancom/shared/plugins/vee-validate',
|
|
46
46
|
{ src: '@/node_modules/@lancom/shared/plugins/vue-toastr', ssr: false },
|
|
47
47
|
{ src: '@/node_modules/@lancom/shared/plugins/vue-hummer', ssr: false },
|
|
48
|
-
'@/node_modules/@lancom/shared/plugins/vue-multiselect',
|
|
48
|
+
// '@/node_modules/@lancom/shared/plugins/vue-multiselect',
|
|
49
49
|
'@/node_modules/@lancom/shared/plugins/vue-tooltip',
|
|
50
50
|
{ src: '@/node_modules/@lancom/shared/plugins/lazy', ssr: false },
|
|
51
51
|
'@/node_modules/@lancom/shared/plugins/vue-click-outside',
|
package/package.json
CHANGED
package/plugins/vue-recaptcha.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
|
|
3
|
+
let interval = null;
|
|
4
|
+
|
|
3
5
|
export default () => {
|
|
4
6
|
Vue.mixin({
|
|
5
7
|
methods: {
|
|
@@ -9,7 +11,17 @@ export default () => {
|
|
|
9
11
|
},
|
|
10
12
|
async preloadReCaptcha() {
|
|
11
13
|
if (!this.$recaptcha) {
|
|
14
|
+
clearInterval(interval);
|
|
12
15
|
await this.loadReCaptcha();
|
|
16
|
+
await new Promise((resolve, reject) => {
|
|
17
|
+
interval = setInterval(() => {
|
|
18
|
+
console.log('check recaptcha...');
|
|
19
|
+
if (this.$recaptcha) {
|
|
20
|
+
clearInterval(interval);
|
|
21
|
+
resolve()
|
|
22
|
+
}
|
|
23
|
+
}, 100);
|
|
24
|
+
});
|
|
13
25
|
}
|
|
14
26
|
},
|
|
15
27
|
async loadReCaptcha() {
|