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