@designcrowd/fe-shared-lib 1.0.8-ml-82-1d → 1.0.8-ml-i18n-1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.0.8-ml-82-1d",
3
+ "version": "1.0.8-ml-i18n-1",
4
4
  "scripts": {
5
5
  "start": "npm run storybook",
6
6
  "build": "npm run build:css --production",
@@ -17,6 +17,7 @@
17
17
  "docker:publish": "docker build . --build-arg NPM_TOKEN=$NPM_TOKEN"
18
18
  },
19
19
  "dependencies": {
20
+ "@nuxtjs/i18n": "^9.2.1",
20
21
  "autoprefixer": "10.4.17",
21
22
  "axios": "1.6.7",
22
23
  "core-js": "3.35.1",
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <p class="tw-text-center tw-text-sm tw-mt-4 tw-mb-2 tw-text-grayscale-600">
2
+ <div v-if="hasTermsAndConditionsSlot && !isPartnerTheme">
3
+ <slot name="termsAndConditions" />
4
+ </div>
5
+ <p v-else class="tw-text-center tw-text-sm tw-mt-4 tw-mb-2 tw-text-grayscale-600">
3
6
  <span v-if="isPartnerTheme">
4
7
  {{ legal.BY_PROCEEDING_TEXT[theme] }}
5
8
  <a :href="termsAndConditionsLink" target="_blank" :class="legal.LINK_CLASSES[theme]">
@@ -11,15 +14,17 @@
11
14
  </a>
12
15
  </span>
13
16
  <span v-if="isPartnerTheme"> and BrandCrowd's </span>
14
- <span v-else>{{ termsAndConditionsContent?.byProceeding }} </span>
17
+ <span v-else>By proceeding you accept our </span>
15
18
  <a :href="termsOfUseUrl" target="_blank" class="tw-text-info-500" :class="{ 'hover:tw-underline': isDesignCom }"
16
- >{{ termsAndConditionsContent?.termsOfUse }}</a
17
- >
18
- <span> {{ termsAndConditionsContent?.and }} </span>
19
+ >Terms of Use</a
20
+ >
21
+ and
19
22
  <a :href="privacyPolicyUrl" target="_blank" class="tw-text-info-500" :class="{ 'hover:tw-underline': isDesignCom }"
20
- >{{ termsAndConditionsContent?.privacyPolicy }}</a
23
+ >Privacy Policy</a
24
+ >
25
+ <span>
26
+ and agree to receive future updates from {{ isDesignCom ? 'Design.com' : 'BrandCrowd' }}.</span
21
27
  >
22
- <span> {{ termsAndConditionsContent?.agreeToFutureUpdates }} {{ isDesignCom ? 'Design.com' : 'BrandCrowd' }}.</span>
23
28
  </p>
24
29
  </template>
25
30
 
@@ -51,6 +56,11 @@ export default {
51
56
  data() {
52
57
  return {
53
58
  legal: LEGAL,
59
+ termsAndConditionsLabel:
60
+ this.termsAndConditions?.label ??
61
+ 'By proceeding you accept our {termsOfUseLabel} and {privacyPolicyLabel} and agree to receive future updates from',
62
+ termsOfUseLabel: this.termsAndConditions?.termsOfUseLabel ?? 'Terms of Use',
63
+ privacyPolicyLabel: this.termsAndConditions?.privacyPolicyLabel ?? 'Privacy Policy',
54
64
  };
55
65
  },
56
66
  computed: {
@@ -66,15 +76,9 @@ export default {
66
76
  }
67
77
  return this.privacyPolicyUrl;
68
78
  },
69
- termsAndConditionsContent() {
70
- return {
71
- byProceeding: this.termsAndConditions?.byProceeding ? `${this.termsAndConditions?.byProceeding} ` : 'By proceeding you accept our ',
72
- termsOfUse: this.termsAndConditions?.termsOfUse ?? 'Terms of Use',
73
- and: this.termsAndConditions?.and ? ` ${this.termsAndConditions?.and} ` : ' and ',
74
- privacyPolicy: this.termsAndConditions?.privacyPolicy ?? 'Privacy Policy',
75
- agreeToFutureUpdates: this.termsAndConditions?.agreeToFutureUpdates ? ` ${this.termsAndConditions?.agreeToFutureUpdates}` : ' and agree to receive future updates from'
76
- };
77
- },
79
+ hasTermsAndConditionsSlot() {
80
+ return !!this.$slots.termsAndConditions;
81
+ }
78
82
  },
79
83
  };
80
84
  </script>