Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
2818d7d8f4
|
@ -12,7 +12,7 @@ import PostSelect from "../../models/post/PostSelect/PostSelect";
|
|||
import { Lecture, PostType } from "@nice/common";
|
||||
import { xmindColorPresets } from "./constant";
|
||||
import { api } from "@nice/client";
|
||||
import { env } from "@web/src/env";
|
||||
import { useAuth } from "@web/src/providers/auth-provider";
|
||||
|
||||
interface NodeMenuProps {
|
||||
mind: MindElixirInstance;
|
||||
|
@ -20,12 +20,13 @@ interface NodeMenuProps {
|
|||
|
||||
//管理节点样式状态
|
||||
const NodeMenu: React.FC<NodeMenuProps> = ({ mind }) => {
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [selectedFontColor, setSelectedFontColor] = useState<string>("");
|
||||
const [selectedBgColor, setSelectedBgColor] = useState<string>("");
|
||||
const [selectedSize, setSelectedSize] = useState<string>("");
|
||||
const [isBold, setIsBold] = useState(false);
|
||||
|
||||
const { user} = useAuth();
|
||||
const [urlMode, setUrlMode] = useState<"URL" | "POSTURL">("POSTURL");
|
||||
const [url, setUrl] = useState<string>("");
|
||||
const [postId, setPostId] = useState<string>("");
|
||||
|
@ -245,6 +246,8 @@ const NodeMenu: React.FC<NodeMenuProps> = ({ mind }) => {
|
|||
params={{
|
||||
where: {
|
||||
type: PostType.LECTURE,
|
||||
deletedAt: null,
|
||||
authorId: user?.id,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -23,15 +23,9 @@ export default function CourseDetailTitle() {
|
|||
{!selectedLectureId ? course?.title : lecture?.title}
|
||||
</div>
|
||||
<div className="text-gray-600 flex w-full justify-start items-center gap-5">
|
||||
{course?.author?.showname && (
|
||||
<div>
|
||||
发布者:
|
||||
{course?.author?.showname}
|
||||
</div>
|
||||
)}
|
||||
{course?.depts && course?.depts?.length > 0 && (
|
||||
<div>
|
||||
发布单位:
|
||||
发布单位:
|
||||
{course?.depts?.map((dept) => dept.name)}
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -13,6 +13,7 @@ export default function PostSelect({
|
|||
placeholder = "请选择课时",
|
||||
params = { where: {}, select: {} },
|
||||
className,
|
||||
createdById,
|
||||
}: {
|
||||
value?: string | string[];
|
||||
onChange?: (value: string | string[]) => void;
|
||||
|
@ -22,6 +23,7 @@ export default function PostSelect({
|
|||
select?: Prisma.PostSelect<DefaultArgs>;
|
||||
};
|
||||
className?: string;
|
||||
createdById?: string;
|
||||
}) {
|
||||
const [searchValue, setSearch] = useState("");
|
||||
const searchCondition: Prisma.PostWhereInput = useMemo(() => {
|
||||
|
|
Loading…
Reference in New Issue