+ {dbError && (
+
+ Error
+ {dbError}
+
+ )}
+ {firstUser && !dbError && !internalLoggedIn && (
+
+ {t('auth.firstUser')}
+
+ {t('auth.firstUserMessage')}{" "}
+
+ GitHub Issue
+ .
+
+
+ )}
+ {!registrationAllowed && !internalLoggedIn && (
+
+ {t('auth.registerTitle')}
+
+ {t('messages.registrationDisabled')}
+
+
+ )}
+ {totpRequired && (
+
+
+
{t('auth.twoFactorAuth')}
+
{t('auth.enterCode')}
+
+
+
+
+
setTotpCode(e.target.value.replace(/\D/g, ''))}
+ disabled={totpLoading}
+ className="text-center text-2xl tracking-widest font-mono"
+ autoComplete="one-time-code"
+ />
+
+ {t('auth.backupCode')}
+
+
+
+
+
+
+
+ )}
+
+ {(!internalLoggedIn && (!authLoading || !getCookie("jwt")) && !totpRequired) && (
+ <>
+
+
+
+ {oidcConfigured && (
+
+ )}
+
+
+
+ {tab === "login" ? t('auth.loginTitle') :
+ tab === "signup" ? t('auth.registerTitle') :
+ tab === "external" ? t('auth.loginWithExternal') :
+ t('auth.forgotPassword')}
+
+
+
+ {tab === "external" || tab === "reset" ? (
+
+ {tab === "external" && (
+ <>
+
+
{t('auth.loginWithExternalDesc')}
+
+
+ >
+ )}
+ {tab === "reset" && (
+ <>
+ {resetStep === "initiate" && (
+ <>
+
+
{t('auth.resetCodeDesc')}
+
+
+
+
+ setLocalUsername(e.target.value)}
+ disabled={resetLoading}
+ />
+
+
+
+ >
+ )}
+
+ {resetStep === "verify" && (
+ <>o
+
+
{t('auth.enterResetCode')} {localUsername}
+
+
+
+
+ setResetCode(e.target.value.replace(/\D/g, ''))}
+ disabled={resetLoading}
+ placeholder="000000"
+ />
+
+
+
+
+ >
+ )}
+
+ {resetSuccess && (
+ <>
+
+ {t('auth.passwordResetSuccess')}
+
+ {t('auth.passwordResetSuccessDesc')}
+
+
+
+ >
+ )}
+
+ {resetStep === "newPassword" && !resetSuccess && (
+ <>
+
+
{t('auth.enterNewPassword')} {localUsername}
+
+
+
+
+ setNewPassword(e.target.value)}
+ disabled={resetLoading}
+ autoComplete="new-password"
+ />
+
+
+
+ setConfirmPassword(e.target.value)}
+ disabled={resetLoading}
+ autoComplete="new-password"
+ />
+
+
+
+
+ >
+ )}
+ >
+ )}
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+
+
+ >
+ )}
+ {error && (
+
+ Error
+ {error}
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/src/ui/Mobile/MobileApp.tsx b/src/ui/Mobile/MobileApp.tsx
index ca4438e2..67bcffd1 100644
--- a/src/ui/Mobile/MobileApp.tsx
+++ b/src/ui/Mobile/MobileApp.tsx
@@ -1,57 +1,151 @@
-import React, {useRef, FC} from "react";
+import React, {useRef, FC, useState, useEffect} from "react";
import {Terminal} from "@/ui/Mobile/Apps/Terminal/Terminal.tsx";
import {TerminalKeyboard} from "@/ui/Mobile/Apps/Terminal/TerminalKeyboard.tsx";
import {BottomNavbar} from "@/ui/Mobile/Apps/Navigation/BottomNavbar.tsx";
import {LeftSidebar} from "@/ui/Mobile/Apps/Navigation/LeftSidebar.tsx";
+import {TabProvider, useTabs} from "@/ui/Mobile/Apps/Navigation/Tabs/TabContext.tsx";
+import {getUserInfo} from "@/ui/main-axios.ts";
+import {HomepageAuth} from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
-export const MobileApp: FC = () => {
- const terminalRef = useRef