@live-change/user-frontend 0.8.115 → 0.8.117
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/front/locales/en.json +3 -1
- package/front/src/message-auth/MessageSent.vue +21 -8
- package/front/src/notifications/NotificationButtons.vue +3 -3
- package/front/src/notifications/NotificationsList.vue +10 -6
- package/front/src/notifications/SimpleNotification.vue +2 -2
- package/package.json +26 -26
package/front/locales/en.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"errors": {
|
|
3
3
|
"emailTaken": "Email is already registered, try to sign-in.",
|
|
4
|
-
"phoneTaken": "Phone is already registered, try to sign-in."
|
|
4
|
+
"phoneTaken": "Phone is already registered, try to sign-in.",
|
|
5
|
+
"codeNotFound": "Secret code not recognized.",
|
|
6
|
+
"codeExpired": "Secret code expired."
|
|
5
7
|
},
|
|
6
8
|
"app": {
|
|
7
9
|
"updateAvailable": "Update available!",
|
|
@@ -11,23 +11,28 @@
|
|
|
11
11
|
<Secured :events="['wrong-secret-code']" :actions="['checkSecretCode']">
|
|
12
12
|
<command-form service="messageAuthentication" action="finishMessageAuthentication"
|
|
13
13
|
:parameters="{ secretType: 'code', authentication }" :key="authentication"
|
|
14
|
+
ref="form"
|
|
14
15
|
@submit="handleSubmit" @done="handleAuthenticated" @error="handleError"
|
|
15
16
|
v-slot="{ data }">
|
|
16
|
-
<div class="flex justify-content-center">
|
|
17
|
-
<div class="p-field
|
|
17
|
+
<div class="flex justify-content-center flex-column align-items-center">
|
|
18
|
+
<div class="p-field mx-1 flex flex-column mb-3">
|
|
18
19
|
<label for="code" class="p-sr-only">Code</label>
|
|
19
|
-
<
|
|
20
|
+
<InputOtp id="code" :length="6" class="mb-2"
|
|
20
21
|
v-model="data.secret"
|
|
21
22
|
aria-describedby="code-help" :class="{ 'p-invalid': data.secretError }" />
|
|
23
|
+
<!-- <InputMask id="code" class="p-inputtext-lg" mask="999999" slotChar="######" placeholder="Enter code"
|
|
24
|
+
v-model="data.secret"
|
|
25
|
+
aria-describedby="code-help" :class="{ 'p-invalid': data.secretError }" />-->
|
|
22
26
|
<span v-if="data.secretError" id="code-help" class="p-error">{{ t(`errors.${data.secretError}`) }}</span>
|
|
23
27
|
</div>
|
|
24
28
|
<div class="flex flex-column">
|
|
25
|
-
<Button label="OK" type="submit" class="p-button-lg flex-grow-0"
|
|
29
|
+
<Button label="OK" type="submit" class="p-button-lg flex-grow-0"
|
|
30
|
+
:disableda="data.secret?.length < 6" />
|
|
26
31
|
</div>
|
|
27
32
|
</div>
|
|
28
|
-
<div v-if="data.secretError === 'codeExpired'">
|
|
29
|
-
<p class="mt-0 mb-
|
|
30
|
-
<Button label="Resend" class="p-button-lg" @click="resend"
|
|
33
|
+
<div v-if="data.secretError === 'codeExpired'" class="mt-3 text-center">
|
|
34
|
+
<p class="mt-0 mb-2 p-0 line-height-3">To send another code click button below.</p>
|
|
35
|
+
<Button label="Resend secret code" class="p-button-lg" @click="resend" />
|
|
31
36
|
</div>
|
|
32
37
|
</command-form>
|
|
33
38
|
</Secured>
|
|
@@ -37,14 +42,17 @@
|
|
|
37
42
|
|
|
38
43
|
<script setup>
|
|
39
44
|
import InputMask from "primevue/inputmask"
|
|
45
|
+
import InputOtp from "primevue/inputotp"
|
|
40
46
|
import Button from "primevue/button"
|
|
41
47
|
|
|
42
48
|
import { Secured } from "@live-change/security-frontend"
|
|
43
49
|
|
|
44
50
|
import { useRouter } from 'vue-router'
|
|
51
|
+
const router = useRouter()
|
|
45
52
|
import { ref } from 'vue'
|
|
46
53
|
|
|
47
|
-
|
|
54
|
+
import { useToast } from 'primevue/usetoast'
|
|
55
|
+
const toast = useToast()
|
|
48
56
|
|
|
49
57
|
import { useI18n } from 'vue-i18n'
|
|
50
58
|
const { t } = useI18n()
|
|
@@ -72,6 +80,8 @@
|
|
|
72
80
|
submitted.value = false
|
|
73
81
|
}
|
|
74
82
|
|
|
83
|
+
const form = ref()
|
|
84
|
+
|
|
75
85
|
import { inject } from 'vue'
|
|
76
86
|
import { actions } from '@live-change/vue3-ssr'
|
|
77
87
|
const workingZone = inject('workingZone')
|
|
@@ -81,6 +91,9 @@
|
|
|
81
91
|
const { authentication: newAuthentication } = await resendMessageAuthentication({
|
|
82
92
|
authentication
|
|
83
93
|
})
|
|
94
|
+
if(form.value) form.value.reset()
|
|
95
|
+
toast.add({ severity: 'success', summary: 'Code sent', detail: 'New code sent to you' })
|
|
96
|
+
|
|
84
97
|
router.push({
|
|
85
98
|
name: 'user:sent',
|
|
86
99
|
params: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="notification-buttons">
|
|
3
|
-
<Button v-if="notification.readState
|
|
4
|
-
icon="pi pi-eye" class="p-button-rounded p-button-outlined surface-0" />
|
|
5
|
-
<Button v-if="notification.readState
|
|
3
|
+
<Button v-if="notification.readState === 'new'" @click="markRead()"
|
|
4
|
+
icon="pi pi-eye" class="p-button-rounded p-button-outlined surface-0 " />
|
|
5
|
+
<Button v-if="notification.readState === 'read'" @click="markUnread()"
|
|
6
6
|
icon="pi pi-eye-slash" class="p-button-rounded p-button-outlined surface-0" />
|
|
7
7
|
<Button @click="deleteNotification()"
|
|
8
8
|
icon="pi pi-trash" class="p-button-rounded p-button-outlined ml-1 surface-0" />
|
|
@@ -10,12 +10,15 @@
|
|
|
10
10
|
<ul class="list-none p-0 m-0 notifications">
|
|
11
11
|
<div v-for="(bucket, bucketIndex) in notificationsBuckets.buckets" :key="bucket.id"
|
|
12
12
|
:style="{ backgroundz: `hsl(${bucket.id * 11}, 100%, 80%)` }">
|
|
13
|
-
<div v-for="(notification, index) in bucket.data" :key="notification.id"
|
|
13
|
+
<div v-for="(notification, index) in bucket.data" :key="notification.id"
|
|
14
|
+
:ref="el => bucket.domElements[index] = el"
|
|
14
15
|
class="notification border-bottom-1 surface-border"
|
|
15
16
|
:class="{ selected: selectedNotification === notification.to }">
|
|
16
17
|
<component :is="notificationComponent(notification)" :notification="notification" />
|
|
17
|
-
<
|
|
18
|
-
|
|
18
|
+
<div class="notification-more-button flex align-items-end justify-content-center">
|
|
19
|
+
<Button @click="() => selectNotification(notification)"
|
|
20
|
+
icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text " />
|
|
21
|
+
</div>
|
|
19
22
|
<NotificationButtons :notification="notification" />
|
|
20
23
|
</div>
|
|
21
24
|
</div>
|
|
@@ -110,13 +113,14 @@
|
|
|
110
113
|
visibility: hidden;
|
|
111
114
|
position: absolute;
|
|
112
115
|
right: 40px;
|
|
113
|
-
|
|
116
|
+
bottom: 5px;
|
|
114
117
|
//transform: translate(0, -50%);
|
|
115
118
|
}
|
|
116
119
|
.notification-more-button {
|
|
117
120
|
position: absolute;
|
|
118
|
-
right:
|
|
119
|
-
|
|
121
|
+
right: 0px;
|
|
122
|
+
bottom: -5px;
|
|
123
|
+
height: 100%;
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
.notification.selected {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div :class="['px-3 py-2 flex align-items-start justify-content-between flex-column',
|
|
3
3
|
notification.readState === 'new' ? 'surface-0 hover:surface-100' : 'surface-100 hover:surface-200'] ">
|
|
4
4
|
<slot></slot>
|
|
5
5
|
<span class="block text-500 font-medium mt-2">
|
|
6
6
|
{{ DateTime.fromISO(notification.time).toRelative({ base: DateTime.fromMillis(now) }) }}
|
|
7
7
|
</span>
|
|
8
|
-
</
|
|
8
|
+
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script setup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.117",
|
|
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.
|
|
26
|
-
"@live-change/dao": "^0.8.
|
|
27
|
-
"@live-change/dao-vue3": "^0.8.
|
|
28
|
-
"@live-change/dao-websocket": "^0.8.
|
|
29
|
-
"@live-change/email-service": "^0.8.
|
|
30
|
-
"@live-change/framework": "^0.8.
|
|
31
|
-
"@live-change/identicon-service": "^0.8.
|
|
32
|
-
"@live-change/image-frontend": "^0.8.
|
|
33
|
-
"@live-change/message-authentication-service": "^0.8.
|
|
34
|
-
"@live-change/notification-service": "^0.8.
|
|
35
|
-
"@live-change/password-authentication-service": "^0.8.
|
|
36
|
-
"@live-change/pattern": "^0.8.
|
|
37
|
-
"@live-change/secret-code-service": "^0.8.
|
|
38
|
-
"@live-change/secret-link-service": "^0.8.
|
|
39
|
-
"@live-change/security-frontend": "^0.8.
|
|
40
|
-
"@live-change/security-service": "^0.8.
|
|
41
|
-
"@live-change/session-service": "^0.8.
|
|
42
|
-
"@live-change/timer-service": "^0.8.
|
|
43
|
-
"@live-change/upload-service": "^0.8.
|
|
44
|
-
"@live-change/user-identification-service": "^0.8.
|
|
45
|
-
"@live-change/user-service": "^0.8.
|
|
46
|
-
"@live-change/vue3-components": "^0.8.
|
|
47
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
25
|
+
"@live-change/cli": "^0.8.117",
|
|
26
|
+
"@live-change/dao": "^0.8.117",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.117",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.117",
|
|
29
|
+
"@live-change/email-service": "^0.8.117",
|
|
30
|
+
"@live-change/framework": "^0.8.117",
|
|
31
|
+
"@live-change/identicon-service": "^0.8.117",
|
|
32
|
+
"@live-change/image-frontend": "^0.8.117",
|
|
33
|
+
"@live-change/message-authentication-service": "^0.8.117",
|
|
34
|
+
"@live-change/notification-service": "^0.8.117",
|
|
35
|
+
"@live-change/password-authentication-service": "^0.8.117",
|
|
36
|
+
"@live-change/pattern": "^0.8.117",
|
|
37
|
+
"@live-change/secret-code-service": "^0.8.117",
|
|
38
|
+
"@live-change/secret-link-service": "^0.8.117",
|
|
39
|
+
"@live-change/security-frontend": "^0.8.117",
|
|
40
|
+
"@live-change/security-service": "^0.8.117",
|
|
41
|
+
"@live-change/session-service": "^0.8.117",
|
|
42
|
+
"@live-change/timer-service": "^0.8.117",
|
|
43
|
+
"@live-change/upload-service": "^0.8.117",
|
|
44
|
+
"@live-change/user-identification-service": "^0.8.117",
|
|
45
|
+
"@live-change/user-service": "^0.8.117",
|
|
46
|
+
"@live-change/vue3-components": "^0.8.117",
|
|
47
|
+
"@live-change/vue3-ssr": "^0.8.117",
|
|
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.
|
|
68
|
+
"@live-change/codeceptjs-helper": "^0.8.117",
|
|
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": "
|
|
79
|
+
"gitHead": "10546047b3799e2dae072c9270b9469af92ea48f"
|
|
80
80
|
}
|