@sowell/quasar-app-extension-auth 0.3.17 → 0.3.19
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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-layout>
|
|
3
|
-
<q-page class="column items-center">
|
|
4
|
-
<div class="column
|
|
5
|
-
<div class="column
|
|
3
|
+
<q-page class="column justify-end items-center">
|
|
4
|
+
<div class="column">
|
|
5
|
+
<div class="column justify-center" style="height: 35vh">
|
|
6
6
|
<div class="row justify-center">
|
|
7
7
|
<img
|
|
8
8
|
src="../../assets/Logo.svg"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="
|
|
19
|
+
<div class="">
|
|
20
20
|
<q-form @submit="onSubmit">
|
|
21
21
|
<div>
|
|
22
22
|
<div
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
</q-btn>
|
|
98
98
|
</div>
|
|
99
99
|
<div
|
|
100
|
-
class="q-mb-
|
|
100
|
+
class="q-mb-xl q-mt-lg text-primary text-center"
|
|
101
101
|
@click="forgottenPassword = true"
|
|
102
102
|
data-cy="forgot-password"
|
|
103
103
|
style="font-size: 14px; cursor: pointer; width: 350px"
|
|
@@ -234,14 +234,4 @@ export default defineComponent({
|
|
|
234
234
|
div.q-field__messages {
|
|
235
235
|
display: none;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
.short-screen {
|
|
239
|
-
height: 80vh;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
@media screen and (max-height: 680px) {
|
|
243
|
-
.short-screen {
|
|
244
|
-
height: 65vh;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
237
|
</style>
|
package/src/composables/auth.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ionEyeSharp,
|
|
10
10
|
ionEyeOffSharp,
|
|
11
11
|
} from "@quasar/extras/ionicons-v5";
|
|
12
|
-
import {
|
|
12
|
+
import { Platform } from "quasar";
|
|
13
13
|
|
|
14
14
|
import { $prompts, $router, useAuthState } from "../injects";
|
|
15
15
|
|
|
@@ -21,7 +21,6 @@ interface HeadersInterface {
|
|
|
21
21
|
|
|
22
22
|
export function useAuth() {
|
|
23
23
|
const authState = useAuthState();
|
|
24
|
-
const { localStorage } = useQuasar();
|
|
25
24
|
|
|
26
25
|
const { t } = useI18n();
|
|
27
26
|
const {
|
|
@@ -92,12 +91,12 @@ export function useAuth() {
|
|
|
92
91
|
// @ts-ignore
|
|
93
92
|
if (!window.Cypress) {
|
|
94
93
|
const isDifferentUser =
|
|
95
|
-
!localStorage.
|
|
94
|
+
!localStorage.getItem("credentials") ||
|
|
96
95
|
// @ts-ignore
|
|
97
|
-
localStorage.getItem("credentials").email !== data.auth.email;
|
|
96
|
+
JSON.parse(localStorage.getItem("credentials")).email !== data.auth.email;
|
|
98
97
|
|
|
99
98
|
if (isDifferentUser) {
|
|
100
|
-
localStorage.
|
|
99
|
+
localStorage.setItem("credentials", JSON.stringify(data.auth));
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
push(LOCAL_SUCCESS_REDIRECTION_ROUTE);
|
|
@@ -117,11 +116,11 @@ export function useAuth() {
|
|
|
117
116
|
};
|
|
118
117
|
|
|
119
118
|
const deviceReady = () => {
|
|
120
|
-
if (localStorage.
|
|
119
|
+
if (localStorage.getItem("credentials")) {
|
|
121
120
|
// @ts-ignore
|
|
122
|
-
email.value = localStorage.getItem("credentials").email;
|
|
121
|
+
email.value = JSON.parse(localStorage.getItem("credentials")).email;
|
|
123
122
|
// @ts-ignore
|
|
124
|
-
password.value = localStorage.getItem("credentials").password;
|
|
123
|
+
password.value = JSON.parse(localStorage.getItem("credentials")).password;
|
|
125
124
|
}
|
|
126
125
|
};
|
|
127
126
|
|