feat: enhance server stats widgets and fix TypeScript/ESLint errors #394

Merged
ZacharyZcR merged 50 commits from feature-server-stats-customization into dev-1.8.0 2025-10-10 03:48:34 +00:00
6 changed files with 3 additions and 6 deletions
Showing only changes of commit c19dbbd8bd - Show all commits

View File

@@ -12,7 +12,7 @@ interface DiskWidgetProps {
metricsHistory: ServerMetrics[];
}
export function DiskWidget({ metrics, metricsHistory }: DiskWidgetProps) {
export function DiskWidget({ metrics }: DiskWidgetProps) {
const { t } = useTranslation();
// Prepare radial chart data

View File

@@ -4,7 +4,6 @@ import { HomepageUpdateLog } from "@/ui/Desktop/Homepage/HompageUpdateLog.tsx";
import { HomepageAlertManager } from "@/ui/Desktop/Homepage/HomepageAlertManager.tsx";
import { Button } from "@/components/ui/button.tsx";
import { getUserInfo, getDatabaseHealth, getCookie } from "@/ui/main-axios.ts";
import { useTranslation } from "react-i18next";
interface HomepageProps {
onSelectView: (view: string) => void;

View File

@@ -17,7 +17,7 @@ export function HomepageAlertManager({
const { t } = useTranslation();
const [alerts, setAlerts] = useState<TermixAlert[]>([]);
const [currentAlertIndex, setCurrentAlertIndex] = useState(0);
const [loading, setLoading] = useState(false);
const [, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
useEffect(() => {

View File

@@ -19,7 +19,6 @@ import {
completePasswordReset,
getOIDCAuthorizeUrl,
verifyTOTPLogin,
setCookie,
getCookie,
getServerConfig,
isElectron,

View File

@@ -66,7 +66,7 @@ export function HomepageUpdateLog({ loggedIn }: HomepageUpdateLogProps) {
setVersionInfo(versionRes);
setError(null);
})
.catch((err) => {
.catch(() => {
setError(t("common.failedToFetchUpdateInfo"));
})
.finally(() => setLoading(false));

View File

@@ -19,7 +19,6 @@ import {
completePasswordReset,
getOIDCAuthorizeUrl,
verifyTOTPLogin,
setCookie,
getCookie,
logoutUser,
isElectron,