Some checks failed
Build and Push Docker Image to Gitea / build-and-push (push) Failing after 53s
- Add LogViewer component with syntax highlighting and auto-scroll - Add LogControls for play/pause, auto-scroll, refresh, download, clear - Add LogSearch component with search highlighting - Add Input UI component - Fix TypeScript type issues in ProcessCard and types.ts - Fix XML-RPC client type issues - Add force-dynamic to layout to prevent SSR issues with client components - Add mounted state to Navbar for theme toggle hydration - Add custom 404 page Components added: - components/logs/LogViewer.tsx - Main log viewer with real-time display - components/logs/LogControls.tsx - Control panel for log viewing - components/logs/LogSearch.tsx - Search input for filtering logs - components/ui/input.tsx - Reusable input component Fixes: - ProcessStateCode type casting in ProcessCard - XML-RPC client options type (use any to avoid library type issues) - canStartProcess/canStopProcess type assertions - Dynamic rendering to prevent SSR hydration issues 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 lines
982 B
TypeScript
37 lines
982 B
TypeScript
'use client';
|
|
|
|
import { Search, X } from 'lucide-react';
|
|
import { Input } from '@/components/ui/input';
|
|
import { Button } from '@/components/ui/button';
|
|
|
|
interface LogSearchProps {
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
placeholder?: string;
|
|
}
|
|
|
|
export function LogSearch({ value, onChange, placeholder = 'Search logs...' }: LogSearchProps) {
|
|
return (
|
|
<div className="relative flex-1 max-w-md">
|
|
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
|
<Input
|
|
type="text"
|
|
placeholder={placeholder}
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
className="pl-9 pr-9"
|
|
/>
|
|
{value && (
|
|
<Button
|
|
variant="ghost"
|
|
size="sm"
|
|
onClick={() => onChange('')}
|
|
className="absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 p-0"
|
|
>
|
|
<X className="h-4 w-4" />
|
|
</Button>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|