Explorar el Código

isSubWindow 隐藏文集列表

visuddhinanda hace 1 año
padre
commit
54bcf6fc93
Se han modificado 1 ficheros con 18 adiciones y 12 borrados
  1. 18 12
      dashboard/src/components/article/TypeArticleReaderToolbar.tsx

+ 18 - 12
dashboard/src/components/article/TypeArticleReaderToolbar.tsx

@@ -24,6 +24,7 @@ interface IWidget {
   anthologyId?: string | null;
   anthologyId?: string | null;
   title?: string;
   title?: string;
   role?: TRole;
   role?: TRole;
+  isSubWindow?: boolean;
   onEdit?: Function;
   onEdit?: Function;
   onAnthologySelect?: Function;
   onAnthologySelect?: Function;
 }
 }
@@ -32,6 +33,7 @@ const TypeArticleReaderToolbarWidget = ({
   anthologyId,
   anthologyId,
   title,
   title,
   role = "reader",
   role = "reader",
+  isSubWindow = false,
   onEdit,
   onEdit,
   onAnthologySelect,
   onAnthologySelect,
 }: IWidget) => {
 }: IWidget) => {
@@ -48,18 +50,22 @@ const TypeArticleReaderToolbarWidget = ({
         style={{ padding: 4, display: "flex", justifyContent: "space-between" }}
         style={{ padding: 4, display: "flex", justifyContent: "space-between" }}
       >
       >
         <div>
         <div>
-          <AnthologiesAtArticle
-            articleId={articleId}
-            anthologyId={anthologyId}
-            onClick={(
-              id: string,
-              e: React.MouseEvent<HTMLElement, MouseEvent>
-            ) => {
-              if (typeof onAnthologySelect !== "undefined") {
-                onAnthologySelect(id, e);
-              }
-            }}
-          />
+          {isSubWindow ? (
+            <></>
+          ) : (
+            <AnthologiesAtArticle
+              articleId={articleId}
+              anthologyId={anthologyId}
+              onClick={(
+                id: string,
+                e: React.MouseEvent<HTMLElement, MouseEvent>
+              ) => {
+                if (typeof onAnthologySelect !== "undefined") {
+                  onAnthologySelect(id, e);
+                }
+              }}
+            />
+          )}
         </div>
         </div>
         <div>
         <div>
           <Tooltip
           <Tooltip