@live-change/user-frontend 0.8.88 → 0.8.90

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.
@@ -1,4 +1,8 @@
1
1
  {
2
+ "errors": {
3
+ "emailTaken": "Email is already registered, try to sign-in.",
4
+ "phoneTaken": "Phone is already registered, try to sign-in."
5
+ },
2
6
  "app": {
3
7
  "updateAvailable": "Update available!",
4
8
  "newVersions": "New version of app is available!",
@@ -20,7 +20,9 @@
20
20
  <InputText id="email" type="text" class="w-full"
21
21
  aria-describedby="email-help" :class="{ 'p-invalid': data.emailError }"
22
22
  v-model="data.email" />
23
- <small id="email-help" class="p-error">{{ data.emailError }}</small>
23
+ <small v-if="data.emailError" id="email-help" class="p-error">
24
+ {{ t(`errors.${data.emailError}`) }}
25
+ </small>
24
26
  </div>
25
27
 
26
28
  <div class="p-field mb-3">
@@ -28,7 +30,9 @@
28
30
  <Password id="password" class="w-full" inputClass="w-full" toggleMask :feedback="false"
29
31
  aria-describedby="password-help" :class="{ 'p-invalid': data.passwordHashError }"
30
32
  v-model="data.passwordHash" />
31
- <small id="password-help" class="p-error">{{ data.passwordHashError }}</small>
33
+ <small v-if="data.passwordHashError" id="password-help" class="p-error">
34
+ {{ t(`errors.${data.passwordHashError}`) }}
35
+ </small>
32
36
  </div>
33
37
 
34
38
  <div class="flex align-items-center justify-content-between mb-6">
@@ -87,6 +91,9 @@
87
91
  import { useRouter } from 'vue-router'
88
92
  const router = useRouter()
89
93
 
94
+ import { useI18n } from 'vue-i18n'
95
+ const { t } = useI18n()
96
+
90
97
  function handleDone({ parameters, result }) {
91
98
  console.log("DONE RESULT", result)
92
99
  if(result.type === 'sent') {
@@ -19,7 +19,9 @@
19
19
  <InputText id="email" type="text" class="w-full"
20
20
  aria-describedby="email-help" :class="{ 'p-invalid': data.emailError}"
21
21
  v-model="data.email" />
22
- <small v-if="data.emailError" id="email-help" class="p-error">{{ data.emailError }}</small>
22
+ <small v-if="data.emailError" id="email-help" class="p-error">
23
+ {{ t(`errors.${data.emailError}`) }}
24
+ </small>
23
25
  </div>
24
26
 
25
27
  <Button label="Sign Up with email" icon="pi pi-user" class="w-full" type="submit" />
@@ -51,6 +53,9 @@
51
53
  import { useRouter } from 'vue-router'
52
54
  const router = useRouter()
53
55
 
56
+ import { useI18n } from 'vue-i18n'
57
+ const { t } = useI18n()
58
+
54
59
  function handleSent({ parameters, result }) {
55
60
  const { authentication } = result
56
61
  router.push({
package/index.js CHANGED
@@ -20,3 +20,8 @@ export { GoogleAccess }
20
20
  export * from './front/src/connected/connected.js'
21
21
 
22
22
  export * from "./front/src/router.js"
23
+
24
+ import en from "./front/locales/en.json"
25
+ const locales = { en }
26
+ export { locales }
27
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.88",
3
+ "version": "0.8.90",
4
4
  "scripts": {
5
5
  "memDev": "node --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
@@ -22,29 +22,29 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/cli": "^0.8.88",
26
- "@live-change/dao": "^0.8.88",
27
- "@live-change/dao-vue3": "^0.8.88",
28
- "@live-change/dao-websocket": "^0.8.88",
29
- "@live-change/email-service": "^0.8.88",
30
- "@live-change/framework": "^0.8.88",
31
- "@live-change/identicon-service": "^0.8.88",
32
- "@live-change/image-frontend": "^0.8.88",
33
- "@live-change/message-authentication-service": "^0.8.88",
34
- "@live-change/notification-service": "^0.8.88",
35
- "@live-change/password-authentication-service": "^0.8.88",
36
- "@live-change/pattern": "^0.8.88",
37
- "@live-change/secret-code-service": "^0.8.88",
38
- "@live-change/secret-link-service": "^0.8.88",
39
- "@live-change/security-frontend": "^0.8.88",
40
- "@live-change/security-service": "^0.8.88",
41
- "@live-change/session-service": "^0.8.88",
42
- "@live-change/timer-service": "^0.8.88",
43
- "@live-change/upload-service": "^0.8.88",
44
- "@live-change/user-identification-service": "^0.8.88",
45
- "@live-change/user-service": "^0.8.88",
46
- "@live-change/vue3-components": "^0.8.88",
47
- "@live-change/vue3-ssr": "^0.8.88",
25
+ "@live-change/cli": "^0.8.90",
26
+ "@live-change/dao": "^0.8.90",
27
+ "@live-change/dao-vue3": "^0.8.90",
28
+ "@live-change/dao-websocket": "^0.8.90",
29
+ "@live-change/email-service": "^0.8.90",
30
+ "@live-change/framework": "^0.8.90",
31
+ "@live-change/identicon-service": "^0.8.90",
32
+ "@live-change/image-frontend": "^0.8.90",
33
+ "@live-change/message-authentication-service": "^0.8.90",
34
+ "@live-change/notification-service": "^0.8.90",
35
+ "@live-change/password-authentication-service": "^0.8.90",
36
+ "@live-change/pattern": "^0.8.90",
37
+ "@live-change/secret-code-service": "^0.8.90",
38
+ "@live-change/secret-link-service": "^0.8.90",
39
+ "@live-change/security-frontend": "^0.8.90",
40
+ "@live-change/security-service": "^0.8.90",
41
+ "@live-change/session-service": "^0.8.90",
42
+ "@live-change/timer-service": "^0.8.90",
43
+ "@live-change/upload-service": "^0.8.90",
44
+ "@live-change/user-identification-service": "^0.8.90",
45
+ "@live-change/user-service": "^0.8.90",
46
+ "@live-change/vue3-components": "^0.8.90",
47
+ "@live-change/vue3-ssr": "^0.8.90",
48
48
  "@vueuse/core": "^10.11.0",
49
49
  "codeceptjs-assert": "^0.0.5",
50
50
  "codeceptjs-video-helper": "0.1.3",
@@ -65,7 +65,7 @@
65
65
  "wtfnode": "^0.9.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@live-change/codeceptjs-helper": "^0.8.88",
68
+ "@live-change/codeceptjs-helper": "^0.8.90",
69
69
  "codeceptjs": "^3.6.5",
70
70
  "generate-password": "1.7.1",
71
71
  "playwright": "^1.41.2",
@@ -76,5 +76,5 @@
76
76
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
77
77
  "license": "BSD-3-Clause",
78
78
  "description": "",
79
- "gitHead": "f80b7c8bf00dc6cc41124fa402edebc7b596e83c"
79
+ "gitHead": "745223326ab078f2155434fe684611fc1398df9d"
80
80
  }