mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: disable date
, label
property access for guests/ viewer in all project issue views.
This commit is contained in:
parent
3dae871d23
commit
1023a7d9ba
@ -166,7 +166,11 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
|
|||||||
{/* sub-issues */}
|
{/* sub-issues */}
|
||||||
{displayProperties && displayProperties?.sub_issue_count && !!issue?.sub_issues_count && (
|
{displayProperties && displayProperties?.sub_issue_count && !!issue?.sub_issues_count && (
|
||||||
<Tooltip tooltipHeading="Sub-issues" tooltipContent={`${issue.sub_issues_count}`}>
|
<Tooltip tooltipHeading="Sub-issues" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadOnly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Layers className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Layers className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.sub_issues_count}</div>
|
<div className="text-xs">{issue.sub_issues_count}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -176,7 +180,11 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
|
|||||||
{/* attachments */}
|
{/* attachments */}
|
||||||
{displayProperties && displayProperties?.attachment_count && !!issue?.attachment_count && (
|
{displayProperties && displayProperties?.attachment_count && !!issue?.attachment_count && (
|
||||||
<Tooltip tooltipHeading="Attachments" tooltipContent={`${issue.attachment_count}`}>
|
<Tooltip tooltipHeading="Attachments" tooltipContent={`${issue.attachment_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadOnly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Paperclip className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Paperclip className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.attachment_count}</div>
|
<div className="text-xs">{issue.attachment_count}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -186,7 +194,11 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
|
|||||||
{/* link */}
|
{/* link */}
|
||||||
{displayProperties && displayProperties?.link && !!issue?.link_count && (
|
{displayProperties && displayProperties?.link && !!issue?.link_count && (
|
||||||
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadOnly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Link className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Link className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.link_count}</div>
|
<div className="text-xs">{issue.link_count}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -137,7 +137,11 @@ export const ListProperties: FC<IListProperties> = observer((props) => {
|
|||||||
{/* sub-issues */}
|
{/* sub-issues */}
|
||||||
{displayProperties && displayProperties?.sub_issue_count && !!issue?.sub_issues_count && (
|
{displayProperties && displayProperties?.sub_issue_count && !!issue?.sub_issues_count && (
|
||||||
<Tooltip tooltipHeading="Sub-issues" tooltipContent={`${issue.sub_issues_count}`}>
|
<Tooltip tooltipHeading="Sub-issues" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadonly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Layers className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Layers className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.sub_issues_count}</div>
|
<div className="text-xs">{issue.sub_issues_count}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +151,11 @@ export const ListProperties: FC<IListProperties> = observer((props) => {
|
|||||||
{/* attachments */}
|
{/* attachments */}
|
||||||
{displayProperties && displayProperties?.attachment_count && !!issue?.attachment_count && (
|
{displayProperties && displayProperties?.attachment_count && !!issue?.attachment_count && (
|
||||||
<Tooltip tooltipHeading="Attachments" tooltipContent={`${issue.attachment_count}`}>
|
<Tooltip tooltipHeading="Attachments" tooltipContent={`${issue.attachment_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadonly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Paperclip className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Paperclip className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.attachment_count}</div>
|
<div className="text-xs">{issue.attachment_count}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -157,7 +165,11 @@ export const ListProperties: FC<IListProperties> = observer((props) => {
|
|||||||
{/* link */}
|
{/* link */}
|
||||||
{displayProperties && displayProperties?.link && !!issue?.link_count && (
|
{displayProperties && displayProperties?.link && !!issue?.link_count && (
|
||||||
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
||||||
<div className="flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1">
|
<div
|
||||||
|
className={`flex h-5 flex-shrink-0 items-center justify-center gap-2 overflow-hidden rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 ${
|
||||||
|
isReadonly ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Link className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
<Link className="h-3 w-3 flex-shrink-0" strokeWidth={2} />
|
||||||
<div className="text-xs">{issue.link_count}</div>
|
<div className="text-xs">{issue.link_count}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,6 +61,7 @@ export const IssuePropertyDate: React.FC<IIssuePropertyDate> = observer((props)
|
|||||||
ref={dropdownBtn}
|
ref={dropdownBtn}
|
||||||
className="border-none outline-none"
|
className="border-none outline-none"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
tooltipHeading={dateOptionDetails.placeholder}
|
tooltipHeading={dateOptionDetails.placeholder}
|
||||||
@ -69,7 +70,7 @@ export const IssuePropertyDate: React.FC<IIssuePropertyDate> = observer((props)
|
|||||||
<div
|
<div
|
||||||
className={`flex h-5 w-full items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 outline-none duration-300 ${
|
className={`flex h-5 w-full items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 outline-none duration-300 ${
|
||||||
disabled
|
disabled
|
||||||
? "pointer-events-none cursor-not-allowed text-custom-text-200"
|
? "cursor-not-allowed text-custom-text-200"
|
||||||
: "cursor-pointer hover:bg-custom-background-80"
|
: "cursor-pointer hover:bg-custom-background-80"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -128,7 +128,11 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
|
|||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex h-full flex-shrink-0 cursor-pointer items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 text-xs">
|
<div
|
||||||
|
className={`flex h-full flex-shrink-0 items-center rounded border-[0.5px] border-custom-border-300 px-2.5 py-1 text-xs ${
|
||||||
|
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
position="top"
|
position="top"
|
||||||
tooltipHeading="Labels"
|
tooltipHeading="Labels"
|
||||||
@ -147,7 +151,7 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
|
|||||||
) : (
|
) : (
|
||||||
<Tooltip position="top" tooltipHeading="Labels" tooltipContent="None">
|
<Tooltip position="top" tooltipHeading="Labels" tooltipContent="None">
|
||||||
<div
|
<div
|
||||||
className={`h-full flex items-center justify-center gap-2 rounded px-2.5 py-1 text-xs hover:bg-custom-background-80 ${
|
className={`flex h-full items-center justify-center gap-2 rounded px-2.5 py-1 text-xs hover:bg-custom-background-80 ${
|
||||||
noLabelBorder ? "" : "border-[0.5px] border-custom-border-300"
|
noLabelBorder ? "" : "border-[0.5px] border-custom-border-300"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -92,7 +92,9 @@ export const SidebarLabelSelect: React.FC<Props> = observer((props) => {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={label.id}
|
key={label.id}
|
||||||
className="group flex cursor-pointer items-center gap-1 rounded-2xl border border-custom-border-100 px-1 py-0.5 text-xs hover:border-red-500/20 hover:bg-red-500/20"
|
className={`group flex cursor-pointer items-center gap-1 rounded-2xl border border-custom-border-100 px-1 py-0.5 text-xs ${
|
||||||
|
isNotAllowed || uneditable ? "!cursor-not-allowed" : "hover:border-red-500/20 hover:bg-red-500/20"
|
||||||
|
}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const updatedLabels = labelList?.filter((l) => l !== labelId);
|
const updatedLabels = labelList?.filter((l) => l !== labelId);
|
||||||
submitChanges({
|
submitChanges({
|
||||||
|
@ -61,9 +61,9 @@ export const ViewDueDateSelect: React.FC<Props> = ({
|
|||||||
className={`bg-transparent ${issue?.target_date ? "w-[6.5rem]" : "w-[5rem] text-center"}`}
|
className={`bg-transparent ${issue?.target_date ? "w-[6.5rem]" : "w-[5rem] text-center"}`}
|
||||||
customInput={
|
customInput={
|
||||||
<div
|
<div
|
||||||
className={`flex cursor-pointer items-center justify-center gap-2 rounded border border-custom-border-200 px-2 py-1 text-xs shadow-sm duration-200 hover:bg-custom-background-80 ${
|
className={`flex items-center justify-center gap-2 rounded border border-custom-border-200 px-2 py-1 text-xs shadow-sm duration-200 hover:bg-custom-background-80 ${
|
||||||
issue.target_date ? "pr-6 text-custom-text-300" : "text-custom-text-400"
|
issue.target_date ? "pr-6 text-custom-text-300" : "text-custom-text-400"
|
||||||
}`}
|
} ${disabled ? "cursor-not-allowed" : "cursor-pointer"}`}
|
||||||
>
|
>
|
||||||
{issue.target_date ? (
|
{issue.target_date ? (
|
||||||
<>
|
<>
|
||||||
|
@ -49,9 +49,9 @@ export const ViewStartDateSelect: React.FC<Props> = ({
|
|||||||
handleOnOpen={handleOnOpen}
|
handleOnOpen={handleOnOpen}
|
||||||
customInput={
|
customInput={
|
||||||
<div
|
<div
|
||||||
className={`flex cursor-pointer items-center justify-center gap-2 rounded border border-custom-border-200 px-2 py-1 text-xs shadow-sm duration-200 hover:bg-custom-background-80 ${
|
className={`flex items-center justify-center gap-2 rounded border border-custom-border-200 px-2 py-1 text-xs shadow-sm duration-200 hover:bg-custom-background-80 ${
|
||||||
issue?.start_date ? "pr-6 text-custom-text-300" : "text-custom-text-400"
|
issue?.start_date ? "pr-6 text-custom-text-300" : "text-custom-text-400"
|
||||||
}`}
|
} ${disabled ? "cursor-not-allowed" : "cursor-pointer"}`}
|
||||||
>
|
>
|
||||||
{issue?.start_date ? (
|
{issue?.start_date ? (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user