Merge branch 'main' into feat/laka-257

This commit is contained in:
Henry
2025-11-30 23:00:47 +00:00
committed by GitHub
3 changed files with 47 additions and 36 deletions

View File

@@ -34,7 +34,7 @@ See our [roadmap](https://kan.bn/kan/roadmap) for upcoming features.
## Screenshot 👁️ ## Screenshot 👁️
<img width="1507" alt="hero-dark" src="https://github.com/user-attachments/assets/5f7b6ad3-f31d-4b45-93dc-0132b3f2afd4" /> <img width="1507" alt="hero-dark" src="https://github.com/user-attachments/assets/8490104a-cd5d-49de-afc2-152fd8a93119" />
## Made With 🛠️ ## Made With 🛠️
@@ -171,7 +171,7 @@ pnpm dev
| `NEXT_PUBLIC_STORAGE_URL` | Storage service URL | For file uploads | `https://storage.kanbn.com` | | `NEXT_PUBLIC_STORAGE_URL` | Storage service URL | For file uploads | `https://storage.kanbn.com` |
| `NEXT_PUBLIC_STORAGE_DOMAIN` | Storage domain name | For file uploads | `kanbn.com` | | `NEXT_PUBLIC_STORAGE_DOMAIN` | Storage domain name | For file uploads | `kanbn.com` |
| `NEXT_PUBLIC_AVATAR_BUCKET_NAME` | S3 bucket name for avatars | For file uploads | `avatars` | | `NEXT_PUBLIC_AVATAR_BUCKET_NAME` | S3 bucket name for avatars | For file uploads | `avatars` |
| `NEXT_PUBLIC_ATTATCHMENTS_BUCKET_NAME` | S3 bucket name for attatchments | For file uploads | `attatchments` | | `NEXT_PUBLIC_ATTACHMENTS_BUCKET_NAME` | S3 bucket name for attachments | For file uploads | `attachments` |
| `NEXT_PUBLIC_ALLOW_CREDENTIALS` | Allow email & password login | For authentication | `true` | | `NEXT_PUBLIC_ALLOW_CREDENTIALS` | Allow email & password login | For authentication | `true` |
| `NEXT_PUBLIC_DISABLE_SIGN_UP` | Disable sign up | For authentication | `false` | | `NEXT_PUBLIC_DISABLE_SIGN_UP` | Disable sign up | For authentication | `false` |
| `NEXT_PUBLIC_WHITE_LABEL_HIDE_POWERED_BY` | Hide “Powered by kan.bn” on public boards (self-host) | For white labelling | `true` | | `NEXT_PUBLIC_WHITE_LABEL_HIDE_POWERED_BY` | Hide “Powered by kan.bn” on public boards (self-host) | For white labelling | `true` |

View File

@@ -67,22 +67,23 @@ export function CardModal({
<div className="flex w-full items-center justify-between"> <div className="flex w-full items-center justify-between">
<button <button
className="absolute right-[2rem] top-[2rem] rounded p-1 hover:bg-light-300 focus:outline-none dark:hover:bg-dark-300" className="absolute right-[2rem] top-[2rem] rounded p-1 hover:bg-light-300 focus:outline-none dark:hover:bg-dark-300"
onClick={async (e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
closeModal(); closeModal();
setTimeout(async () => { setTimeout(() => {
try { void router.replace(
await router.replace( {
`/${workspaceSlug}/${boardSlug}`, pathname: router.pathname,
undefined, query: {
{ ...router.query,
shallow: true, workspaceSlug,
boardSlug: [boardSlug],
}, },
); },
} catch (error) { undefined,
console.error(error); { shallow: true },
} );
}, 400); }, 400);
}} }}
> >

View File

@@ -76,7 +76,8 @@ export default function PublicBoardView() {
); );
}; };
const splitPath = router.asPath.split("/"); const pathWithoutQuery = router.asPath.split("?")[0];
const splitPath = pathWithoutQuery.split("/");
const cardPublicId = splitPath.length > 3 ? splitPath[3] : null; const cardPublicId = splitPath.length > 3 ? splitPath[3] : null;
useEffect(() => { useEffect(() => {
@@ -172,27 +173,36 @@ export default function PublicBoardView() {
</span> </span>
</div> </div>
<div className="scrollbar-track-rounded-[4px] scrollbar-thumb-rounded-[4px] scrollbar-w-[8px] z-10 h-full max-h-[calc(100vh-265px)] min-h-[2rem] overflow-y-auto pr-1 scrollbar dark:scrollbar-track-dark-100 dark:scrollbar-thumb-dark-600"> <div className="scrollbar-track-rounded-[4px] scrollbar-thumb-rounded-[4px] scrollbar-w-[8px] z-10 h-full max-h-[calc(100vh-265px)] min-h-[2rem] overflow-y-auto pr-1 scrollbar dark:scrollbar-track-dark-100 dark:scrollbar-thumb-dark-600">
{list.cards.map((card) => ( {list.cards.map((card) => {
<Link return (
key={card.publicId} <Link
href={`/${data.workspace.slug}/${data.slug}/${card.publicId}`} key={card.publicId}
className={`mb-2 flex !cursor-pointer flex-col`} href={{
shallow={true} pathname: router.pathname,
onClick={() => { query: {
openModal("CARD"); ...router.query,
}} workspaceSlug: data.workspace.slug,
> boardSlug: [data.slug, card.publicId],
<Card },
title={card.title} }}
labels={card.labels} className={`mb-2 flex !cursor-pointer flex-col`}
checklists={card.checklists ?? []} shallow={true}
members={[]} onClick={() => {
description={card.description} openModal("CARD");
comments={card.comments ?? []} }}
attachments={card.attachments} >
/> <Card
</Link> title={card.title}
))} labels={card.labels}
checklists={card.checklists ?? []}
members={[]}
description={card.description}
comments={card.comments ?? []}
attachments={card.attachments}
/>
</Link>
);
})}
</div> </div>
</div> </div>
))} ))}