{/* ── Header ── */}
{/* ── Tab content ── */}
- {activeTab === "rcon" ? (
- // flex-1 min-h-0: fills the remaining height in the h-full flex container
- // without overflowing. The RconConsole scrolls the log internally.
+ {(activeTab === "rcon" || activeTab === "logs" || activeTab === "mods") ? (
-
+ {activeTab === "rcon" && }
+ {activeTab === "logs" && }
+ {activeTab === "mods" && }
) : (
- {activeTab === "overview" &&
}
- {activeTab === "config" &&
}
- {activeTab === "logs" &&
}
- {activeTab === "mods" &&
}
- {activeTab === "backups" &&
}
+ {activeTab === "overview" &&
}
+ {activeTab === "config" &&
}
+ {activeTab === "backups" &&
}
{activeTab === "automation" &&
}
)}
diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx
index fe28e11..9fb93c8 100644
--- a/src/app/settings/page.tsx
+++ b/src/app/settings/page.tsx
@@ -2,16 +2,19 @@
import { useState, useEffect, useCallback } from "react";
import {
- Folder, Terminal, Info,
+ Folder, Terminal, Info, Archive,
FolderOpen, CheckCircle2, AlertCircle, Loader2,
Save, RefreshCw, ArrowUp, Bell, MessageSquare, Mail, Monitor, Send, Download,
- Server, Palette, Link, StopCircle, ToggleLeft, ToggleRight, Layers,
+ Server, Palette, Link, StopCircle, ToggleLeft, ToggleRight, Layers, Power, ShieldCheck,
} from "lucide-react";
import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";
+import {
+ Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
+} from "@/components/ui/select";
import {
Dialog, DialogContent, DialogDescription,
DialogFooter, DialogHeader, DialogTitle,
@@ -27,7 +30,9 @@ import {
import { runPerServerUpdateCheck, applyUpdateToServer } from "@/lib/update-utils";
import { check } from "@tauri-apps/plugin-updater";
import { getVersion } from "@tauri-apps/api/app";
-import { tauriCmd, type DirCheckResult, type ProtonUpdateInfo, type MigrateProgress } from "@/lib/tauri-commands";
+import { tempDir } from "@tauri-apps/api/path";
+import { tauriCmd, type DirCheckResult, type ProtonUpdateInfo, type MigrateProgress, type PortDef, type FirewallStatus } from "@/lib/tauri-commands";
+import { getServerFirewallPorts } from "@/lib/firewall-utils";
import { listen } from "@tauri-apps/api/event";
import {
applyTheme, applyThemeAccent, applyThemePreset,
@@ -81,6 +86,52 @@ function Section({
);
}
+function BackupSettingsSection() {
+ const [dismissed, setDismissed] = useState
(null);
+
+ useEffect(() => {
+ getAppSetting("full_backup_warning_dismissed").then(
+ (v) => setDismissed(v === "true")
+ ).catch(() => setDismissed(false));
+ }, []);
+
+ const toggle = async () => {
+ const next = !dismissed;
+ setDismissed(next);
+ try {
+ await setAppSetting("full_backup_warning_dismissed", String(next));
+ } catch (e) {
+ toast.error(`Failed to save backup setting: ${e}`);
+ setDismissed(!next);
+ }
+ };
+
+ return (
+
+
+
+
+ Hide full backup warning
+
+
+ When enabled, the size warning dialog is skipped when triggering a full backup.
+
+
+ {dismissed === null ? (
+
+ ) : (
+
+ )}
+
+
+ );
+}
+
// ---------------------------------------------------------------------------
// Icon-based toggle (matches the wizard's ToggleRow style)
// ---------------------------------------------------------------------------
@@ -266,7 +317,7 @@ function BaseDirMigrationSection() {
)}
@@ -343,7 +394,7 @@ function PathField({