diff --git a/webui/src/App.tsx b/webui/src/App.tsx
index fd398e63f..02e7f46ef 100644
--- a/webui/src/App.tsx
+++ b/webui/src/App.tsx
@@ -8,10 +8,11 @@ import {
useState,
type ReactNode,
} from "react";
-import { Eye, EyeOff, Moon, ShieldCheck, Sun, X } from "lucide-react";
-import { useTranslation } from "react-i18next";
+import { ArrowRight, ChevronDown, Eye, EyeOff, Moon, ShieldCheck, Sun, X } from "lucide-react";
+import { Trans, useTranslation } from "react-i18next";
import { channelUiPresentation } from "@/channel-plugins/registry";
import { Sidebar } from "@/components/Sidebar";
+import { LanguageSwitcher } from "@/components/LanguageSwitcher";
import { SidebarResizeHandle, SIDEBAR_MIN_WIDTH, SIDEBAR_MAX_WIDTH } from "@/components/SidebarResizeHandle";
import { matchSidebarShortcut } from "@/lib/sidebar-shortcuts";
import type { SidebarDeleteItem } from "@/components/ChatList";
@@ -75,6 +76,7 @@ import type {
} from "@/lib/types";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
+import { Disclosure } from "@/components/ui/disclosure";
import {
fetchPairingRequests,
fetchSettings,
@@ -364,10 +366,17 @@ function AuthForm({
);
const errorMessage = validationError ? t(`app.auth.${validationError}`) : null;
+ useEffect(() => {
+ if (!validationError) return;
+ const timeout = window.setTimeout(() => setValidationError(null), 3_000);
+ return () => window.clearTimeout(timeout);
+ }, [validationError]);
+
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
const secret = value.trim();
if (!secret) {
+ setValue("");
setValidationError("required");
inputRef.current?.focus();
return;
@@ -377,82 +386,117 @@ function AuthForm({
};
return (
-
+
);
}
diff --git a/webui/src/components/LanguageSwitcher.tsx b/webui/src/components/LanguageSwitcher.tsx
index c2d5bfc3c..4a2b8d38e 100644
--- a/webui/src/components/LanguageSwitcher.tsx
+++ b/webui/src/components/LanguageSwitcher.tsx
@@ -1,17 +1,31 @@
+import { useState } from "react";
import { useTranslation } from "react-i18next";
import { currentLocale, setAppLanguage } from "@/i18n";
import { supportedLocales, type SupportedLocale } from "@/i18n/config";
+import { cn } from "@/lib/utils";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
-export function LanguageSwitcher() {
+export function LanguageSwitcher({ className }: { className?: string }) {
const { t } = useTranslation();
+ const [pointerFocus, setPointerFocus] = useState(false);
return (