From b79faf3ea96dc8832de0d3a3a57ba8088026ec9a Mon Sep 17 00:00:00 2001 From: monoid Date: Tue, 8 Oct 2024 02:19:50 +0900 Subject: [PATCH] fix: style fix. spacing DescItem This commit is a style fix. * spacing DescItem component. * typo fix. * show file hash --- .../client/src/components/gallery/DescItem.tsx | 6 +++++- .../client/src/components/gallery/GalleryCard.tsx | 2 +- packages/client/src/hook/useGalleryDoc.ts | 2 +- packages/client/src/page/contentInfoPage.tsx | 14 +++++++------- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/client/src/components/gallery/DescItem.tsx b/packages/client/src/components/gallery/DescItem.tsx index 566e889..cd6b02d 100644 --- a/packages/client/src/components/gallery/DescItem.tsx +++ b/packages/client/src/components/gallery/DescItem.tsx @@ -20,7 +20,11 @@ export function DescTagItem({ }) { return {items.length === 0 ? "N/A" : items.map( - (x) => {x} + (x, i) => + <> + {x} + {i + 1 < items.length && , } + )} ; } diff --git a/packages/client/src/components/gallery/GalleryCard.tsx b/packages/client/src/components/gallery/GalleryCard.tsx index 9381f02..ea49995 100644 --- a/packages/client/src/components/gallery/GalleryCard.tsx +++ b/packages/client/src/components/gallery/GalleryCard.tsx @@ -1,4 +1,4 @@ -import type { Document } from "dbtype/api"; +import type { Document } from "dbtype"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card.tsx"; import TagBadge from "@/components/gallery/TagBadge.tsx"; import { Fragment, useLayoutEffect, useRef, useState } from "react"; diff --git a/packages/client/src/hook/useGalleryDoc.ts b/packages/client/src/hook/useGalleryDoc.ts index 54a7dce..2708d70 100644 --- a/packages/client/src/hook/useGalleryDoc.ts +++ b/packages/client/src/hook/useGalleryDoc.ts @@ -1,5 +1,5 @@ import useSWR from "swr"; -import type { Document } from "dbtype/api"; +import type { Document } from "dbtype"; import { fetcher } from "./fetcher"; export function useGalleryDoc(id: string) { diff --git a/packages/client/src/page/contentInfoPage.tsx b/packages/client/src/page/contentInfoPage.tsx index 5bdb394..9a86480 100644 --- a/packages/client/src/page/contentInfoPage.tsx +++ b/packages/client/src/page/contentInfoPage.tsx @@ -58,14 +58,14 @@ export function ContentInfoPage({ params }: ContentInfoPageProps) {
- - - - - {new Date(data.created_at).toLocaleString()} - {new Date(data.modified_at).toLocaleString()} + + + + + {new Date(data.created_at).toLocaleString()} / {new Date(data.modified_at).toLocaleString()} + {data.content_hash} {`${data.basepath}/${data.filename}`} - {JSON.stringify(data.additional)} + {data.pagenum}
Tags