@designcrowd/fe-shared-lib 1.0.8-ml-82-20 → 1.0.8-ml-82-22
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
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
</a>
|
|
12
12
|
</span>
|
|
13
13
|
<span v-if="isPartnerTheme"> and BrandCrowd's </span>
|
|
14
|
-
<span v-else>{{ termsAndConditionsContent?.byProceeding }}</span>
|
|
14
|
+
<span v-else>{{ termsAndConditionsContent?.byProceeding }} </span>
|
|
15
15
|
<a :href="termsOfUseUrl" target="_blank" class="tw-text-info-500" :class="{ 'hover:tw-underline': isDesignCom }"
|
|
16
16
|
>{{ termsAndConditionsContent?.termsOfUse }}</a
|
|
17
|
-
>
|
|
18
|
-
{{ termsAndConditionsContent?.and }}
|
|
17
|
+
>
|
|
18
|
+
<span> {{ termsAndConditionsContent?.and }} </span>
|
|
19
19
|
<a :href="privacyPolicyUrl" target="_blank" class="tw-text-info-500" :class="{ 'hover:tw-underline': isDesignCom }"
|
|
20
20
|
>{{ termsAndConditionsContent?.privacyPolicy }}</a
|
|
21
21
|
>
|
|
22
|
-
<span>{{ termsAndConditionsContent?.agreeToFutureUpdates }} {{ isDesignCom ? 'Design.com' : 'BrandCrowd' }}.</span>
|
|
22
|
+
<span> {{ termsAndConditionsContent?.agreeToFutureUpdates }} {{ isDesignCom ? 'Design.com' : 'BrandCrowd' }}.</span>
|
|
23
23
|
</p>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
>
|
|
152
152
|
<p>
|
|
153
153
|
{{ getSignUpText }}
|
|
154
|
-
<a :href="
|
|
154
|
+
<a :href="signUpHref" target="_blank" class="tw-text-info-500" :class="{ 'hover:tw-underline': isDesignCom }">{{
|
|
155
155
|
signUpLabel
|
|
156
156
|
}}</a>
|
|
157
157
|
</p>
|
|
@@ -340,13 +340,30 @@ export default {
|
|
|
340
340
|
required: false,
|
|
341
341
|
default: undefined,
|
|
342
342
|
},
|
|
343
|
+
invalidUsernameErrorLabel: {
|
|
344
|
+
type: String,
|
|
345
|
+
required: false,
|
|
346
|
+
default: 'Please enter a valid email address',
|
|
347
|
+
},
|
|
348
|
+
missingPasswordErrorLabel: {
|
|
349
|
+
type: String,
|
|
350
|
+
required: false,
|
|
351
|
+
default: 'Please enter a password',
|
|
352
|
+
},
|
|
343
353
|
},
|
|
344
354
|
data() {
|
|
355
|
+
const signUpHref =
|
|
356
|
+
typeof window === 'undefined' ? null : new URL(`https://${window.location.host}${this.signUpUrl}`);
|
|
357
|
+
if (this.aUserName) {
|
|
358
|
+
signUpHref.searchParams.append('initialUserName', this.aUserName);
|
|
359
|
+
}
|
|
360
|
+
|
|
345
361
|
return {
|
|
346
362
|
aUserName: this.initialUserName,
|
|
347
363
|
password: undefined,
|
|
348
364
|
userNameError: undefined,
|
|
349
365
|
passwordError: undefined,
|
|
366
|
+
signUpHref,
|
|
350
367
|
};
|
|
351
368
|
},
|
|
352
369
|
computed: {
|
|
@@ -413,13 +430,13 @@ export default {
|
|
|
413
430
|
validate(e) {
|
|
414
431
|
this.clearErrorMessages();
|
|
415
432
|
if (!this.aUserName || !isValidEmail(this.aUserName)) {
|
|
416
|
-
this.userNameError =
|
|
433
|
+
this.userNameError = this.invalidUsernameErrorLabel;
|
|
417
434
|
e.preventDefault();
|
|
418
435
|
return false;
|
|
419
436
|
}
|
|
420
437
|
|
|
421
438
|
if (this.capturePassword && !this.password) {
|
|
422
|
-
this.passwordError =
|
|
439
|
+
this.passwordError = this.missingPasswordErrorLabel;
|
|
423
440
|
e.preventDefault();
|
|
424
441
|
return false;
|
|
425
442
|
}
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
class="tw-w-full tw-border-0 tw-border-t tw-border-solid tw-border-grayscale-400 tw-text-center tw-pt-6 tw-pb-8 tw-text-grayscale-600"
|
|
102
102
|
>
|
|
103
103
|
{{ alreadyHaveAnAccountLabel }}
|
|
104
|
-
<a :href="
|
|
104
|
+
<a :href="signInHref" target="_blank" class="tw-text-info-500">{{ loginLabel }}</a>
|
|
105
105
|
</p>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
@@ -225,14 +225,31 @@ export default {
|
|
|
225
225
|
required: false,
|
|
226
226
|
default: undefined,
|
|
227
227
|
},
|
|
228
|
+
invalidUsernameErrorLabel: {
|
|
229
|
+
type: String,
|
|
230
|
+
required: false,
|
|
231
|
+
default: 'Please enter a valid email address',
|
|
232
|
+
},
|
|
233
|
+
missingPasswordErrorLabel: {
|
|
234
|
+
type: String,
|
|
235
|
+
required: false,
|
|
236
|
+
default: 'Please enter a password',
|
|
237
|
+
},
|
|
228
238
|
},
|
|
229
239
|
data() {
|
|
240
|
+
const signInHref =
|
|
241
|
+
typeof window === 'undefined' ? null : new URL(`https://${window.location.host}${this.signInUrl}`);
|
|
242
|
+
if (this.aUserName) {
|
|
243
|
+
signInHref.searchParams.append('initialUserName', this.aUserName);
|
|
244
|
+
}
|
|
245
|
+
|
|
230
246
|
return {
|
|
231
247
|
isLoading: false,
|
|
232
248
|
aUserName: this.initialUserName,
|
|
233
249
|
password: null,
|
|
234
250
|
passwordError: undefined,
|
|
235
251
|
userNameError: null,
|
|
252
|
+
signInHref,
|
|
236
253
|
};
|
|
237
254
|
},
|
|
238
255
|
computed: {
|
|
@@ -272,10 +289,10 @@ export default {
|
|
|
272
289
|
this.passwordError = undefined;
|
|
273
290
|
|
|
274
291
|
if (!this.aUserName) {
|
|
275
|
-
this.userNameError =
|
|
292
|
+
this.userNameError = this.invalidUsernameErrorLabel;
|
|
276
293
|
}
|
|
277
294
|
if (!this.password) {
|
|
278
|
-
this.passwordError =
|
|
295
|
+
this.passwordError = this.missingPasswordErrorLabel;
|
|
279
296
|
}
|
|
280
297
|
|
|
281
298
|
e.preventDefault();
|