From 9f316922c3212fcc3aae75be31a5cd547f1a5288 Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Wed, 13 May 2026 15:56:49 +0800 Subject: [PATCH] feat: show pinned hosts in quick actions card --- src/ui/dashboard/DashboardTab.tsx | 97 ++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/src/ui/dashboard/DashboardTab.tsx b/src/ui/dashboard/DashboardTab.tsx index 3d68802c..cadd4c56 100644 --- a/src/ui/dashboard/DashboardTab.tsx +++ b/src/ui/dashboard/DashboardTab.tsx @@ -276,10 +276,15 @@ function CountersBarCard({ function QuickActionsCard({ onOpenSingletonTab, + hosts, + onOpenTab, }: { onOpenSingletonTab: (type: TabType, pendingEvent?: string) => void; + hosts: Host[]; + onOpenTab: (host: Host, type: TabType) => void; }) { const { t } = useTranslation(); + const pinnedHosts = hosts.filter((h) => h.pin); return (
@@ -328,38 +333,64 @@ function QuickActionsCard({
- + ))}
-
- - {t("dashboard.adminSettings")} - - - {t("dashboardTab.manageUsersAndRoles")} - -
- - + ) : ( + <> + + + + )}
@@ -706,7 +737,7 @@ function CardItem({ /> )} {slot.id === "quick_actions" && ( - + )} {slot.id === "host_status" && ( )} {slot.id === "quick_actions" && ( - + )} {slot.id === "host_status" && (