mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
Enforce strict Effect tsgo migrations
This commit is contained in:
parent
64fb23e7d0
commit
f6878d4dd7
49 changed files with 5547 additions and 3250 deletions
|
|
@ -36,6 +36,7 @@ import {
|
|||
import { Dialog } from "@/components/ui/dialog";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import type { DocumentMetadata } from "@trustgraph/client";
|
||||
import { DateTime } from "effect";
|
||||
|
||||
function formatBytes(bytes: number): string {
|
||||
if (bytes === 0) return "0 B";
|
||||
|
|
@ -53,6 +54,10 @@ function guessKind(doc: DocumentMetadata): string {
|
|||
return kind.length > 0 ? kind : "--";
|
||||
}
|
||||
|
||||
function formatUnixTimestamp(seconds: number): string {
|
||||
return DateTime.formatLocal(DateTime.makeUnsafe(seconds * 1000));
|
||||
}
|
||||
|
||||
function resetUploadForm(form: UploadForm): UploadForm {
|
||||
return { ...form, file: null, title: "", tags: "", comments: "", uploading: false, dragOver: false, progress: null };
|
||||
}
|
||||
|
|
@ -242,7 +247,7 @@ function DocumentDetailDialog() {
|
|||
<h3 className="mb-1 flex items-center gap-1.5 text-xs font-medium uppercase tracking-wider text-fg-subtle">
|
||||
<Clock className="h-3 w-3" /> Created
|
||||
</h3>
|
||||
<p className="text-sm text-fg-muted">{new Date(doc.time * 1000).toLocaleString()}</p>
|
||||
<p className="text-sm text-fg-muted">{formatUnixTimestamp(doc.time)}</p>
|
||||
</div>
|
||||
)}
|
||||
{doc.metadata !== undefined && doc.metadata.length > 0 && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue