mirror of
https://github.com/community-scripts/ProxmoxVE-Local.git
synced 2026-07-30 17:26:43 -04:00
* feat: implement comprehensive help system with contextual icons - Add HelpModal component with navigation sidebar and 7 help sections - Add HelpButton component for main header controls - Add ContextualHelpIcon component for contextual help throughout UI - Add help icons to all major UI sections: - Settings modals (Server Settings, General Settings) - Sync button with update system help - Tab headers (Available, Downloaded, Installed Scripts) - FilterBar and CategorySidebar - Add comprehensive help content covering: - Server Settings: PVE server management, auth types, color coding - General Settings: Save filters, GitHub integration, authentication - Sync Button: Script metadata syncing explanation - Available Scripts: Browsing, filtering, downloading - Downloaded Scripts: Local script management and updates - Installed Scripts: Auto-detection feature (primary focus), manual management - Update System: Automatic/manual update process, release notes - Improve VersionDisplay: remove 'Update Available' text, add 'Release Notes:' label - Make help icons more noticeable with increased size - Fix dark theme compatibility issues in help modal * fix: resolve linting errors in HelpModal component - Remove unused Filter import - Fix unescaped entities by replacing apostrophes and quotes with HTML entities - All linting errors resolved * feat: implement release notes modal system - Add getAllReleases API endpoint to fetch GitHub releases with notes - Create ReleaseNotesModal component with localStorage version tracking - Add sticky Footer component with release notes link - Make version badge clickable to open release notes - Auto-show modal after updates when version changes - Track last seen version in localStorage to prevent repeated shows - Highlight new version in modal when opened after update - Add manual access via footer and version badge clicks * fix: use nullish coalescing operator in ReleaseNotesModal - Replace logical OR (||) with nullish coalescing (??) operator - Fixes ESLint prefer-nullish-coalescing rule violation - Ensures build passes successfully
47 lines
1021 B
TypeScript
47 lines
1021 B
TypeScript
'use client';
|
|
|
|
import { useState } from 'react';
|
|
import { HelpModal } from './HelpModal';
|
|
import { Button } from './ui/button';
|
|
import { HelpCircle } from 'lucide-react';
|
|
|
|
interface ContextualHelpIconProps {
|
|
section: string;
|
|
className?: string;
|
|
size?: 'sm' | 'default';
|
|
tooltip?: string;
|
|
}
|
|
|
|
export function ContextualHelpIcon({
|
|
section,
|
|
className = '',
|
|
size = 'sm',
|
|
tooltip = 'Help'
|
|
}: ContextualHelpIconProps) {
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
const sizeClasses = size === 'sm'
|
|
? 'h-7 w-7 p-1.5'
|
|
: 'h-9 w-9 p-2';
|
|
|
|
return (
|
|
<>
|
|
<Button
|
|
onClick={() => setIsOpen(true)}
|
|
variant="ghost"
|
|
size="icon"
|
|
className={`${sizeClasses} text-muted-foreground hover:text-foreground hover:bg-muted ${className}`}
|
|
title={tooltip}
|
|
>
|
|
<HelpCircle className="w-4 h-4" />
|
|
</Button>
|
|
|
|
<HelpModal
|
|
isOpen={isOpen}
|
|
onClose={() => setIsOpen(false)}
|
|
initialSection={section}
|
|
/>
|
|
</>
|
|
);
|
|
}
|