fix: style fix. spacing DescItem
This commit is a style fix. * spacing DescItem component. * typo fix. * show file hash
This commit is contained in:
parent
9fb87d6a3c
commit
b79faf3ea9
@ -20,7 +20,11 @@ export function DescTagItem({
|
||||
}) {
|
||||
return <DescItem name={name} className={className}>
|
||||
{items.length === 0 ? "N/A" : items.map(
|
||||
(x) => <StyledLink key={x} to={`/search?allow_tag=${name}:${x}`}>{x}</StyledLink>
|
||||
(x, i) =>
|
||||
<>
|
||||
<StyledLink key={x} to={`/search?allow_tag=${name}:${x}`}>{x}</StyledLink>
|
||||
{i + 1 < items.length && <span className="">, </span>}
|
||||
</>
|
||||
)}
|
||||
</DescItem>;
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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) {
|
||||
|
@ -58,14 +58,14 @@ export function ContentInfoPage({ params }: ContentInfoPageProps) {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="grid gap-4 grid-cols-[repeat(auto_fill_300px)]">
|
||||
<DescTagItem name="artist" items={classifiedTags.artist} />
|
||||
<DescTagItem name="group" items={classifiedTags.group} />
|
||||
<DescTagItem name="series" items={classifiedTags.series} />
|
||||
<DescTagItem name="character" items={classifiedTags.character} />
|
||||
<DescItem name="Created At">{new Date(data.created_at).toLocaleString()}</DescItem>
|
||||
<DescItem name="Modified At">{new Date(data.modified_at).toLocaleString()}</DescItem>
|
||||
<DescTagItem name="Artist" items={classifiedTags.artist} />
|
||||
<DescTagItem name="Group" items={classifiedTags.group} />
|
||||
<DescTagItem name="Series" items={classifiedTags.series} />
|
||||
<DescTagItem name="Character" items={classifiedTags.character} />
|
||||
<DescItem name="Created At / Modified At">{new Date(data.created_at).toLocaleString()} / {new Date(data.modified_at).toLocaleString()}</DescItem>
|
||||
<DescItem name="Filehash">{data.content_hash}</DescItem>
|
||||
<DescItem name="Path">{`${data.basepath}/${data.filename}`}</DescItem>
|
||||
<DescItem name="Page Count">{JSON.stringify(data.additional)}</DescItem>
|
||||
<DescItem name="Page Count">{data.pagenum}</DescItem>
|
||||
</div>
|
||||
<div className="grid mt-4">
|
||||
<span className="text-muted-foreground text-sm">Tags</span>
|
||||
|
Loading…
Reference in New Issue
Block a user