* feat: add mobile navigation with responsive layout and theme controls * feat: prevent workspace owners from removing themselves and update workspace dropdown styling * feat: add useClickOutside hook and event listener utilities for improved UI interactions * chore: improve mobile UI styling * refactor: improve UI layout and buttons in boards/members views feat: adjust /members layout * fix: standardize layout containers and improve mobile navigation styling * feat: update card view layout * feat: add responsive layout to board view * feat: readjust boards page layout * feat: enhance table view on mobile for members page * feat: extend mobile support with sliding side panels * fix: prevent two panels from being open at the same time * feat: close panels when clicking outside * fix: adjust font-sizing for import source --------- Co-authored-by: Henry <henry_ball@hotmail.co.uk>
65 lines
2.2 KiB
TypeScript
65 lines
2.2 KiB
TypeScript
import { t } from "@lingui/core/macro";
|
|
import { HiArrowDownTray, HiOutlinePlusSmall } from "react-icons/hi2";
|
|
|
|
import Button from "~/components/Button";
|
|
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-[1600px] px-5 py-6 md:px-8 md:py-8">
|
|
<div className="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>
|
|
{modalContentType === "NEW_BOARD" && <NewBoardForm />}
|
|
{modalContentType === "IMPORT_BOARDS" && <ImportBoardsForm />}
|
|
{modalContentType === "NEW_WORKSPACE" && <NewWorkspaceForm />}
|
|
</Modal>
|
|
|
|
<div className="flex h-full flex-row">
|
|
<BoardsList />
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|