diff --git a/assets/pages/login.vue b/assets/pages/login.vue
index 6d644ab0257b..edff9d2b8acc 100644
--- a/assets/pages/login.vue
+++ b/assets/pages/login.vue
@@ -2,35 +2,50 @@
@@ -42,10 +57,12 @@ const { t } = useI18n();
setTitle(t("title.login"));
const error = ref(false);
+const loading = ref(false);
const form = ref();
const params = new URLSearchParams(window.location.search);
async function onLogin() {
+ loading.value = true;
const response = await fetch(withBase("/api/token"), {
body: new FormData(form.value),
method: "POST",
@@ -61,6 +78,7 @@ async function onLogin() {
} else {
error.value = true;
}
+ loading.value = false;
}