refactor(cms): deduplicate shared admin components and fix studio batch completion

- fix(studio): stop markBatchDone infinite recursion so batches complete
- refactor(api): merge api-response into api and drop the duplicate module
- refactor(media): extract shared media loader and URL validator
- refactor(ui): extract shared LoadingSpinner for site and admin groups
- refactor(dates): consolidate raw date formatting into formatDate util
- refactor(logs): share a single generic log-list loader across tables
- refactor(theme): merge both ColorField components and reuse contrast helpers
- refactor(import): extract shared ImportErrorBanner and SearchInput
- chore(): remove dead theme-editor-tabs after inlining tab components
This commit is contained in:
openhands committed 2026-09-05 20:58:42 +02:00
1 parent b12e405b34
commit 8c12fc6c60
93 files changed
+1447 -1005

No files matched your search

@@ -15,6 +15,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Textarea } from "@/components/ui/textarea";
import { useServerAction } from "@/hooks/use-server-action";
import { formatDate } from "@/lib/format-date";
interface ThreadMessage {
key: string;
@@ -162,7 +163,7 @@ export function AdminHelpTicketDetail({
{msg.isStaff ? ` (${t("staffBadge")})` : ""}
</span>
<span className="text-[10px] text-muted-foreground">
{new Date(msg.createdAt).toLocaleString()}
{formatDate(new Date(msg.createdAt))}
</span>
</div>
<div
@@ -308,11 +309,11 @@ export function AdminHelpTicketDetail({
<CardContent className="space-y-2 text-xs text-muted-foreground">
<div className="flex justify-between gap-2">
<span>{t("colCreated")}</span>
<span>{new Date(ticket.createdAt).toLocaleString()}</span>
<span>{formatDate(new Date(ticket.createdAt))}</span>
</div>
<div className="flex justify-between gap-2">
<span>{t("colUpdated")}</span>
<span>{new Date(ticket.updatedAt).toLocaleString()}</span>
<span>{formatDate(new Date(ticket.updatedAt))}</span>
</div>
<div className="flex justify-between gap-2">
<span>{t("messageCountLabel")}</span>