Răsfoiți Sursa

在文集中新建文章,可见性和语言与文集相同

visuddhinanda 2 ani în urmă
părinte
comite
25bca159d2
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      dashboard/src/components/anthology/EditableTocTree.tsx

+ 5 - 1
dashboard/src/components/anthology/EditableTocTree.tsx

@@ -6,6 +6,7 @@ import { get as getUiLang } from "../../locales";
 
 import { get, post, put } from "../../request";
 import {
+  IAnthologyDataResponse,
   IArticleCreateRequest,
   IArticleDataResponse,
   IArticleMapAddResponse,
@@ -25,10 +26,12 @@ import { fullUrl, randomString } from "../../utils";
 interface IWidget {
   anthologyId?: string;
   studioName?: string;
+  anthology?: IAnthologyDataResponse;
   onSelect?: Function;
 }
 const EditableTocTreeWidget = ({
   anthologyId,
+  anthology,
   studioName,
   onSelect,
 }: IWidget) => {
@@ -140,9 +143,10 @@ const EditableTocTreeWidget = ({
             `/v2/article`,
             {
               title: "new article",
-              lang: getUiLang(),
+              lang: anthology?.lang ?? getUiLang(),
               studio: studioName,
               anthologyId: anthologyId,
+              status: anthology?.status ?? undefined,
             }
           );