Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 16s
CodeQL / Analyze (python) (push) Failing after 3s
i18n sync check / check:sync (push) Failing after 3s
React Doctor / react-doctor (push) Failing after 16s
Branch Build CE / Build-Push Admin Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Admin Manifest (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Web Manifest (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Proxy Manifest (push) Has been cancelled
Branch Build CE / Merge Space Manifest (push) Has been cancelled
Branch Build CE / Prepare AIO Assets (push) Has been cancelled
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge Live Collaboration Manifest (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge API Server Manifest (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (${{ matrix.arch }}) (push) Has been cancelled
Branch Build CE / Merge AIO Manifest (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
68 lines
2.2 KiB
TypeScript
68 lines
2.2 KiB
TypeScript
/**
|
|
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* See the LICENSE file for details.
|
|
*/
|
|
|
|
import { observer } from "mobx-react";
|
|
// plane imports
|
|
import { Loader } from "@plane/ui";
|
|
// store hooks
|
|
import { usePublish } from "@/hooks/store/publish";
|
|
// types
|
|
import type { IIssue } from "@/types/issue";
|
|
// local imports
|
|
import { PeekOverviewHeader } from "./header";
|
|
import { PeekOverviewIssueActivity } from "./issue-activity";
|
|
import { PeekOverviewIssueDetails } from "./issue-details";
|
|
import { PeekOverviewIssueProperties } from "./issue-properties";
|
|
|
|
type Props = {
|
|
anchor: string;
|
|
handleClose: () => void;
|
|
issueDetails: IIssue | undefined;
|
|
};
|
|
|
|
export const SidePeekView = observer(function SidePeekView(props: Props) {
|
|
const { anchor, handleClose, issueDetails } = props;
|
|
// store hooks
|
|
const { canComment } = usePublish(anchor);
|
|
|
|
return (
|
|
<div className="flex size-full flex-col overflow-hidden">
|
|
<div className="w-full p-5">
|
|
<PeekOverviewHeader handleClose={handleClose} issueDetails={issueDetails} />
|
|
</div>
|
|
{issueDetails ? (
|
|
<div className="size-full overflow-y-auto px-6">
|
|
{/* issue title and description */}
|
|
<div className="w-full">
|
|
<PeekOverviewIssueDetails anchor={anchor} issueDetails={issueDetails} />
|
|
</div>
|
|
{/* issue properties */}
|
|
<div className="mt-6 w-full">
|
|
<PeekOverviewIssueProperties issueDetails={issueDetails} />
|
|
</div>
|
|
{/* divider */}
|
|
<div className="my-5 h-[1] w-full border-t border-subtle" />
|
|
{/* issue activity/comments */}
|
|
{canComment && (
|
|
<div className="w-full pb-5">
|
|
<PeekOverviewIssueActivity anchor={anchor} issueDetails={issueDetails} />
|
|
</div>
|
|
)}
|
|
</div>
|
|
) : (
|
|
<Loader className="px-6">
|
|
<Loader.Item height="30px" />
|
|
<div className="mt-3 space-y-2">
|
|
<Loader.Item height="20px" width="70%" />
|
|
<Loader.Item height="20px" width="60%" />
|
|
<Loader.Item height="20px" width="60%" />
|
|
</div>
|
|
</Loader>
|
|
)}
|
|
</div>
|
|
);
|
|
});
|