style: format code with prettier
Local Build and Deploy / deploy (push) Successful in 49s

This commit is contained in:
openhands committed 2026-07-12 21:07:34 +02:00
1 parent e85e4d74ea
commit 2e4ed76121
378 files changed
+22404 -20686

No files matched your search

+27 -31
View File
@@ -1,37 +1,37 @@
import { MessageSquare, Terminal } from 'lucide-react'
import Link from 'next/link'
import { Badge } from '@/components/ui/badge'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { MessageSquare, Terminal } from "lucide-react";
import Link from "next/link";
import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
interface ChatMessage {
id: number
roomId: number
timestamp: number
message: string
id: number;
roomId: number;
timestamp: number;
message: string;
}
interface CommandEntry {
id: number
timestamp: number
command: string
params: string
succes: string
id: number;
timestamp: number;
command: string;
params: string;
succes: string;
}
interface UserActivityLogProps {
chatLogs: ChatMessage[]
commandLogs: CommandEntry[]
chatLogs: ChatMessage[];
commandLogs: CommandEntry[];
}
function formatTime(ts: number) {
if (!ts) return '-'
const d = new Date(ts * 1000)
if (!ts) return "-";
const d = new Date(ts * 1000);
return d.toLocaleString(undefined, {
day: '2-digit',
month: 'short',
hour: '2-digit',
minute: '2-digit',
})
day: "2-digit",
month: "short",
hour: "2-digit",
minute: "2-digit",
});
}
export function UserActivityLog({ chatLogs, commandLogs }: UserActivityLogProps) {
@@ -59,9 +59,7 @@ export function UserActivityLog({ chatLogs, commandLogs }: UserActivityLogProps)
>
Room #{log.roomId}
</Link>
<span className="text-xs text-muted-foreground">
{formatTime(log.timestamp)}
</span>
<span className="text-xs text-muted-foreground">{formatTime(log.timestamp)}</span>
</div>
<p className="break-words">{log.message}</p>
</div>
@@ -90,14 +88,12 @@ export function UserActivityLog({ chatLogs, commandLogs }: UserActivityLogProps)
<code className="font-mono text-xs font-bold">:{log.command}</code>
<div className="flex items-center gap-2">
<Badge
variant={log.succes === 'yes' ? 'default' : 'destructive'}
variant={log.succes === "yes" ? "default" : "destructive"}
className="text-[10px]"
>
{log.succes === 'yes' ? 'OK' : 'FAIL'}
{log.succes === "yes" ? "OK" : "FAIL"}
</Badge>
<span className="text-xs text-muted-foreground">
{formatTime(log.timestamp)}
</span>
<span className="text-xs text-muted-foreground">{formatTime(log.timestamp)}</span>
</div>
</div>
{log.params && (
@@ -110,5 +106,5 @@ export function UserActivityLog({ chatLogs, commandLogs }: UserActivityLogProps)
</CardContent>
</Card>
</div>
)
);
}