@live-change/user-frontend 0.9.39 → 0.9.40
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.
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
import Portal from 'primevue/portal';
|
|
79
79
|
import BaseInput from '@primevue/core/baseinput';
|
|
80
80
|
import PasswordStyle from 'primevue/password/style';
|
|
81
|
+
import { useId } from 'vue';
|
|
81
82
|
|
|
82
83
|
export default {
|
|
83
84
|
name: 'Password',
|
|
@@ -224,6 +225,12 @@
|
|
|
224
225
|
inject: {
|
|
225
226
|
$pcFluid: { default: null }
|
|
226
227
|
},
|
|
228
|
+
setup() {
|
|
229
|
+
const uid = useId()
|
|
230
|
+
return {
|
|
231
|
+
uid
|
|
232
|
+
}
|
|
233
|
+
},
|
|
227
234
|
data() {
|
|
228
235
|
return {
|
|
229
236
|
overlayVisible: false,
|
|
@@ -453,7 +460,7 @@
|
|
|
453
460
|
return this.promptLabel || this.$primevue.config.locale.passwordPrompt;
|
|
454
461
|
},
|
|
455
462
|
overlayUniqueId() {
|
|
456
|
-
return this
|
|
463
|
+
return this.uid + '_overlay';
|
|
457
464
|
}
|
|
458
465
|
},
|
|
459
466
|
watch: {
|
package/front/src/router.js
CHANGED
|
@@ -60,8 +60,9 @@ import { client as useClient } from '@live-change/vue3-ssr'
|
|
|
60
60
|
|
|
61
61
|
export function installUserRedirects(router, app, config) {
|
|
62
62
|
const client = useClient(app._context)
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
router.afterEach(async (to, from) => {
|
|
64
|
+
console.log("AFTER EACH", to, from)
|
|
65
|
+
if(typeof window === 'undefined') return
|
|
65
66
|
if(to?.matched.find(m => m?.meta.signedIn)) {
|
|
66
67
|
if(!client.value.user) {
|
|
67
68
|
console.log("REDIRECT TO LOGIN BECAUSE PAGE REQUIRES LOGIN!")
|
|
@@ -72,15 +73,12 @@ export function installUserRedirects(router, app, config) {
|
|
|
72
73
|
query: to.query,
|
|
73
74
|
hash: to.hash
|
|
74
75
|
})
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
router.push({ name: 'user:signInEmail' })
|
|
78
|
+
}, 50)
|
|
75
79
|
return { name: 'user:signInEmail' }
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
|
-
if(to?.matched.find(m => m?.meta.signedOut)) {
|
|
79
|
-
if(client.value.user) {
|
|
80
|
-
console.log("REDIRECT TO USER INDEX BECAUSE PAGE REQUIRES LOGOUT!")
|
|
81
|
-
return { name: 'user:settings' }
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
82
|
if(to && to.name === 'user:signInEmail' && from?.matched.find(m => m?.meta.saveForSignIn)) {
|
|
85
83
|
console.log("SAVE FOR LOGIN", from)
|
|
86
84
|
localStorage.redirectAfterSignIn = JSON.stringify({
|
|
@@ -91,6 +89,14 @@ export function installUserRedirects(router, app, config) {
|
|
|
91
89
|
})
|
|
92
90
|
}
|
|
93
91
|
})
|
|
92
|
+
router.beforeEach(async (to, from) => {
|
|
93
|
+
if(to?.matched.find(m => m?.meta.signedOut)) {
|
|
94
|
+
if(client.value.user) {
|
|
95
|
+
console.log("REDIRECT TO USER INDEX BECAUSE PAGE REQUIRES LOGOUT!")
|
|
96
|
+
return { name: 'user:settings' }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
})
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
export function createRouter(app, config) {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex relative lg:static bg-surface-50 dark:bg-surface-950"
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div class="flex relative lg:static bg-surface-50 dark:bg-surface-950"
|
|
3
|
+
style="height: calc(100vh - 88px)">
|
|
4
|
+
<div id="settings-menu"
|
|
5
|
+
class="bg-surface-0 dark:bg-surface-950 flex-shrink-0 absolute left-0 h-full
|
|
6
|
+
top-0 z-1 border-r-1 border-r-surface-300 dark:border-r-surface-700 select-none
|
|
7
|
+
hidden md:static md:block"
|
|
8
|
+
style="width:280px">
|
|
5
9
|
<SettingsMenu />
|
|
6
10
|
</div>
|
|
7
11
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li class="block">
|
|
3
3
|
<router-link :to="{ name }"
|
|
4
|
-
:class="route.name == name ? 'text-
|
|
4
|
+
:class="route.name == name ? 'text-primary-500 dark:text-primary-300' : 'text-surface-700 dark:text-surface-300'"
|
|
5
5
|
v-ripple
|
|
6
|
-
class="flex align-items-center cursor-pointer p-3
|
|
7
|
-
|
|
6
|
+
class="flex align-items-center cursor-pointer p-3
|
|
7
|
+
hover:bg-surface-100 dark:hover:bg-surface-800
|
|
8
|
+
rounded-border transition-colors transition-duration-150 p-ripple no-underline">
|
|
8
9
|
<i class="pi mr-2" :class="'pi-'+icon"></i>
|
|
9
10
|
<span class="font-medium">{{ label }}</span>
|
|
10
11
|
</router-link>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-frontend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.40",
|
|
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.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/email-service": "^0.9.
|
|
30
|
-
"@live-change/framework": "^0.9.
|
|
31
|
-
"@live-change/identicon-service": "^0.9.
|
|
32
|
-
"@live-change/image-frontend": "^0.9.
|
|
33
|
-
"@live-change/message-authentication-service": "^0.9.
|
|
34
|
-
"@live-change/notification-service": "^0.9.
|
|
35
|
-
"@live-change/password-authentication-service": "^0.9.
|
|
36
|
-
"@live-change/pattern": "^0.9.
|
|
37
|
-
"@live-change/secret-code-service": "^0.9.
|
|
38
|
-
"@live-change/secret-link-service": "^0.9.
|
|
39
|
-
"@live-change/security-frontend": "^0.9.
|
|
40
|
-
"@live-change/security-service": "^0.9.
|
|
41
|
-
"@live-change/session-service": "^0.9.
|
|
42
|
-
"@live-change/timer-service": "^0.9.
|
|
43
|
-
"@live-change/upload-service": "^0.9.
|
|
44
|
-
"@live-change/user-identification-service": "^0.9.
|
|
45
|
-
"@live-change/user-service": "^0.9.
|
|
46
|
-
"@live-change/vue3-components": "^0.9.
|
|
47
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
25
|
+
"@live-change/cli": "^0.9.40",
|
|
26
|
+
"@live-change/dao": "^0.9.40",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.40",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.40",
|
|
29
|
+
"@live-change/email-service": "^0.9.40",
|
|
30
|
+
"@live-change/framework": "^0.9.40",
|
|
31
|
+
"@live-change/identicon-service": "^0.9.40",
|
|
32
|
+
"@live-change/image-frontend": "^0.9.40",
|
|
33
|
+
"@live-change/message-authentication-service": "^0.9.40",
|
|
34
|
+
"@live-change/notification-service": "^0.9.40",
|
|
35
|
+
"@live-change/password-authentication-service": "^0.9.40",
|
|
36
|
+
"@live-change/pattern": "^0.9.40",
|
|
37
|
+
"@live-change/secret-code-service": "^0.9.40",
|
|
38
|
+
"@live-change/secret-link-service": "^0.9.40",
|
|
39
|
+
"@live-change/security-frontend": "^0.9.40",
|
|
40
|
+
"@live-change/security-service": "^0.9.40",
|
|
41
|
+
"@live-change/session-service": "^0.9.40",
|
|
42
|
+
"@live-change/timer-service": "^0.9.40",
|
|
43
|
+
"@live-change/upload-service": "^0.9.40",
|
|
44
|
+
"@live-change/user-identification-service": "^0.9.40",
|
|
45
|
+
"@live-change/user-service": "^0.9.40",
|
|
46
|
+
"@live-change/vue3-components": "^0.9.40",
|
|
47
|
+
"@live-change/vue3-ssr": "^0.9.40",
|
|
48
48
|
"@vueuse/core": "^12.3.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.9.
|
|
68
|
+
"@live-change/codeceptjs-helper": "^0.9.40",
|
|
69
69
|
"codeceptjs": "^3.6.10",
|
|
70
70
|
"generate-password": "1.7.1",
|
|
71
71
|
"playwright": "1.49.1",
|
|
@@ -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": "d25366854a7a30557fd8f8e428a2e02cabb5b323"
|
|
80
80
|
}
|