added translations to demo info + minor improvement

This commit is contained in:
daniel31x13 2024-07-18 16:48:14 -04:00
parent a8ffbc87d1
commit 6544e3ecbb
2 changed files with 13 additions and 9 deletions

View File

@ -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" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path> ></path>
</svg> </svg>
<p className="font-bold">Demo Only</p> <p className="font-bold">{t("demo_title")}</p>
</div>
<div className="text-xs">
This is only a demo instance of Linkwarden and uploads are
disabled.
</div> </div>
<div className="text-xs">{t("demo_desc")}</div>
<div className="text-xs"> <div className="text-xs">
If you want to try out the full version, you can sign up for {t("demo_desc_2")}{" "}
a free trial at:{" "}
<a <a
href="https://cloud.linkwarden.app" href="https://cloud.linkwarden.app"
target="_blank" target="_blank"
@ -133,6 +129,8 @@ export default function Login({
<div <div
className="btn btn-sm btn-primary w-full" className="btn btn-sm btn-primary w-full"
onClick={async () => { onClick={async () => {
const load = toast.loading(t("authenticating"));
setForm({ setForm({
username: process.env username: process.env
.NEXT_PUBLIC_DEMO_USERNAME as string, .NEXT_PUBLIC_DEMO_USERNAME as string,
@ -144,9 +142,11 @@ export default function Login({
password: process.env.NEXT_PUBLIC_DEMO_PASSWORD, password: process.env.NEXT_PUBLIC_DEMO_PASSWORD,
redirect: false, redirect: false,
}); });
toast.dismiss(load);
}} }}
> >
Login as demo user {t("demo_button")}
</div> </div>
</div> </div>
</div> </div>

View File

@ -366,5 +366,9 @@
"webpage": "Webpage", "webpage": "Webpage",
"server_administration": "Server Administration", "server_administration": "Server Administration",
"all_collections": "All Collections", "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"
} }