Kaynağa Gözat

目录按ctrl 打开新页面 #1819

visuddhinanda 2 yıl önce
ebeveyn
işleme
9d516e234e

+ 12 - 12
dashboard/src/components/article/Article.tsx

@@ -85,9 +85,9 @@ const ArticleWidget = ({
           mode={mode}
           anthologyId={anthologyId}
           active={active}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
           onLoad={(data: IArticleDataResponse) => {
@@ -106,9 +106,9 @@ const ArticleWidget = ({
           articleId={articleId}
           channelId={channelId}
           mode={mode}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
         />
@@ -117,9 +117,9 @@ const ArticleWidget = ({
           articleId={articleId}
           channelId={channelId}
           mode={mode}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
         />
@@ -132,9 +132,9 @@ const ArticleWidget = ({
           book={book}
           para={para}
           focus={focus}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
         />
@@ -144,9 +144,9 @@ const ArticleWidget = ({
           channelId={channelId}
           focus={focus}
           mode={mode}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
         />
@@ -155,9 +155,9 @@ const ArticleWidget = ({
           articleId={articleId}
           channelId={channelId}
           mode={mode}
-          onArticleChange={(type: ArticleType, id: string) => {
+          onArticleChange={(type: ArticleType, id: string, target: string) => {
             if (typeof onArticleChange !== "undefined") {
-              onArticleChange(type, id);
+              onArticleChange(type, id, target);
             }
           }}
         />

+ 3 - 1
dashboard/src/components/article/ArticleView.tsx

@@ -6,7 +6,7 @@ import TocPath, { ITocPathNode } from "../corpus/TocPath";
 import PaliChapterChannelList from "../corpus/PaliChapterChannelList";
 import { ArticleType } from "./Article";
 import VisibleObserver from "../general/VisibleObserver";
-import { useEffect, useState } from "react";
+import { IStudio } from "../auth/StudioName";
 
 const { Paragraph, Title, Text } = Typography;
 export interface IFirstAnthology {
@@ -24,6 +24,7 @@ export interface IWidgetArticleData {
   path?: ITocPathNode[];
   created_at?: string;
   updated_at?: string;
+  owner?: IStudio;
   channels?: string[];
   type?: ArticleType;
   articleId?: string;
@@ -43,6 +44,7 @@ const ArticleViewWidget = ({
   path = [],
   created_at,
   updated_at,
+  owner,
   channels,
   type,
   articleId,