* feat: add patterned background to boards * feat: setup dashboard 2.0 * fix: prevent patterned background from overlaying buttons * feat: set max width for main card view * feat: adjust colour scheme for card view * feat: adjust dashboard border colour scheme and radius * fix: use correct colour for description placeholder * fix: use getLayout to persist layout state across pages * feat: reduce max width for settings and members pages * feat: add feedback button and modal * feat: adjust page max width * feat: extend mobile layout support * fix: hide pro badge when collapsed * feat: tweak nav styling for light mode * feat: tweak skeleton loaders for board list * feat: extend list max height * fix: hide side nav right border on desktop * chore: update hero images * chore: update hero images for docs * chore: update translations
67 lines
2.4 KiB
TypeScript
67 lines
2.4 KiB
TypeScript
import { t } from "@lingui/core/macro";
|
|
import { HiArrowDownTray, HiOutlinePlusSmall } from "react-icons/hi2";
|
|
|
|
import Button from "~/components/Button";
|
|
import FeedbackModal from "~/components/FeedbackModal";
|
|
import Modal from "~/components/modal";
|
|
import { NewWorkspaceForm } from "~/components/NewWorkspaceForm";
|
|
import { PageHead } from "~/components/PageHead";
|
|
import { useModal } from "~/providers/modal";
|
|
import { useWorkspace } from "~/providers/workspace";
|
|
import { BoardsList } from "./components/BoardsList";
|
|
import { ImportBoardsForm } from "./components/ImportBoardsForm";
|
|
import { NewBoardForm } from "./components/NewBoardForm";
|
|
|
|
export default function BoardsPage() {
|
|
const { openModal, modalContentType } = useModal();
|
|
const { workspace, hasLoaded } = useWorkspace();
|
|
|
|
if (hasLoaded && !workspace.publicId) openModal("NEW_WORKSPACE");
|
|
|
|
return (
|
|
<>
|
|
<PageHead title={t`Boards | ${workspace.name ?? "Workspace"}`} />
|
|
<div className="m-auto h-full max-w-[1100px] p-6 px-5 md:px-28 md:py-12">
|
|
<div className="relative z-10 mb-8 flex w-full items-center justify-between">
|
|
<h1 className="font-bold tracking-tight text-neutral-900 dark:text-dark-1000 sm:text-[1.2rem]">
|
|
{t`Boards`}
|
|
</h1>
|
|
<div className="flex gap-2">
|
|
<Button
|
|
type="button"
|
|
variant="secondary"
|
|
onClick={() => openModal("IMPORT_BOARDS")}
|
|
iconLeft={
|
|
<HiArrowDownTray aria-hidden="true" className="h-4 w-4" />
|
|
}
|
|
>
|
|
{t`Import`}
|
|
</Button>
|
|
<Button
|
|
type="button"
|
|
variant="primary"
|
|
onClick={() => openModal("NEW_BOARD")}
|
|
iconLeft={
|
|
<HiOutlinePlusSmall aria-hidden="true" className="h-4 w-4" />
|
|
}
|
|
>
|
|
{t`New`}
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
|
|
<Modal modalSize={modalContentType === "NEW_FEEDBACK" ? "md" : "sm"}>
|
|
{modalContentType === "NEW_FEEDBACK" && <FeedbackModal />}
|
|
{modalContentType === "NEW_BOARD" && <NewBoardForm />}
|
|
{modalContentType === "IMPORT_BOARDS" && <ImportBoardsForm />}
|
|
{modalContentType === "NEW_WORKSPACE" && <NewWorkspaceForm />}
|
|
</Modal>
|
|
|
|
<div className="flex h-full flex-row">
|
|
<BoardsList />
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|