From cc6abf58ac2ec90570d2b969e8df6ee09a7dec58 Mon Sep 17 00:00:00 2001 From: Tola Leng Date: Fri, 8 Aug 2025 15:39:57 +0700 Subject: [PATCH] Remove Quick Actions button and dialog - Remove the QuickActionsDialog component and its associated file from the dashboard. --- .../src/components/dashboard/Header.tsx | 24 +-- .../dashboard/QuickActionsDialog.tsx | 145 ------------------ 2 files changed, 4 insertions(+), 165 deletions(-) delete mode 100644 application/src/components/dashboard/QuickActionsDialog.tsx diff --git a/application/src/components/dashboard/Header.tsx b/application/src/components/dashboard/Header.tsx index c937d2e..9c8888e 100644 --- a/application/src/components/dashboard/Header.tsx +++ b/application/src/components/dashboard/Header.tsx @@ -1,15 +1,13 @@ - import { Button } from "@/components/ui/button"; import { AuthUser } from "@/services/authService"; import { useTheme } from "@/contexts/ThemeContext"; -import { Moon, PanelLeft, PanelLeftClose, Sun, Globe, FileText, Github, Twitter, MessageSquare, Bell, User, Settings, LogOut, Grid3x3 } from "lucide-react"; +import { Moon, PanelLeft, PanelLeftClose, Sun, Globe, FileText, Github, Twitter, MessageSquare, Bell, User, Settings, LogOut } from "lucide-react"; import { useLanguage } from "@/contexts/LanguageContext"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuSeparator } from "@/components/ui/dropdown-menu"; import { useEffect, useState } from "react"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { useNavigate } from "react-router-dom"; import { useSystemSettings } from "@/hooks/useSystemSettings"; -import QuickActionsDialog from "./QuickActionsDialog"; interface HeaderProps { currentUser: AuthUser | null; @@ -29,7 +27,6 @@ export const Header = ({ const [greeting, setGreeting] = useState(""); const { systemName } = useSystemSettings(); const navigate = useNavigate(); - const [quickActionsOpen, setQuickActionsOpen] = useState(false); // Set greeting based on time of day useEffect(() => { @@ -53,7 +50,7 @@ export const Header = ({ // Log avatar data for debugging useEffect(() => { if (currentUser) { - // console.log("Avatar URL in Header:", currentUser.avatar); + //console.log("Avatar URL in Header:", currentUser.avatar); } }, [currentUser]); @@ -66,7 +63,7 @@ export const Header = ({ } else { avatarUrl = currentUser.avatar; } - // console.log("Final avatar URL:", avatarUrl); + console.log("Final avatar URL:", avatarUrl); } return ( @@ -91,16 +88,6 @@ export const Header = ({ {sidebarCollapsed ? : } - {/* Quick Actions Button */} - -

{greeting}, {currentUser?.name || currentUser?.email?.split('@')[0] || 'User'} 👋 ✨

@@ -162,7 +149,7 @@ export const Header = ({ variant="outline" size="icon" className="rounded-full w-8 h-8 border-border" - onClick={() => window.open("https://x.com/checkcle_oss", "_blank")} + onClick={() => window.open("https://x.com/checkcle_oss)", "_blank")} > X (Twitter) @@ -223,9 +210,6 @@ export const Header = ({ - - {/* Quick Actions Dialog */} - ); }; \ No newline at end of file diff --git a/application/src/components/dashboard/QuickActionsDialog.tsx b/application/src/components/dashboard/QuickActionsDialog.tsx deleted file mode 100644 index 6bd6a90..0000000 --- a/application/src/components/dashboard/QuickActionsDialog.tsx +++ /dev/null @@ -1,145 +0,0 @@ - -import React from 'react'; -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, - DialogClose -} from "@/components/ui/dialog"; -import { Button } from "@/components/ui/button"; -import { X } from "lucide-react"; -import { useLanguage } from "@/contexts/LanguageContext"; - -interface QuickActionsDialogProps { - isOpen: boolean; - setIsOpen: (open: boolean) => void; -} - -export const QuickActionsDialog: React.FC = ({ isOpen, setIsOpen }) => { - const { t } = useLanguage(); - - return ( - - - - - Close - - - {t('quickActions')} - - {t('quickActionsDescription')} - - - -
- {/* Website Monitoring Card */} -
-

{t('monitorWebsite')}

-

- {t('monitorWebsiteDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('monitorMultipleEndpoints')}
  • -
  • {t('trackResponseTimes')}
  • -
  • {t('setCustomAlerts')}
  • -
-
-
- - {/* Server Monitoring Card */} -
-

{t('monitorServer')}

-

- {t('monitorServerDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('monitorCPURam')}
  • -
  • {t('trackNetworkMetrics')}
  • -
  • {t('viewProcesses')}
  • -
-
-
- - {/* SSL Certificate Card */} -
-

{t('sslCertificate')}

-

- {t('sslCertificateDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('trackSSLExpiration')}
  • -
  • {t('getEarlyRenewal')}
  • -
  • {t('monitorMultipleDomains')}
  • -
-
-
- - {/* Incidents Management Card */} -
-

{t('incidentsManagement')}

-

- {t('incidentsManagementDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('createTrackIncidents')}
  • -
  • {t('assignIncidents')}
  • -
  • {t('monitorResolution')}
  • -
-
-
- - {/* Operational Status Card */} -
-

{t('operationalStatus')}

-

- {t('operationalStatusDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('createCustomStatus')}
  • -
  • {t('displayRealTime')}
  • -
  • {t('shareIncidentUpdates')}
  • -
-
-
- - {/* Reports & Analytics Card */} -
-

{t('reportsAnalytics')}

-

- {t('reportsAnalyticsDesc')} -

-
-

{t('quickTips')}:

-
    -
  • {t('generateUptimeReports')}
  • -
  • {t('analyzePerformance')}
  • -
  • {t('exportMonitoringData')}
  • -
-
-
-
- -
- -
-
-
- ); -}; - -export default QuickActionsDialog; \ No newline at end of file