mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-16 21:31:10 -05:00
🐛 fix: Filter available protocols to exclude disabled ones in NodeForm
This commit is contained in:
parent
2b0cf9a46d
commit
982d2882e9
@ -128,8 +128,8 @@ export default function NodeForm(props: {
|
|||||||
const availableProtocols = useMemo(() => {
|
const availableProtocols = useMemo(() => {
|
||||||
if (!currentServer?.protocols) return [];
|
if (!currentServer?.protocols) return [];
|
||||||
|
|
||||||
return (currentServer.protocols as Array<{ type: ProtocolName; port?: number }>)
|
return currentServer.protocols
|
||||||
.filter((p) => p.type)
|
.filter((p) => p.enable !== false)
|
||||||
.map((p) => ({
|
.map((p) => ({
|
||||||
protocol: p.type,
|
protocol: p.type,
|
||||||
port: p.port,
|
port: p.port,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user