"use client" import { useState, useEffect } from "react" import { Button } from "./ui/button" import { Dialog, DialogContent } from "./ui/dialog" import { X, Sparkles, Link2, Shield, Zap, HardDrive, Gauge, Wrench, Settings } from "lucide-react" import { Checkbox } from "./ui/checkbox" const APP_VERSION = "1.0.1" // Sync with AppImage/package.json interface ReleaseNote { date: string changes: { added?: string[] changed?: string[] fixed?: string[] } } export const CHANGELOG: Record = { "1.0.1": { date: "November 11, 2025", changes: { added: [ "Proxy Support - Access ProxMenux through reverse proxies with full functionality", "Authentication System - Secure your dashboard with password protection", "PCIe Link Speed Detection - View NVMe drive connection speeds and detect performance issues", "Enhanced Storage Display - Better formatting for disk sizes (auto-converts GB to TB when needed)", "SATA/SAS Information - View detailed interface information for all storage devices", "Two-Factor Authentication (2FA) - Enhanced security with TOTP support", "Health Monitoring System - Comprehensive system health checks with dismissible warnings", "Release Notes Modal - Automatic notification of new features and improvements", ], changed: [ "Optimized VM & LXC page - Reduced CPU usage by 85% through intelligent caching", "Storage metrics now separate local and remote storage for clarity", "Update warnings now appear only after 365 days instead of 30 days", "API intervals staggered to distribute server load (23s and 37s)", ], fixed: [ "Fixed dark mode text contrast issues in various components", "Corrected storage calculation discrepancies between Overview and Storage pages", "Resolved JSON stringify error in VM control actions", "Improved IP address fetching for LXC containers", ], }, }, "1.0.0": { date: "October 15, 2025", changes: { added: [ "Initial release of ProxMenux Monitor", "Real-time system monitoring dashboard", "Storage management with SMART health monitoring", "Network metrics and bandwidth tracking", "VM & LXC container management", "Hardware information display", "System logs viewer with filtering", ], }, }, } const CURRENT_VERSION_FEATURES = [ { icon: , text: "Proxy Support - Access ProxMenux through reverse proxies with full functionality", }, { icon: , text: "Two-Factor Authentication (2FA) - Enhanced security with TOTP support for login protection", }, { icon: , text: "Performance Improvements - Optimized loading times and reduced CPU usage by 85%", }, { icon: , text: "Storage Enhancements - Improved disk space consumption display with local and remote storage separation", }, { icon: , text: "PCIe Link Speed Detection - View NVMe drive connection speeds and identify performance bottlenecks", }, { icon: , text: "Hardware Page Improvements - Enhanced hardware information display with detailed PCIe and interface data", }, { icon: , text: "New Settings Page - Centralized configuration for authentication, optimizations, and system preferences", }, ] interface ReleaseNotesModalProps { open: boolean onClose: () => void } export function ReleaseNotesModal({ open, onClose }: ReleaseNotesModalProps) { const [dontShowAgain, setDontShowAgain] = useState(false) const handleClose = () => { if (dontShowAgain) { localStorage.setItem("proxmenux-last-seen-version", APP_VERSION) } onClose() } return (

What's New in Version {APP_VERSION}

We've added exciting new features and improvements to make ProxMenux Monitor even better!

{CURRENT_VERSION_FEATURES.map((feature, index) => (
{feature.icon}

{feature.text}

))}
setDontShowAgain(checked as boolean)} />
) } export function useVersionCheck() { const [showReleaseNotes, setShowReleaseNotes] = useState(false) useEffect(() => { const lastSeenVersion = localStorage.getItem("proxmenux-last-seen-version") if (lastSeenVersion !== APP_VERSION) { setShowReleaseNotes(true) } }, []) return { showReleaseNotes, setShowReleaseNotes } } export { APP_VERSION }