1
0
Fork 0

reshuffle pageChecks

This commit is contained in:
ChaotiCryptidz 2022-03-07 18:17:55 +00:00
parent f5937896d8
commit 509cf6205e
No known key found for this signature in database

View file

@ -4,14 +4,15 @@ import { route } from "preact-router";
export async function pageChecks(url: string, api: API, settings: Settings): Promise<boolean> { export async function pageChecks(url: string, api: API, settings: Settings): Promise<boolean> {
if (url.startsWith("/set_language")) return; if (url.startsWith("/set_language")) return;
if (url.startsWith("/me")) return;
if (url.startsWith("/settings")) return;
if (url.startsWith("/pw_gen")) return;
if (settings.language.length == 0) { if (settings.language.length == 0) {
route("/set_language", true); route("/set_language", true);
return true; return true;
} }
if (url.startsWith("/me") || url.startsWith("/pw_gen")) return;
if (url.startsWith("/set_vault_url")) return; if (url.startsWith("/set_vault_url")) return;
if (settings.apiURL.length == 0) { if (settings.apiURL.length == 0) {