UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: новый канон внешних контуров и стандартизация свойств

This commit is contained in:
DCCONSTRUCTIONS
2026-04-20 11:40:20 +03:00
parent 8fed697531
commit b1f980bc7f
14 changed files with 403 additions and 94 deletions
@@ -8,7 +8,9 @@ import type { Dispatch, SetStateAction } from "react";
import { useEffect, useMemo, useRef } from "react";
import { observer } from "mobx-react";
import type { EditorRefApi } from "@plane/editor";
import { ISSUE_PRIORITIES } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { LabelPropertyIcon, PriorityIcon } from "@plane/propel/icons";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { TExternalContourRequest, TIssue, TNameDescriptionLoader } from "@plane/types";
import { EFileAssetType } from "@plane/types";
@@ -80,6 +82,7 @@ export const ExternalContoursIssueMainContent = observer(function ExternalContou
const mirroredAttachments = contourRequest.mirrored_attachments ?? [];
const mirroredComments = contourRequest.mirrored_comments ?? [];
const targetProjectId = issue.project_id || sourceProjectId;
const priorityDetails = ISSUE_PRIORITIES.find((priority) => priority.key === issue.priority);
const { duplicateIssues } = useDebouncedDuplicateIssues(
workspaceSlug,
@@ -194,24 +197,38 @@ export const ExternalContoursIssueMainContent = observer(function ExternalContou
<div className="nodedc-external-section flex flex-col gap-3 px-4 py-4">
<div className="text-body-sm-medium">{t("external_contours_page.properties.section_title")}</div>
<div className="flex flex-col gap-3 text-13 text-secondary">
<div className="nodedc-external-panel flex flex-wrap items-center gap-2 px-4 py-3">
<span className="text-tertiary">{t("priority")}</span>
<span className="rounded-full bg-white/6 px-3 py-1.5 text-12 font-medium text-primary">
{issue.priority || t("none")}
</span>
<div className="nodedc-external-property-row">
<div className="nodedc-external-property-label">
<PriorityPropertyIcon className="h-4 w-4 flex-shrink-0" />
<span>{t("priority")}</span>
</div>
<div className="nodedc-external-property-value flex-1 text-[13px] font-medium">
<PriorityIcon priority={issue.priority ?? "none"} className="h-3.5 w-3.5 flex-shrink-0 text-tertiary" />
<span className="text-12 font-medium text-primary">
{issue.priority && issue.priority !== "none"
? priorityDetails?.title ?? t(issue.priority)
: t("external_contours_page.form.priority")}
</span>
</div>
</div>
<div className="nodedc-external-panel flex flex-wrap items-center gap-2 px-4 py-3">
<span className="text-tertiary">{t("labels")}</span>
<div className="nodedc-external-property-row">
<div className="nodedc-external-property-label">
<LabelPropertyIcon className="h-4 w-4 flex-shrink-0" />
<span>{t("labels")}</span>
</div>
{issue.label_details?.length ? (
issue.label_details.map((label) => (
<div key={label.id} className="flex items-center gap-1 rounded-full bg-white/6 px-3 py-1.5 text-11">
<span className="h-2 w-2 rounded-full" style={{ backgroundColor: label.color }} />
<span>{label.name}</span>
</div>
))
<div className="nodedc-external-property-value flex-1 flex-wrap text-[13px] font-medium">
<LabelPropertyIcon className="h-3.5 w-3.5 flex-shrink-0 text-tertiary" />
<span className="text-12 font-medium text-primary">
{issue.label_details.map((label) => label.name).join(", ")}
</span>
</div>
) : (
<span>{t("common.none")}</span>
<div className="nodedc-external-property-value flex-1 text-[13px] font-medium">
<LabelPropertyIcon className="h-3.5 w-3.5 flex-shrink-0 text-tertiary" />
<span className="text-12 font-medium text-tertiary">{t("labels")}</span>
</div>
)}
</div>
</div>