{
- if (terminal && !splitScreen) {
- terminal.focus();
+ useEffect(() => {
+ if (
+ isFitted &&
+ isVisible &&
+ isReady &&
+ !isConnecting &&
+ terminal &&
+ !splitScreen
+ ) {
+ const rafId = requestAnimationFrame(() => {
+ terminal.focus();
+ });
+ return () => cancelAnimationFrame(rafId);
}
- }}
- />
+ }, [isFitted, isVisible, isReady, isConnecting, terminal, splitScreen]);
-
+ return (
+
+
{
+ if (terminal && !splitScreen) {
+ terminal.focus();
+ }
+ }}
+ />
-
+
-
+
-
-
- );
- },
+
+
+
{
+ setShowSudoPasswordPopup(false);
+ if (webSocketRef.current && webSocketRef.current.readyState === WebSocket.OPEN) {
+ webSocketRef.current.send(JSON.stringify({ type: "input", data: password + "\n" }));
+ }
+ }}
+ onDismiss={() => setShowSudoPasswordPopup(false)}
+ />
+
+
+
+ );
+ },
);
const style = document.createElement("style");
diff --git a/src/ui/desktop/user/LanguageSwitcher.tsx b/src/ui/desktop/user/LanguageSwitcher.tsx
index 955369bb..9021ec82 100644
--- a/src/ui/desktop/user/LanguageSwitcher.tsx
+++ b/src/ui/desktop/user/LanguageSwitcher.tsx
@@ -21,6 +21,7 @@ const languages = [
{ code: "ru", name: "Russian", nativeName: "Русский" },
{ code: "fr", name: "French", nativeName: "Français" },
{ code: "it", name: "Italian", nativeName: "Italiano" },
+ { code: "ko", name: "Korean", nativeName: "한국어" },
];
export function LanguageSwitcher() {