@live-change/user-frontend 0.8.129 → 0.8.131
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/src/router.js
CHANGED
|
@@ -64,7 +64,7 @@ export function installUserRedirects(router, app, config) {
|
|
|
64
64
|
if(to?.matched.find(m => m?.meta.signedIn)) {
|
|
65
65
|
if(!client.value.user) {
|
|
66
66
|
console.log("REDIRECT TO LOGIN BECAUSE PAGE REQUIRES LOGIN!")
|
|
67
|
-
router.redirectAfterSignIn = to.fullPath
|
|
67
|
+
router.redirectAfterSignIn = JSON.stringify(to.fullPath)
|
|
68
68
|
return { name: 'user:signInEmail' }
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -76,7 +76,7 @@ export function installUserRedirects(router, app, config) {
|
|
|
76
76
|
}
|
|
77
77
|
if(to && to.name === 'user:signInEmail' && from?.matched.find(m => m?.meta.saveForSignIn)) {
|
|
78
78
|
console.log("SAVE FOR LOGIN", from.fullPath)
|
|
79
|
-
|
|
79
|
+
router.redirectAfterSignIn = JSON.stringify(to.fullPath)
|
|
80
80
|
}
|
|
81
81
|
})
|
|
82
82
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="surface-card border-round shadow-2 p-4">
|
|
4
4
|
<div class="text-900 font-medium mb-3 text-xl mb-4">Signed In</div>
|
|
5
5
|
<p class="mt-0 p-0 line-height-3">Congratulations! You have successfully logged in to your account.</p>
|
|
6
|
-
<div v-if="afterSignIn" class="flex flex-row align-items-center">
|
|
6
|
+
<div v-if="afterSignIn" class="flex flex-row justify-content-center align-items-center">
|
|
7
7
|
<router-link :to="afterSignIn" class="no-underline">
|
|
8
8
|
<Button label="Next" v-ripple />
|
|
9
9
|
</router-link>
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
import pluralize from 'pluralize'
|
|
36
36
|
|
|
37
37
|
const afterSignIn = computed( () => isMounted.value && localStorage.redirectAfterSignIn )
|
|
38
|
-
|
|
38
|
+
const redirectTime = ref()
|
|
39
39
|
onMounted(() => {
|
|
40
|
-
redirectTime = new Date(Date.now() + 10 * 1000)
|
|
40
|
+
redirectTime.value = new Date(Date.now() + 10 * 1000)
|
|
41
41
|
setTimeout(() => {
|
|
42
42
|
if (afterSignIn.value) {
|
|
43
43
|
localStorage.removeItem('redirectAfterSignIn')
|
|
44
|
-
router.push(afterSignIn.value)
|
|
44
|
+
router.push(JSON.parse(afterSignIn.value))
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, redirectTime.value - currentTime.value)
|
|
47
47
|
})
|
|
48
48
|
</script>
|
|
49
49
|
|
|
@@ -8,9 +8,17 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<p class="mt-0 p-0 line-height-3">
|
|
10
10
|
Congratulations! You have successfully created your account.
|
|
11
|
-
<span v-if="needPassword">
|
|
11
|
+
<span v-if="needPassword && !afterSignIn">
|
|
12
12
|
You can now set password to secure your account.
|
|
13
13
|
</span>
|
|
14
|
+
<div v-else-if="afterSignIn" class="flex flex-row justify-content-center align-items-center">
|
|
15
|
+
<router-link :to="afterSignIn" class="no-underline">
|
|
16
|
+
<Button label="Next" v-ripple />
|
|
17
|
+
</router-link>
|
|
18
|
+
<p class="ml-4" v-if="isMounted && redirectTime">
|
|
19
|
+
Redirect in {{ pluralize('second', Math.ceil((redirectTime - currentTime) / 1000), true) }}...
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
14
22
|
<p v-else>
|
|
15
23
|
|
|
16
24
|
Setup your <router-link :to="{ name: 'user:identification' }">profile</router-link>
|
|
@@ -19,7 +27,7 @@
|
|
|
19
27
|
</p>
|
|
20
28
|
</div>
|
|
21
29
|
|
|
22
|
-
<div class="surface-card p-4 shadow-2 border-round mt-2" v-if="needPassword">
|
|
30
|
+
<div class="surface-card p-4 shadow-2 border-round mt-2" v-if="needPassword && !afterSignIn">
|
|
23
31
|
<div class="text-center mb-5">
|
|
24
32
|
<div class="text-900 text-3xl font-medium mb-3">
|
|
25
33
|
{{ passwordExists ? 'Change password' : 'Set password' }}
|
|
@@ -82,6 +90,10 @@
|
|
|
82
90
|
import { live, path } from '@live-change/vue3-ssr'
|
|
83
91
|
import { computed, ref, onMounted } from 'vue'
|
|
84
92
|
|
|
93
|
+
import { currentTime } from "@live-change/frontend-base"
|
|
94
|
+
|
|
95
|
+
import pluralize from 'pluralize'
|
|
96
|
+
|
|
85
97
|
import { useRouter } from 'vue-router'
|
|
86
98
|
const router = useRouter()
|
|
87
99
|
|
|
@@ -99,6 +111,18 @@
|
|
|
99
111
|
live(path().phone?.myUserPhones())
|
|
100
112
|
])
|
|
101
113
|
|
|
114
|
+
const afterSignIn = computed( () => isMounted.value && localStorage.redirectAfterSignIn )
|
|
115
|
+
const redirectTime = ref()
|
|
116
|
+
onMounted(() => {
|
|
117
|
+
redirectTime.value = new Date(Date.now() + 10 * 1000)
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
if (afterSignIn.value) {
|
|
120
|
+
localStorage.removeItem('redirectAfterSignIn')
|
|
121
|
+
router.push(JSON.parse(afterSignIn.value))
|
|
122
|
+
}
|
|
123
|
+
}, redirectTime.value - currentTime.value)
|
|
124
|
+
})
|
|
125
|
+
|
|
102
126
|
const needPassword = computed(() => (!passwordExists.value
|
|
103
127
|
&& (emails.value?.length > 0 || phones.value?.length > 0)
|
|
104
128
|
))
|
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.131",
|
|
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.131",
|
|
26
|
+
"@live-change/dao": "^0.8.131",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.131",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.131",
|
|
29
|
+
"@live-change/email-service": "^0.8.131",
|
|
30
|
+
"@live-change/framework": "^0.8.131",
|
|
31
|
+
"@live-change/identicon-service": "^0.8.131",
|
|
32
|
+
"@live-change/image-frontend": "^0.8.131",
|
|
33
|
+
"@live-change/message-authentication-service": "^0.8.131",
|
|
34
|
+
"@live-change/notification-service": "^0.8.131",
|
|
35
|
+
"@live-change/password-authentication-service": "^0.8.131",
|
|
36
|
+
"@live-change/pattern": "^0.8.131",
|
|
37
|
+
"@live-change/secret-code-service": "^0.8.131",
|
|
38
|
+
"@live-change/secret-link-service": "^0.8.131",
|
|
39
|
+
"@live-change/security-frontend": "^0.8.131",
|
|
40
|
+
"@live-change/security-service": "^0.8.131",
|
|
41
|
+
"@live-change/session-service": "^0.8.131",
|
|
42
|
+
"@live-change/timer-service": "^0.8.131",
|
|
43
|
+
"@live-change/upload-service": "^0.8.131",
|
|
44
|
+
"@live-change/user-identification-service": "^0.8.131",
|
|
45
|
+
"@live-change/user-service": "^0.8.131",
|
|
46
|
+
"@live-change/vue3-components": "^0.8.131",
|
|
47
|
+
"@live-change/vue3-ssr": "^0.8.131",
|
|
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.131",
|
|
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": "26ec71040a5eea3f61f83e631cb03e420fa90817"
|
|
80
80
|
}
|