浏览代码

pr 使用贡献者头像

visuddhinanda 2 年之前
父节点
当前提交
cf1f7404ba
共有 1 个文件被更改,包括 15 次插入8 次删除
  1. 15 8
      dashboard/src/components/template/SentEdit/SentCell.tsx

+ 15 - 8
dashboard/src/components/template/SentEdit/SentCell.tsx

@@ -27,6 +27,7 @@ import StudioName from "../../auth/Studio";
 import CopyToModal from "../../channel/CopyToModal";
 import CopyToModal from "../../channel/CopyToModal";
 import store from "../../../store";
 import store from "../../../store";
 import { randomString } from "../../../utils";
 import { randomString } from "../../../utils";
+import User from "../../auth/User";
 
 
 interface IWidget {
 interface IWidget {
   initValue?: ISentence;
   initValue?: ISentence;
@@ -289,13 +290,19 @@ const SentCellWidget = ({
         {sentData ? (
         {sentData ? (
           <div style={{ display: "flex" }}>
           <div style={{ display: "flex" }}>
             <div style={{ marginRight: 8 }}>
             <div style={{ marginRight: 8 }}>
-              <StudioName
-                data={sentData.studio}
-                hideName
-                popOver={
-                  compact ? <Details data={sentData} isPr={isPr} /> : undefined
-                }
-              />
+              {isPr ? (
+                <User {...sentData.editor} showName={false} />
+              ) : (
+                <StudioName
+                  data={sentData.studio}
+                  hideName
+                  popOver={
+                    compact ? (
+                      <Details data={sentData} isPr={isPr} />
+                    ) : undefined
+                  }
+                />
+              )}
             </div>
             </div>
             <div
             <div
               style={{
               style={{
@@ -364,7 +371,7 @@ const SentCellWidget = ({
                   flexWrap: "wrap",
                   flexWrap: "wrap",
                 }}
                 }}
               >
               >
-                <EditInfo data={sentData} compact={compact} />
+                <EditInfo data={sentData} isPr={isPr} compact={compact} />
                 <SuggestionToolbar
                 <SuggestionToolbar
                   style={{
                   style={{
                     marginBottom: 0,
                     marginBottom: 0,