@live-change/user-frontend 0.8.70 → 0.8.72

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.
@@ -18,16 +18,17 @@ export function getContactTypes(api = useApi()) {
18
18
  }
19
19
  }
20
20
  }
21
- //console.log('contactType', contactType, 'serviceName', serviceName, 'viewName', viewName)
21
+ console.log('contactType', contactType, 'serviceName', serviceName, 'viewName', viewName)
22
22
  console.log(`path[${serviceName}][${viewName}] =`, path[serviceName][viewName])
23
+ const contactsPath = computed(() => path[serviceName][viewName] && path[serviceName][viewName]({}))
23
24
  return {
24
25
  contactType,
25
26
  serviceName,
26
27
  viewName,
27
- path: path[serviceName][viewName]({}),
28
+ path: contactsPath,
28
29
  contacts: null,
29
30
  async fetchContacts(context, onUnmountedCb){
30
- const contacts = await live(path[serviceName][viewName]({}), context, onUnmountedCb)
31
+ const contacts = await live(contactsPath, context, onUnmountedCb)
31
32
  this.contacts = contacts
32
33
  return contacts
33
34
  }
@@ -70,7 +71,7 @@ export async function getContacts(context, onUnmountedCb) {
70
71
  for(const contactType of contactsTypes) {
71
72
  await contactType.fetchContacts(context, onUnmountedCb)
72
73
  }
73
- const contacts = computed(() => contactsTypes.map((c,i) => c.contacts.value.map(v => ({
74
+ const contacts = computed(() => contactsTypes.map((c,i) => (c.contacts.value ?? []).map(v => ({
74
75
  contactType: c.contactType,
75
76
  serviceName: c.serviceName,
76
77
  ...(v)
@@ -100,9 +100,9 @@
100
100
  }
101
101
 
102
102
  const name = computed(() => userData.value?.name
103
- || (userData.value.firstName && userData.value.lastName
104
- ? userData.value.firstName + ' ' + userData.value.lastName
105
- : userData.value.firstName)
103
+ || ((userData.value?.firstName && userData.value?.lastName)
104
+ ? userData.value?.firstName + ' ' + userData.value?.lastName
105
+ : userData.value?.firstName)
106
106
  || props.anonymous
107
107
  || uniqueNamesGenerator(nameGeneratorConfig))
108
108
 
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="w-full lg:w-6 md:w-9" v-shared-element:form="{ duration: '300ms', includeChildren: true }">
3
- <div class="surface-card border-round shadow-2 p-4" v-if="authenticationData?.state == 'used' && !submitted">
3
+ <div class="surface-card border-round shadow-2 p-4" v-if="authenticationData?.state === 'used' && !submitted">
4
4
  <div class="text-900 font-medium mb-3 text-xl">Authentication done</div>
5
5
  <p class="mt-0 mb-1 p-0 line-height-3">You authenticated in a different tab.</p>
6
6
  </div>
7
7
  <div class="surface-card border-round shadow-2 p-4" v-else>
8
8
  <div class="text-900 font-medium mb-3 text-xl">Message sent</div>
9
- <p class="mt-0 mb-1 p-0 line-height-3">We sent special secret message to your email.</p>
9
+ <p class="mt-0 mb-1 p-0 line-height-3">We sent special secret message to the contact you already provided.</p>
10
10
  <p class="mt-0 mb-4 p-0 line-height-3">Click on the link or enter the code you found in that message.</p>
11
11
  <Secured :events="['wrong-secret-code']" :actions="['checkSecretCode']">
12
12
  <command-form service="messageAuthentication" action="finishMessageAuthentication"
@@ -25,7 +25,7 @@
25
25
  <Button label="OK" type="submit" class="p-button-lg flex-grow-0"></Button>
26
26
  </div>
27
27
  </div>
28
- <div v-if="data.secretError == 'codeExpired'">
28
+ <div v-if="data.secretError === 'codeExpired'">
29
29
  <p class="mt-0 mb-4 p-0 line-height-3">To send another code click button below.</p>
30
30
  <Button label="Resend" class="p-button-lg" @click="resend"></Button>
31
31
  </div>
@@ -93,7 +93,7 @@
93
93
  path().messageAuthentication.authentication({ authentication })
94
94
  )
95
95
  ])
96
- if(authenticationData?.value?.state == 'used') {
96
+ if(authenticationData?.value?.state === 'used') {
97
97
  router.push(authenticationData.value.targetPage)
98
98
  }
99
99
  </script>
@@ -25,17 +25,18 @@
25
25
 
26
26
  <div class="p-field mb-3">
27
27
  <label for="password" class="block text-900 font-medium mb-2">Password (optional)</label>
28
- <Password id="password" class="w-full" inputClass="w-full" toggleMask
28
+ <Password id="password" class="w-full" inputClass="w-full" toggleMask :feedback="false"
29
29
  aria-describedby="password-help" :class="{ 'p-invalid': data.passwordHashError }"
30
30
  v-model="data.passwordHash" />
31
31
  <small id="password-help" class="p-error">{{ data.passwordHashError }}</small>
32
32
  </div>
33
33
 
34
34
  <div class="flex align-items-center justify-content-between mb-6">
35
- <div class="flex align-items-center">
35
+ <div></div>
36
+ <!-- <div class="flex align-items-center">
36
37
  <Checkbox id="rememberme" :binary="true" class="mr-2" />
37
38
  <label for="rememberme">Remember me</label>
38
- </div>
39
+ </div>-->
39
40
  <router-link :to="{ name: 'user:resetPassword' }"
40
41
  class="font-medium no-underline ml-2 text-blue-500 text-right cursor-pointer">
41
42
  Forgot password?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.70",
3
+ "version": "0.8.72",
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.70",
26
- "@live-change/dao": "^0.8.70",
27
- "@live-change/dao-vue3": "^0.8.70",
28
- "@live-change/dao-websocket": "^0.8.70",
29
- "@live-change/email-service": "^0.8.70",
30
- "@live-change/framework": "^0.8.70",
31
- "@live-change/identicon-service": "^0.8.70",
32
- "@live-change/image-frontend": "^0.8.70",
33
- "@live-change/message-authentication-service": "^0.8.70",
34
- "@live-change/notification-service": "^0.8.70",
35
- "@live-change/password-authentication-service": "^0.8.70",
36
- "@live-change/pattern": "^0.8.70",
37
- "@live-change/secret-code-service": "^0.8.70",
38
- "@live-change/secret-link-service": "^0.8.70",
39
- "@live-change/security-frontend": "^0.8.70",
40
- "@live-change/security-service": "^0.8.70",
41
- "@live-change/session-service": "^0.8.70",
42
- "@live-change/timer-service": "^0.8.70",
43
- "@live-change/upload-service": "^0.8.70",
44
- "@live-change/user-identification-service": "^0.8.70",
45
- "@live-change/user-service": "^0.8.70",
46
- "@live-change/vue3-components": "^0.8.70",
47
- "@live-change/vue3-ssr": "^0.8.70",
25
+ "@live-change/cli": "^0.8.72",
26
+ "@live-change/dao": "^0.8.72",
27
+ "@live-change/dao-vue3": "^0.8.72",
28
+ "@live-change/dao-websocket": "^0.8.72",
29
+ "@live-change/email-service": "^0.8.72",
30
+ "@live-change/framework": "^0.8.72",
31
+ "@live-change/identicon-service": "^0.8.72",
32
+ "@live-change/image-frontend": "^0.8.72",
33
+ "@live-change/message-authentication-service": "^0.8.72",
34
+ "@live-change/notification-service": "^0.8.72",
35
+ "@live-change/password-authentication-service": "^0.8.72",
36
+ "@live-change/pattern": "^0.8.72",
37
+ "@live-change/secret-code-service": "^0.8.72",
38
+ "@live-change/secret-link-service": "^0.8.72",
39
+ "@live-change/security-frontend": "^0.8.72",
40
+ "@live-change/security-service": "^0.8.72",
41
+ "@live-change/session-service": "^0.8.72",
42
+ "@live-change/timer-service": "^0.8.72",
43
+ "@live-change/upload-service": "^0.8.72",
44
+ "@live-change/user-identification-service": "^0.8.72",
45
+ "@live-change/user-service": "^0.8.72",
46
+ "@live-change/vue3-components": "^0.8.72",
47
+ "@live-change/vue3-ssr": "^0.8.72",
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.70",
68
+ "@live-change/codeceptjs-helper": "^0.8.72",
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": "560679d86691f507c84a4ce951a567cfb3cc37aa"
79
+ "gitHead": "58800a29cbc31ab9292cfaeeb1cdf2eeee21244d"
80
80
  }