From 6544e3ecbb34750f4477080dd22f0e82432f2f06 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Thu, 18 Jul 2024 16:48:14 -0400 Subject: [PATCH] added translations to demo info + minor improvement --- pages/login.tsx | 16 ++++++++-------- public/locales/en/common.json | 6 +++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/pages/login.tsx b/pages/login.tsx index cc1a7f0..c1bc8d8 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -112,16 +112,12 @@ export default function Login({ d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" > -

Demo Only

- -
- This is only a demo instance of Linkwarden and uploads are - disabled. +

{t("demo_title")}

+
{t("demo_desc")}
- If you want to try out the full version, you can sign up for - a free trial at:{" "} + {t("demo_desc_2")}{" "} { + const load = toast.loading(t("authenticating")); + setForm({ username: process.env .NEXT_PUBLIC_DEMO_USERNAME as string, @@ -144,9 +142,11 @@ export default function Login({ password: process.env.NEXT_PUBLIC_DEMO_PASSWORD, redirect: false, }); + + toast.dismiss(load); }} > - Login as demo user + {t("demo_button")}
diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 4593398..868fac0 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -366,5 +366,9 @@ "webpage": "Webpage", "server_administration": "Server Administration", "all_collections": "All Collections", - "dashboard": "Dashboard" + "dashboard": "Dashboard", + "demo_title": "Demo Only", + "demo_desc": "This is only a demo instance of Linkwarden and uploads are disabled.", + "demo_desc_2": "If you want to try out the full version, you can sign up for a free trial at:", + "demo_button": "Login as demo user" } \ No newline at end of file