@icvdeveloper/common-module 1.4.10 → 1.4.11
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/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
|
@@ -25,43 +25,56 @@ const { loginError, handleLogin, email, password, tooManySessions, showReset } =
|
|
|
25
25
|
<template>
|
|
26
26
|
<div class="px-2">
|
|
27
27
|
<div class="flex flex-1 flex-col text-center pt-8">
|
|
28
|
-
<h1 class="mb-3 heading-color-3">
|
|
28
|
+
<h1 class="mb-3 heading-color-3">
|
|
29
|
+
Log In
|
|
30
|
+
</h1>
|
|
31
|
+
<!-- error messages -->
|
|
29
32
|
<CommonMessage
|
|
30
33
|
v-if="loginError"
|
|
31
34
|
:success="false"
|
|
32
35
|
class="w-full max-w-xs mx-auto"
|
|
33
36
|
>
|
|
34
37
|
Invalid email or password.
|
|
35
|
-
<br
|
|
38
|
+
<br>
|
|
36
39
|
<a
|
|
37
40
|
v-if="!globalConfigValue('secure_site_access_enabled', false)"
|
|
38
41
|
href="/login/email"
|
|
39
|
-
>Forgot Your Password?</a
|
|
40
42
|
>
|
|
43
|
+
Forgot Your Password?
|
|
44
|
+
</a>
|
|
41
45
|
<a
|
|
42
46
|
v-if="globalConfigValue('secure_site_access_enabled', false)"
|
|
43
47
|
class="cursor-pointer"
|
|
44
48
|
@click="showReset"
|
|
45
|
-
>Forgot Your Password?</a
|
|
46
49
|
>
|
|
50
|
+
Forgot Your Password?
|
|
51
|
+
</a>
|
|
47
52
|
</CommonMessage>
|
|
48
53
|
|
|
49
|
-
<div class="max-w-xs mx-auto"
|
|
54
|
+
<div class="max-w-xs mx-auto">
|
|
55
|
+
<!-- form -->
|
|
50
56
|
<input
|
|
51
57
|
v-model="email"
|
|
52
58
|
type="email"
|
|
53
59
|
placeholder="Email"
|
|
54
60
|
class="form-input contrast-border mb-2"
|
|
55
|
-
|
|
61
|
+
@keyup.enter="handleLogin()"
|
|
62
|
+
>
|
|
56
63
|
<input
|
|
57
64
|
v-model="password"
|
|
58
65
|
type="password"
|
|
59
66
|
placeholder="password"
|
|
60
67
|
class="form-input contrast-border mb-5"
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
@keyup.enter="handleLogin()"
|
|
69
|
+
>
|
|
70
|
+
<button
|
|
71
|
+
v-if="!tooManySessions"
|
|
72
|
+
class="btn"
|
|
73
|
+
@click="handleLogin()"
|
|
74
|
+
>
|
|
63
75
|
Log In
|
|
64
76
|
</button>
|
|
77
|
+
<!-- too many sessions condition -->
|
|
65
78
|
<CommonMessage
|
|
66
79
|
v-if="tooManySessions"
|
|
67
80
|
:success="false"
|
|
@@ -69,7 +82,11 @@ const { loginError, handleLogin, email, password, tooManySessions, showReset } =
|
|
|
69
82
|
>
|
|
70
83
|
This user access is logged in on another device!
|
|
71
84
|
</CommonMessage>
|
|
72
|
-
<button
|
|
85
|
+
<button
|
|
86
|
+
v-if="tooManySessions"
|
|
87
|
+
class="btn"
|
|
88
|
+
@click="handleLogin(true)"
|
|
89
|
+
>
|
|
73
90
|
Sign out other Device
|
|
74
91
|
</button>
|
|
75
92
|
</div>
|
|
@@ -13,9 +13,11 @@ export const useAuthStore = defineStore("auth", {
|
|
|
13
13
|
user.expires_at,
|
|
14
14
|
"yyyy-MM-dd HH:mm:ss",
|
|
15
15
|
{ zone: "utc" }
|
|
16
|
-
)
|
|
16
|
+
);
|
|
17
17
|
if (now >= expiration) {
|
|
18
|
+
console.log("Auth expired: Pinia auth store reset.");
|
|
18
19
|
context.store.reset();
|
|
20
|
+
localStorage.removeItem("auth");
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
}
|