@live-change/user-frontend 0.8.69 → 0.8.71

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)
@@ -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>
@@ -71,13 +71,12 @@
71
71
  const data = JSON.parse(json)
72
72
  const secrets = data.secrets
73
73
 
74
- const secretLink = secrets.find(secret => secret.type == 'link')
75
-
76
- const secretCode = secrets.find(secret => secret.type == 'code')
74
+ const secretLink = secrets.find(secret => secret.type === 'link')
75
+ const secretCode = secrets.find(secret => secret.type === 'code')
77
76
 
78
77
  const brandName = ENV_BRAND_NAME
79
78
  const metadata = {
80
- from: 'admin@' + ENV_BRAND_DOMAIN,
79
+ from: `${ENV_BRAND_NAME} <admin@${ENV_BRAND_DOMAIN}>`,
81
80
  subject: 'Confirm your email address.',
82
81
  to: contact
83
82
  }
@@ -71,13 +71,12 @@
71
71
  const data = JSON.parse(json)
72
72
  const secrets = data.secrets
73
73
 
74
- const secretLink = secrets.find(secret => secret.type == 'link')
75
-
76
- const secretCode = secrets.find(secret => secret.type == 'code')
74
+ const secretLink = secrets.find(secret => secret.type === 'link')
75
+ const secretCode = secrets.find(secret => secret.type === 'code')
77
76
 
78
77
  const brandName = ENV_BRAND_NAME
79
78
  const metadata = {
80
- from: 'admin@' + ENV_BRAND_DOMAIN,
79
+ from: `${ENV_BRAND_NAME} <admin@${ENV_BRAND_DOMAIN}>`,
81
80
  subject: 'Confirm your email address.',
82
81
  to: contact
83
82
  }
@@ -71,14 +71,13 @@
71
71
  const data = JSON.parse(json)
72
72
  const secrets = data.secrets
73
73
 
74
- const secretLink = secrets.find(secret => secret.type == 'link')
75
-
76
- const secretCode = secrets.find(secret => secret.type == 'code')
74
+ const secretLink = secrets.find(secret => secret.type === 'link')
75
+ const secretCode = secrets.find(secret => secret.type === 'code')
77
76
 
78
77
 
79
78
  const brandName = ENV_BRAND_NAME
80
79
  const metadata = {
81
- from: 'admin@' + ENV_BRAND_DOMAIN,
80
+ from: `${ENV_BRAND_NAME} <admin@${ENV_BRAND_DOMAIN}>`,
82
81
  subject: 'Confirm your email address.',
83
82
  to: contact
84
83
  }
@@ -71,13 +71,12 @@
71
71
  const data = JSON.parse(json)
72
72
  const secrets = data.secrets
73
73
 
74
- const secretLink = secrets.find(secret => secret.type == 'link')
75
-
76
- const secretCode = secrets.find(secret => secret.type == 'code')
74
+ const secretLink = secrets.find(secret => secret.type === 'link')
75
+ const secretCode = secrets.find(secret => secret.type === 'code')
77
76
 
78
77
  const brandName = ENV_BRAND_NAME
79
78
  const metadata = {
80
- from: 'admin@' + ENV_BRAND_DOMAIN,
79
+ from: `${ENV_BRAND_NAME} <admin@${ENV_BRAND_DOMAIN}>`,
81
80
  subject: 'Confirm your email address.',
82
81
  to: contact
83
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.69",
3
+ "version": "0.8.71",
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.69",
26
- "@live-change/dao": "^0.8.69",
27
- "@live-change/dao-vue3": "^0.8.69",
28
- "@live-change/dao-websocket": "^0.8.69",
29
- "@live-change/email-service": "^0.8.69",
30
- "@live-change/framework": "^0.8.69",
31
- "@live-change/identicon-service": "^0.8.69",
32
- "@live-change/image-frontend": "^0.8.69",
33
- "@live-change/message-authentication-service": "^0.8.69",
34
- "@live-change/notification-service": "^0.8.69",
35
- "@live-change/password-authentication-service": "^0.8.69",
36
- "@live-change/pattern": "^0.8.69",
37
- "@live-change/secret-code-service": "^0.8.69",
38
- "@live-change/secret-link-service": "^0.8.69",
39
- "@live-change/security-frontend": "^0.8.69",
40
- "@live-change/security-service": "^0.8.69",
41
- "@live-change/session-service": "^0.8.69",
42
- "@live-change/timer-service": "^0.8.69",
43
- "@live-change/upload-service": "^0.8.69",
44
- "@live-change/user-identification-service": "^0.8.69",
45
- "@live-change/user-service": "^0.8.69",
46
- "@live-change/vue3-components": "^0.8.69",
47
- "@live-change/vue3-ssr": "^0.8.69",
25
+ "@live-change/cli": "^0.8.71",
26
+ "@live-change/dao": "^0.8.71",
27
+ "@live-change/dao-vue3": "^0.8.71",
28
+ "@live-change/dao-websocket": "^0.8.71",
29
+ "@live-change/email-service": "^0.8.71",
30
+ "@live-change/framework": "^0.8.71",
31
+ "@live-change/identicon-service": "^0.8.71",
32
+ "@live-change/image-frontend": "^0.8.71",
33
+ "@live-change/message-authentication-service": "^0.8.71",
34
+ "@live-change/notification-service": "^0.8.71",
35
+ "@live-change/password-authentication-service": "^0.8.71",
36
+ "@live-change/pattern": "^0.8.71",
37
+ "@live-change/secret-code-service": "^0.8.71",
38
+ "@live-change/secret-link-service": "^0.8.71",
39
+ "@live-change/security-frontend": "^0.8.71",
40
+ "@live-change/security-service": "^0.8.71",
41
+ "@live-change/session-service": "^0.8.71",
42
+ "@live-change/timer-service": "^0.8.71",
43
+ "@live-change/upload-service": "^0.8.71",
44
+ "@live-change/user-identification-service": "^0.8.71",
45
+ "@live-change/user-service": "^0.8.71",
46
+ "@live-change/vue3-components": "^0.8.71",
47
+ "@live-change/vue3-ssr": "^0.8.71",
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.69",
68
+ "@live-change/codeceptjs-helper": "^0.8.71",
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": "57f25e13fd727c638d5ab23e724b6e12a4e3735a"
79
+ "gitHead": "f708c1c2d50b8d4bf61ec227cf0c4349555d0741"
80
80
  }