Port Configuration
-
- {/* All ports except 5000 */}
- {ports
- .filter((p) => p.id !== "5000")
- .map((port) => (
-
-
- onTogglePort(port.id)}
- disabled={port.locked}
- />
-
- {port.locked && "🔒 "}
- Port {port.host}
- {port.protocol !== "tcp" && `/${port.protocol}`}
-
-
- {port.description && (
-
{port.description}
- )}
-
- ))}
+ {ports.map((port) => (
+
onTogglePort(port.id)}
+ />
+ ))}
-
- {/* Port 5000 with special warning — placed last */}
-
onTogglePort("5000")}
- onConfirm={onConfirm5000}
- />
);
}
diff --git a/docs/src/components/DockerComposeGenerator/config/config.yaml b/docs/src/components/DockerComposeGenerator/config/config.yaml
index 09b538281..22734a1bf 100644
--- a/docs/src/components/DockerComposeGenerator/config/config.yaml
+++ b/docs/src/components/DockerComposeGenerator/config/config.yaml
@@ -265,7 +265,8 @@ ports:
protocol: "tcp"
description: "Authenticated UI and API access (default HTTPS)"
defaultEnabled: true
- locked: true
+ warningContent: "This is the access port for Frigate. Closing it means you will no longer be able to access the instance."
+ warningWhen: "unchecked"
- id: "8554"
host: 8554
diff --git a/docs/src/components/DockerComposeGenerator/config/types.ts b/docs/src/components/DockerComposeGenerator/config/types.ts
index 6d9b048f0..87bcb608d 100644
--- a/docs/src/components/DockerComposeGenerator/config/types.ts
+++ b/docs/src/components/DockerComposeGenerator/config/types.ts
@@ -145,14 +145,10 @@ export interface PortConfig {
defaultEnabled: boolean;
/** Whether this port is locked (always enabled, cannot be toggled off) */
locked?: boolean;
- /** Whether this port requires a confirmation step before enabling */
- requiresConfirmation?: boolean;
/** Admonition type for the warning */
warningType?: "warning" | "danger";
/** Warning content (markdown) */
warningContent?: string;
- /** Confirmation checkbox label */
- confirmationLabel?: string;
- /** Cooldown in seconds before the confirmation checkbox becomes available */
- cooldownSeconds?: number;
+ /** When to show the warning: when the port is checked or unchecked */
+ warningWhen?: "checked" | "unchecked";
}
diff --git a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
index 994ac631a..72821be26 100644
--- a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
+++ b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
@@ -29,7 +29,6 @@ export function useConfigGenerator() {
return initial;
});
- const [port5000Confirmed, setPort5000Confirmed] = useState(false);
const [nvidiaGpuCount, setNvidiaGpuCount] = useState("all");
const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");
const [configPath, setConfigPath] = useState("");
@@ -69,13 +68,7 @@ export function useConfigGenerator() {
const togglePort = useCallback((portId: string) => {
const port = portMap.get(portId);
if (port?.locked) return;
- setPortEnabled((prev) => {
- const next = { ...prev, [portId]: !prev[portId] };
- if (portId === "5000" && !next[portId]) {
- setPort5000Confirmed(false);
- }
- return next;
- });
+ setPortEnabled((prev) => ({ ...prev, [portId]: !prev[portId] }));
}, []);
const isHardwareDisabled = useCallback(
@@ -149,7 +142,6 @@ export function useConfigGenerator() {
const lines: string[] = [];
for (const [id, enabled] of Object.entries(portEnabled)) {
if (!enabled) continue;
- if (id === "5000" && !port5000Confirmed) continue;
const p = portMap.get(id);
if (!p) continue;
const proto = p.protocol && p.protocol !== "tcp" ? `/${p.protocol}` : "";
@@ -157,7 +149,7 @@ export function useConfigGenerator() {
lines.push(` - "${p.host}:${p.container}${proto}"${comment}`);
}
return lines;
- }, [portEnabled, port5000Confirmed]);
+ }, [portEnabled]);
const selectedHardwareIds = useMemo(() => {
return Object.entries(hardwareEnabled)
@@ -195,11 +187,11 @@ export function useConfigGenerator() {
return {
deviceId, device, hardwareEnabled, portEnabled,
- port5000Confirmed, nvidiaGpuCount, nvidiaGpuDeviceId,
+ nvidiaGpuCount, nvidiaGpuDeviceId,
configPath, mediaPath, rtspPassword, timezone, shmSize,
shmSizeError, gpuDeviceIdError, configPathError, mediaPathError,
hasAnyHardware, generatedYaml,
- selectDevice, toggleHardware, togglePort, setPort5000Confirmed,
+ selectDevice, toggleHardware, togglePort,
handleShmSizeChange, handleConfigPathChange, handleMediaPathChange,
handleNvidiaGpuCountChange, handleNvidiaGpuDeviceIdChange,
setRtspPassword, setTimezone, isHardwareDisabled,
diff --git a/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts b/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts
deleted file mode 100644
index 253edca87..000000000
--- a/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { useState, useEffect, useCallback, useRef } from "react";
-
-/**
- * Hook for a countdown timer (e.g. cooldown before confirming port 5000).
- */
-export function useCooldown(initialSeconds: number) {
- const [remaining, setRemaining] = useState(0);
- const timerRef = useRef