adminforth 3.3.0-next.4 → 3.3.0-next.6
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="inline-flex items-center gap-1">
|
|
3
3
|
<div
|
|
4
|
-
class="overflow-hidden max-
|
|
4
|
+
class="overflow-hidden max-h-[20px] rounded-default"
|
|
5
5
|
:title="show ? $t('Click to hide') : $t('Click to show')"
|
|
6
6
|
@click="toggle"
|
|
7
7
|
>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}: {}"
|
|
9
9
|
>
|
|
10
10
|
|
|
11
|
-
<img v-if="coreStore.config?.loginBackgroundImage && backgroundPosition !== 'over'"
|
|
11
|
+
<img v-if="!oauthRedirecting && coreStore.config?.loginBackgroundImage && backgroundPosition !== 'over'"
|
|
12
12
|
:src="loadFile(coreStore.config?.loginBackgroundImage)"
|
|
13
13
|
class="position-absolute top-0 left-0 h-screen object-cover w-0"
|
|
14
14
|
:class="{
|
|
@@ -21,8 +21,13 @@
|
|
|
21
21
|
}[backgroundPosition]"
|
|
22
22
|
/>
|
|
23
23
|
|
|
24
|
+
<div v-if="oauthRedirecting">
|
|
25
|
+
<Spinner class="w-10 h-10" />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
24
28
|
<!-- Main modal -->
|
|
25
29
|
<div id="authentication-modal" tabindex="-1"
|
|
30
|
+
v-show="!oauthRedirecting"
|
|
26
31
|
class="af-login-modal overflow-y-auto flex flex-grow
|
|
27
32
|
overflow-x-hidden z-50 min-w-[350px] justify-center items-center md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
|
28
33
|
<div class="relative p-4 w-full max-h-full max-w-[400px]">
|
|
@@ -112,6 +117,7 @@
|
|
|
112
117
|
:is="getCustomComponent(formatComponent(c))"
|
|
113
118
|
:meta="formatComponent(c).meta"
|
|
114
119
|
@update:disableLoginButton="setDisableLoginButton($event)"
|
|
120
|
+
@update:oauthRedirecting="oauthRedirecting = $event"
|
|
115
121
|
/>
|
|
116
122
|
</form>
|
|
117
123
|
</div>
|
|
@@ -132,8 +138,8 @@ import { useCoreStore } from '@/stores/core';
|
|
|
132
138
|
import { useUserStore } from '@/stores/user';
|
|
133
139
|
import { IconEyeSolid, IconEyeSlashSolid } from '@iconify-prerendered/vue-flowbite';
|
|
134
140
|
import { callAdminForthApi, loadFile } from '@/utils';
|
|
135
|
-
import { useRouter } from 'vue-router';
|
|
136
|
-
import { Button, Checkbox, Input } from '@/afcl';
|
|
141
|
+
import { useRouter, useRoute } from 'vue-router';
|
|
142
|
+
import { Button, Checkbox, Input, Spinner } from '@/afcl';
|
|
137
143
|
import ErrorMessage from '@/components/ErrorMessage.vue';
|
|
138
144
|
|
|
139
145
|
const passwordInput = ref<InstanceType<typeof Input> | null>(null);
|
|
@@ -143,6 +149,8 @@ const username = ref('');
|
|
|
143
149
|
const password = ref('');
|
|
144
150
|
|
|
145
151
|
const router = useRouter();
|
|
152
|
+
const route = useRoute();
|
|
153
|
+
const oauthRedirecting = ref<boolean>('start_oauth' in route.query && route.query.start_oauth !== '');
|
|
146
154
|
const inProgress = ref<boolean>(false);
|
|
147
155
|
const isSuccess = ref<boolean>(false);
|
|
148
156
|
const coreStore = useCoreStore();
|