feat: card attachments (#247)

* feat: add card attachment schema

* feat: setup s3 util funcs

* feat: add attachments router and repo funcs

* feat: add upload button

* feat: add thumbnails and attachment viewer

* feat: add download and delete button

* feat: add file viewer and downloads

* feat: update compose and readme

* chore: build lang

* feat: display attachments on public boards

* chore: update compiled translations
This commit is contained in:
Henry
2025-11-19 21:34:43 +00:00
committed by GitHub
parent af6490896a
commit b472c5ce93
45 changed files with 5120 additions and 581 deletions

View File

@@ -9,6 +9,7 @@ import LabelIcon from "~/components/LabelIcon";
import { useModal } from "~/providers/modal";
import { api } from "~/utils/api";
import ActivityList from "~/views/card/components/ActivityList";
import { AttachmentThumbnails } from "~/views/card/components/AttachmentThumbnails";
import Checklists from "~/views/card/components/Checklists";
export function CardModal({
@@ -126,11 +127,24 @@ export function CardModal({
<Editor
content={data.description}
readOnly
workspaceMembers={data?.list.board.workspace.members ?? []}
workspaceMembers={
data?.list.board.workspace.members ?? []
}
/>
</div>
</div>
)}
{data?.attachments &&
data.attachments.length > 0 &&
cardPublicId && (
<div className="mb-10 max-w-2xl">
<AttachmentThumbnails
attachments={data.attachments}
cardPublicId={cardPublicId}
isReadOnly
/>
</div>
)}
{data?.checklists && data.checklists.length > 0 && (
<Checklists
checklists={data.checklists}

View File

@@ -189,6 +189,7 @@ export default function PublicBoardView() {
members={[]}
description={card.description}
comments={card.comments ?? []}
attachments={card.attachments}
/>
</Link>
))}