From e386d5fa19467131e34ccfbcbee2f462b985dfc5 Mon Sep 17 00:00:00 2001 From: monster Date: Tue, 1 Dec 2026 17:16:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E5=AE=89=E5=85=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E8=B5=84=E6=BA=90=E6=9D=83=E9=99=90=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BD=A9=E8=89=B2=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/src/pages/admin/security-page.tsx | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/monkeyai/web/src/pages/admin/security-page.tsx b/monkeyai/web/src/pages/admin/security-page.tsx index cb1aa95fd..e4c16aefc 100644 --- a/monkeyai/web/src/pages/admin/security-page.tsx +++ b/monkeyai/web/src/pages/admin/security-page.tsx @@ -1,3 +1,5 @@ +import { BanIcon, CheckmarkCircle02Icon, CircleQuestionMarkIcon } from "@hugeicons/core-free-icons" +import { HugeiconsIcon } from "@hugeicons/react" import { createContext, useContext, useEffect, useRef, useState } from "react" import { useTranslation } from "react-i18next" import { Navigate } from "react-router-dom" @@ -40,6 +42,23 @@ import { api } from "@/lib/api" import { Button } from "@/components/ui/button" type MemberPolicy = "allow" | "approval" | "deny" + +const policyIcons = { + allow: { icon: CheckmarkCircle02Icon, color: "!text-green-700 dark:!text-green-400" }, + approval: { icon: CircleQuestionMarkIcon, color: "!text-yellow-700 dark:!text-yellow-400" }, + deny: { icon: BanIcon, color: "!text-red-700 dark:!text-red-400" }, +} as const + +function MemberPolicyLabel({ policy, label }: { policy: MemberPolicy; label: string }) { + const { icon, color } = policyIcons[policy] + return ( + + + ) +} + type MemberResource = "models" | "knowledgeBases" | "skills" | "experts" | "mcp" | "rules" @@ -116,7 +135,9 @@ function MemberPolicyOption({ className="min-w-28" aria-label={label} > - + + + {items.map((item) => ( - {item.label} + ))}