@live-change/user-frontend 0.8.75 → 0.8.76

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.
@@ -15,7 +15,7 @@
15
15
  <InputText id="email" type="text" class="w-full"
16
16
  aria-describedby="email-help" :class="{ 'p-invalid': data.emailError}"
17
17
  v-model="data.email" />
18
- <small v-if="data.emailError" id="email-help" class="p-error">{{ data.emailError }}</small>
18
+ <small v-if="data.emailError" id="email-help" class="p-error">{{ t(`errors.${data.emailError}`) }}</small>
19
19
  </div>
20
20
 
21
21
  <Button label="Add Email" icon="pi pi-envelope" class="w-full" type="submit" />
@@ -45,6 +45,9 @@
45
45
  import { useRouter } from 'vue-router'
46
46
  const router = useRouter()
47
47
 
48
+ import { useI18n } from 'vue-i18n'
49
+ const { t } = useI18n()
50
+
48
51
  function handleSent({ parameters, result }) {
49
52
  const { authentication } = result
50
53
  router.push({
@@ -15,7 +15,7 @@
15
15
  <PhoneInput id="phone" class="w-full"
16
16
  aria-describedby="phone-help" :class="{ 'p-invalid': data.phoneError }"
17
17
  v-model="data.phone" />
18
- <small v-if="data.phoneError" id="phone-help" class="p-error">{{ data.phoneError }}</small>
18
+ <small v-if="data.phoneError" id="phone-help" class="p-error">{{ t(`errors.${data.phoneError}`) }}</small>
19
19
  </div>
20
20
 
21
21
  <Button label="Add Phone" icon="pi pi-mobile" class="w-full" type="submit" />
@@ -43,6 +43,9 @@
43
43
  import Divider from "primevue/divider"
44
44
  import PhoneInput from "../phone/PhoneInput.vue"
45
45
 
46
+ import { useI18n } from 'vue-i18n'
47
+ const { t } = useI18n()
48
+
46
49
  import { useRouter } from 'vue-router'
47
50
  const router = useRouter()
48
51
 
@@ -22,7 +22,7 @@
22
22
  <InputText type="text" v-model="data.name"
23
23
  :class="{ 'p-invalid': data.nameError }"
24
24
  class="p-inputtext-lg" placeholder="Your name" />
25
- <small id="currentPassword-help" class="p-error">{{ data.nameError }}</small>
25
+ <small v-if="data.nameError" id="currentPassword-help" class="p-error">{{ t(`errors.${data.nameError}`) }}</small>
26
26
  </div>
27
27
  <Button type="submit" label="Save name" class="mt-3" icon="pi pi-save" />
28
28
  </command-form>
@@ -44,6 +44,9 @@
44
44
  import { shallowRef, ref, inject, computed } from 'vue'
45
45
  import { path, live, actions, api as useApi } from '@live-change/vue3-ssr'
46
46
 
47
+ import { useI18n } from 'vue-i18n'
48
+ const { t } = useI18n()
49
+
47
50
  import { useToast } from 'primevue/usetoast'
48
51
  import { useConfirm } from 'primevue/useconfirm'
49
52
  const confirm = useConfirm()
@@ -24,7 +24,7 @@
24
24
  :filter="availableLocales.length > 10"
25
25
  placeholder="Auto-detect"
26
26
  class="w-full" />
27
- <small v-if="data.languageError" id="language-help" class="p-error">{{ data.languageError }}</small>
27
+ <small v-if="data.languageError" id="language-help" class="p-error">{{ t(`errors.${data.languageError}`) }}</small>
28
28
  </div>
29
29
 
30
30
  <Button type="submit" label="Apply" class="mt-1" icon="pi pi-save" />
@@ -19,7 +19,7 @@
19
19
  <InputMask id="code" class="p-inputtext-lg" mask="999999" slotChar="######" placeholder="Enter code"
20
20
  v-model="data.secret"
21
21
  aria-describedby="code-help" :class="{ 'p-invalid': data.secretError }" />
22
- <span v-if="data.secretError" id="code-help" class="p-error">{{ data.secretError }}</span>
22
+ <span v-if="data.secretError" id="code-help" class="p-error">{{ t(`errors.${data.secretError}`) }}</span>
23
23
  </div>
24
24
  <div class="flex flex-column">
25
25
  <Button label="OK" type="submit" class="p-button-lg flex-grow-0"></Button>
@@ -46,6 +46,9 @@
46
46
 
47
47
  const router = useRouter()
48
48
 
49
+ import { useI18n } from 'vue-i18n'
50
+ const { t } = useI18n()
51
+
49
52
  const { authentication } = defineProps({
50
53
  authentication: {
51
54
  type: String,
@@ -20,7 +20,7 @@
20
20
  toggle-mask v-model:masked="masked"
21
21
  :class="{ 'p-invalid': data.currentPasswordHashError }"
22
22
  v-model="data.currentPasswordHash" />
23
- <small id="currentPassword-help" class="p-error">{{ data.currentPasswordHashError }}</small>
23
+ <small v-if="data.currentPasswordHashError" id="currentPassword-help" class="p-error">{{ t(`errors.${data.currentPasswordHashError}`) }}</small>
24
24
  </div>
25
25
 
26
26
  <div class="p-field mb-3">
@@ -40,7 +40,7 @@
40
40
  </ul>
41
41
  </template>
42
42
  </Password>
43
- <small id="newPassword-help" class="p-error">{{ data.passwordHashError }}</small>
43
+ <small v-if="data.passwordHashError" id="newPassword-help" class="p-error">{{ t(`errors.${data.passwordHashError}`) }}</small>
44
44
  </div>
45
45
 
46
46
  <div class="p-field mb-3">
@@ -75,6 +75,9 @@
75
75
  import { useRouter } from 'vue-router'
76
76
  const router = useRouter()
77
77
 
78
+ import { useI18n } from 'vue-i18n'
79
+ const { t } = useI18n()
80
+
78
81
  const isMounted = ref(false)
79
82
  onMounted(() => isMounted.value = true)
80
83
 
@@ -87,7 +90,7 @@
87
90
  form.value.addValidator('passwordHash', () => {
88
91
  const value = form.value.getFieldValue('passwordHash')
89
92
  console.log("PASSWORDS MATCH?", secondPassword.value, value)
90
- if(value != secondPassword.value) return "passwordsNotMatch"
93
+ if(value !== secondPassword.value) return "passwordsNotMatch"
91
94
  })
92
95
  })
93
96
 
@@ -15,7 +15,7 @@
15
15
  <InputText id="email" type="text" class="w-full"
16
16
  v-model="data.email" :class="{ 'p-invalid': data.emailError }"
17
17
  aria-describedby="email-help" />
18
- <small id="email-help" class="p-error">{{ data.emailError }}</small>
18
+ <small v-if="data.emailError" id="email-help" class="p-error">{{ t(`errors.${data.emailError}`) }}</small>
19
19
  </div>
20
20
 
21
21
  <Button type="submit" label="Reset password" icon="pi pi-key" class="w-full"></Button>
@@ -36,6 +36,9 @@
36
36
  import { useRouter } from 'vue-router'
37
37
  const router = useRouter()
38
38
 
39
+ import { useI18n } from 'vue-i18n'
40
+ const { t } = useI18n()
41
+
39
42
  function handleDone({ parameters, result }) {
40
43
  console.log("DONE RESULT", result)
41
44
  const { authentication } = result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.75",
3
+ "version": "0.8.76",
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.75",
26
- "@live-change/dao": "^0.8.75",
27
- "@live-change/dao-vue3": "^0.8.75",
28
- "@live-change/dao-websocket": "^0.8.75",
29
- "@live-change/email-service": "^0.8.75",
30
- "@live-change/framework": "^0.8.75",
31
- "@live-change/identicon-service": "^0.8.75",
32
- "@live-change/image-frontend": "^0.8.75",
33
- "@live-change/message-authentication-service": "^0.8.75",
34
- "@live-change/notification-service": "^0.8.75",
35
- "@live-change/password-authentication-service": "^0.8.75",
36
- "@live-change/pattern": "^0.8.75",
37
- "@live-change/secret-code-service": "^0.8.75",
38
- "@live-change/secret-link-service": "^0.8.75",
39
- "@live-change/security-frontend": "^0.8.75",
40
- "@live-change/security-service": "^0.8.75",
41
- "@live-change/session-service": "^0.8.75",
42
- "@live-change/timer-service": "^0.8.75",
43
- "@live-change/upload-service": "^0.8.75",
44
- "@live-change/user-identification-service": "^0.8.75",
45
- "@live-change/user-service": "^0.8.75",
46
- "@live-change/vue3-components": "^0.8.75",
47
- "@live-change/vue3-ssr": "^0.8.75",
25
+ "@live-change/cli": "^0.8.76",
26
+ "@live-change/dao": "^0.8.76",
27
+ "@live-change/dao-vue3": "^0.8.76",
28
+ "@live-change/dao-websocket": "^0.8.76",
29
+ "@live-change/email-service": "^0.8.76",
30
+ "@live-change/framework": "^0.8.76",
31
+ "@live-change/identicon-service": "^0.8.76",
32
+ "@live-change/image-frontend": "^0.8.76",
33
+ "@live-change/message-authentication-service": "^0.8.76",
34
+ "@live-change/notification-service": "^0.8.76",
35
+ "@live-change/password-authentication-service": "^0.8.76",
36
+ "@live-change/pattern": "^0.8.76",
37
+ "@live-change/secret-code-service": "^0.8.76",
38
+ "@live-change/secret-link-service": "^0.8.76",
39
+ "@live-change/security-frontend": "^0.8.76",
40
+ "@live-change/security-service": "^0.8.76",
41
+ "@live-change/session-service": "^0.8.76",
42
+ "@live-change/timer-service": "^0.8.76",
43
+ "@live-change/upload-service": "^0.8.76",
44
+ "@live-change/user-identification-service": "^0.8.76",
45
+ "@live-change/user-service": "^0.8.76",
46
+ "@live-change/vue3-components": "^0.8.76",
47
+ "@live-change/vue3-ssr": "^0.8.76",
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.75",
68
+ "@live-change/codeceptjs-helper": "^0.8.76",
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": "9380bbf47a2a9087840cc71afe5b3eace66fa6ab"
79
+ "gitHead": "70c9a5ffb257f57b77754027d9c543584ca3423b"
80
80
  }