Update security.tsx

This commit is contained in:
MacRimi
2026-02-14 16:39:24 +01:00
parent 1da1c178d0
commit ace4d83789

View File

@@ -10,7 +10,7 @@ import {
Trash2, RefreshCw, Clock, ShieldCheck, Globe, FileKey, AlertTriangle, Trash2, RefreshCw, Clock, ShieldCheck, Globe, FileKey, AlertTriangle,
Flame, Bug, Search, Download, Power, PowerOff, Plus, Minus, Activity, Settings, Ban, Flame, Bug, Search, Download, Power, PowerOff, Plus, Minus, Activity, Settings, Ban,
FileText, Printer, Play, BarChart3, TriangleAlert, ChevronDown, ArrowDownLeft, ArrowUpRight, FileText, Printer, Play, BarChart3, TriangleAlert, ChevronDown, ArrowDownLeft, ArrowUpRight,
ChevronRight, Network, Zap, ChevronRight, Network, Zap, Pencil, Check, X,
} from "lucide-react" } from "lucide-react"
import { getApiUrl, fetchApi } from "../lib/api-config" import { getApiUrl, fetchApi } from "../lib/api-config"
import { TwoFactorSetup } from "./two-factor-setup" import { TwoFactorSetup } from "./two-factor-setup"
@@ -90,6 +90,12 @@ export function Security() {
const [addingRule, setAddingRule] = useState(false) const [addingRule, setAddingRule] = useState(false)
const [deletingRuleIdx, setDeletingRuleIdx] = useState<number | null>(null) const [deletingRuleIdx, setDeletingRuleIdx] = useState<number | null>(null)
const [expandedRuleKey, setExpandedRuleKey] = useState<string | null>(null) const [expandedRuleKey, setExpandedRuleKey] = useState<string | null>(null)
const [editingRuleKey, setEditingRuleKey] = useState<string | null>(null)
const [editRule, setEditRule] = useState({
direction: "IN", action: "ACCEPT", protocol: "tcp",
dport: "", sport: "", source: "", iface: "", comment: "", level: "host",
})
const [savingRule, setSavingRule] = useState(false)
// Security Tools state // Security Tools state
const [toolsLoading, setToolsLoading] = useState(true) const [toolsLoading, setToolsLoading] = useState(true)