fix: remove 9 unused variables across multiple files
Files fixed: - DesktopApp.tsx: Removed _nextView parameter - TerminalWindow.tsx: Removed minimizeWindow - Mobile Host.tsx: Removed Server import - Mobile LeftSidebar.tsx: Removed setHostsLoading, err in catch - Desktop LeftSidebar.tsx: Removed getCookie, setCookie, onSelectView, getView, setHostsLoading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ export function TerminalWindow({
|
|||||||
executeCommand,
|
executeCommand,
|
||||||
}: TerminalWindowProps) {
|
}: TerminalWindowProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { closeWindow, minimizeWindow, maximizeWindow, focusWindow, windows } =
|
const { closeWindow, maximizeWindow, focusWindow, windows } =
|
||||||
useWindowManager();
|
useWindowManager();
|
||||||
const terminalRef = React.useRef<any>(null);
|
const terminalRef = React.useRef<any>(null);
|
||||||
const resizeTimeoutRef = React.useRef<NodeJS.Timeout | null>(null);
|
const resizeTimeoutRef = React.useRef<NodeJS.Timeout | null>(null);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ function AppContent() {
|
|||||||
localStorage.setItem("topNavbarOpen", JSON.stringify(isTopbarOpen));
|
localStorage.setItem("topNavbarOpen", JSON.stringify(isTopbarOpen));
|
||||||
}, [isTopbarOpen]);
|
}, [isTopbarOpen]);
|
||||||
|
|
||||||
const handleSelectView = (_nextView: string) => {
|
const handleSelectView = () => {
|
||||||
// View switching is now handled by tabs context
|
// View switching is now handled by tabs context
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { ChevronUp, User2, HardDrive, Menu, ChevronRight } from "lucide-react";
|
import { ChevronUp, User2, HardDrive, Menu, ChevronRight } from "lucide-react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import { isElectron, logoutUser } from "@/ui/main-axios.ts";
|
||||||
getCookie,
|
|
||||||
setCookie,
|
|
||||||
isElectron,
|
|
||||||
logoutUser,
|
|
||||||
} from "@/ui/main-axios.ts";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
@@ -63,8 +58,6 @@ interface SSHHost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface SidebarProps {
|
interface SidebarProps {
|
||||||
onSelectView: (view: string) => void;
|
|
||||||
getView?: () => string;
|
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
isAdmin?: boolean;
|
isAdmin?: boolean;
|
||||||
username?: string | null;
|
username?: string | null;
|
||||||
@@ -87,8 +80,6 @@ async function handleLogout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function LeftSidebar({
|
export function LeftSidebar({
|
||||||
onSelectView,
|
|
||||||
getView,
|
|
||||||
disabled,
|
disabled,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
username,
|
username,
|
||||||
@@ -149,7 +140,7 @@ export function LeftSidebar({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
||||||
const [hostsLoading, setHostsLoading] = useState(false);
|
const [hostsLoading] = useState(false);
|
||||||
const [hostsError, setHostsError] = useState<string | null>(null);
|
const [hostsError, setHostsError] = useState<string | null>(null);
|
||||||
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
|
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
|
||||||
import { Button } from "@/components/ui/button.tsx";
|
import { Button } from "@/components/ui/button.tsx";
|
||||||
import { ButtonGroup } from "@/components/ui/button-group.tsx";
|
import { ButtonGroup } from "@/components/ui/button-group.tsx";
|
||||||
import { Server, Terminal } from "lucide-react";
|
import { Terminal } from "lucide-react";
|
||||||
import { getServerStatusById } from "@/ui/main-axios.ts";
|
import { getServerStatusById } from "@/ui/main-axios.ts";
|
||||||
import { useTabs } from "@/ui/Mobile/Apps/Navigation/Tabs/TabContext.tsx";
|
import { useTabs } from "@/ui/Mobile/Apps/Navigation/Tabs/TabContext.tsx";
|
||||||
import type { HostProps } from "../../../../../types/index.js";
|
import type { HostProps } from "../../../../../types/index.js";
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export function LeftSidebar({
|
|||||||
}: LeftSidebarProps) {
|
}: LeftSidebarProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
||||||
const [hostsLoading, setHostsLoading] = useState(false);
|
const [hostsLoading] = useState(false);
|
||||||
const [hostsError, setHostsError] = useState<string | null>(null);
|
const [hostsError, setHostsError] = useState<string | null>(null);
|
||||||
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
@@ -90,7 +90,7 @@ export function LeftSidebar({
|
|||||||
setHosts(newHosts);
|
setHosts(newHosts);
|
||||||
prevHostsRef.current = newHosts;
|
prevHostsRef.current = newHosts;
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch {
|
||||||
setHostsError(t("leftSidebar.failedToLoadHosts"));
|
setHostsError(t("leftSidebar.failedToLoadHosts"));
|
||||||
}
|
}
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|||||||
Reference in New Issue
Block a user