9393 @update:disableLoginButton =" setDisableLoginButton($event)"
9494 />
9595
96- <div v-if =" loginPromptHTML"
96+ <div v-if =" coreStore.config?. loginPromptHTML"
9797 class =" flex items-center p-4 mb-4 text-sm text-lightLoginViewPromptText rounded-lg bg-lightLoginViewPromptBackground dark:bg-darkLoginViewPromptBackground dark:text-darkLoginViewPromptText" role =" alert"
9898 >
9999 <svg class =" flex-shrink-0 inline w-4 h-4 me-3" aria-hidden =" true" xmlns =" http://www.w3.org/2000/svg" fill =" currentColor" viewBox =" 0 0 20 20" >
100100 <path d =" M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z" />
101101 </svg >
102102 <span class =" sr-only" >{{ $t('Info') }}</span >
103- <div v-html =" loginPromptHTML" ></div >
103+ <div v-html =" coreStore.config?. loginPromptHTML" ></div >
104104 </div >
105105 <Button @click =" login" :loader =" inProgress" :disabled =" inProgress || disableLoginButton" class =" w-full" >
106106 {{ $t('Login to your account') }}
@@ -146,7 +146,6 @@ const password = ref('');
146146const route = useRoute ();
147147const router = useRouter ();
148148const inProgress = ref (false );
149- const loginPromptHTML = ref ()
150149const coreStore = useCoreStore ();
151150const user = useUserStore ();
152151
@@ -160,14 +159,6 @@ const backgroundPosition = computed(() => {
160159});
161160
162161
163- async function getLoginFormConfig() {
164- const response = await callAdminForthApi ({
165- path: ' /get_login_form_config' ,
166- method: ' GET' ,
167- });
168- loginPromptHTML .value = response .loginPromptHTML ;
169- }
170-
171162onBeforeMount (() => {
172163 if (localStorage .getItem (' isAuthorized' ) === ' true' ) {
173164 // if route has next param, redirect
@@ -181,7 +172,7 @@ onBeforeMount(() => {
181172})
182173
183174onMounted (async () => {
184- getLoginFormConfig ();
175+ coreStore . getLoginFormConfig ();
185176 if (coreStore .config ?.demoCredentials ) {
186177 const [demoUsername, demoPassword] = coreStore .config .demoCredentials .split (' :' );
187178 username .value = demoUsername ;
0 commit comments