From bb63afa31ec75b3a700aaed99e9655f9541e94fe Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Sat, 31 May 2025 02:37:29 +0200 Subject: [PATCH 1/3] feat: remove unused variable --- pages/register.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/register.vue b/pages/register.vue index 8c457df..d89eb07 100644 --- a/pages/register.vue +++ b/pages/register.vue @@ -131,8 +131,6 @@ watch(() => form.repeatPassword, (newValue) => { console.log("repeat password change:", newValue); }) -const apiVersion = useRuntimeConfig().public.apiVersion; - async function register(e: Event) { e.preventDefault(); console.log("Sending registration data"); From 7bbf905df5503bdd28cc6d77b59171fa24dcf1d7 Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Sat, 31 May 2025 02:38:18 +0200 Subject: [PATCH 2/3] feat: switch to use apiBase rather than instanceUrl for checking stats endpoint --- pages/login.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/login.vue b/pages/login.vue index 1972bea..a66d29f 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -39,11 +39,11 @@ const form = reactive({ const query = useRoute().query as Record; const searchParams = new URLSearchParams(query); -const instanceUrl = useCookie("instance_url").value; const registrationEnabled = ref(true); +const apiBase = useCookie("api_base"); -if (instanceUrl) { - const statsUrl = new URL("/stats", instanceUrl).href; +if (apiBase.value) { + const statsUrl = new URL("/stats", apiBase.value).href; const { status, data } = await useFetch(statsUrl); if (status.value == "success" && data.value) { registrationEnabled.value = data.value.registration_enabled; From 502e31ee6965c20245c78f803208245ea34bf3ce Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Sat, 31 May 2025 02:39:34 +0200 Subject: [PATCH 3/3] fix: apiBase not being used correctly, format document indentation --- layouts/auth.vue | 206 ++++++++++++++++++++++++++--------------------- 1 file changed, 116 insertions(+), 90 deletions(-) diff --git a/layouts/auth.vue b/layouts/auth.vue index 16e9552..b3e234e 100644 --- a/layouts/auth.vue +++ b/layouts/auth.vue @@ -1,59 +1,63 @@ \ No newline at end of file