|
|
@ -1,6 +1,6 @@
|
|
|
|
import { isEqual } from "lodash-es";
|
|
|
|
import { isEqual } from "lodash-es";
|
|
|
|
import { CheckCircleIcon, Code2Icon, HashIcon, LinkIcon } from "lucide-react";
|
|
|
|
import { CheckCircleIcon, Code2Icon, HashIcon, LinkIcon } from "lucide-react";
|
|
|
|
import { Memo, MemoRelation_Type, MemoProperty } from "@/types/proto/api/v1/memo_service";
|
|
|
|
import { Memo, MemoRelation_Type, Memo_Property } from "@/types/proto/api/v1/memo_service";
|
|
|
|
import { cn } from "@/utils";
|
|
|
|
import { cn } from "@/utils";
|
|
|
|
import { useTranslate } from "@/utils/i18n";
|
|
|
|
import { useTranslate } from "@/utils/i18n";
|
|
|
|
import MemoRelationForceGraph from "../MemoRelationForceGraph";
|
|
|
|
import MemoRelationForceGraph from "../MemoRelationForceGraph";
|
|
|
@ -13,7 +13,7 @@ interface Props {
|
|
|
|
|
|
|
|
|
|
|
|
const MemoDetailSidebar = ({ memo, className, parentPage }: Props) => {
|
|
|
|
const MemoDetailSidebar = ({ memo, className, parentPage }: Props) => {
|
|
|
|
const t = useTranslate();
|
|
|
|
const t = useTranslate();
|
|
|
|
const property = MemoProperty.fromPartial(memo.property || {});
|
|
|
|
const property = Memo_Property.fromPartial(memo.property || {});
|
|
|
|
const hasSpecialProperty = property.hasLink || property.hasTaskList || property.hasCode || property.hasIncompleteTasks;
|
|
|
|
const hasSpecialProperty = property.hasLink || property.hasTaskList || property.hasCode || property.hasIncompleteTasks;
|
|
|
|
const shouldShowRelationGraph = memo.relations.filter((r) => r.type === MemoRelation_Type.REFERENCE).length > 0;
|
|
|
|
const shouldShowRelationGraph = memo.relations.filter((r) => r.type === MemoRelation_Type.REFERENCE).length > 0;
|
|
|
|
|
|
|
|
|
|
|
|