diff --git a/frontend/src/views/login/components/login-form.vue b/frontend/src/views/login/components/login-form.vue index 30651a7f2..0a61c6bc5 100644 --- a/frontend/src/views/login/components/login-form.vue +++ b/frontend/src/views/login/components/login-form.vue @@ -127,7 +127,7 @@ @@ -189,6 +189,10 @@ const isDemo = ref(false); const agreeVisible = ref(false); type FormInstance = InstanceType; +const _isMobile = () => { + const rect = document.body.getBoundingClientRect(); + return rect.width - 1 < 600; +}; const loginButtonFocused = ref(); const loginFormRef = ref(); @@ -253,7 +257,7 @@ const login = (formEl: FormInstance | undefined) => { formEl.validate(async (valid) => { if (!valid) return; if (!loginForm.agreeLicense) { - if (globalStore.isMobile()) { + if (_isMobile()) { agreeVisible.value = true; } return;