Просмотр исходного кода

Merge pull request #1509 from visuddhinanda/agile

update CommentOutLined
visuddhinanda 2 лет назад
Родитель
Сommit
8ad8d0a4b8

+ 3 - 8
dashboard/src/assets/icon/index.tsx

@@ -337,19 +337,14 @@ const CommentOutLined = () => (
     viewBox="0 0 1024 1024"
     version="1.1"
     xmlns="http://www.w3.org/2000/svg"
-    p-id="4118"
+    p-id="4420"
     width="1em"
     height="1em"
   >
     <path
-      d="M901.12 173.056H136.192c-35.84 0-64.512 28.672-64.512 64.512v518.144c0 35.84 28.672 64.512 64.512 64.512h52.224v40.96c0 25.6 20.48 46.08 46.08 46.08h2.048c9.216 0 31.744-2.048 50.176-24.576l57.344-62.464H901.12c35.84 0 64.512-28.672 64.512-64.512V237.568c0-35.84-28.672-64.512-64.512-64.512z m7.168 582.656c0 4.096-3.072 7.168-7.168 7.168H331.776c-8.192 0-15.36 3.072-21.504 9.216L245.76 842.752v-51.2c0-15.36-13.312-28.672-28.672-28.672h-80.896c-4.096 0-7.168-3.072-7.168-7.168V237.568c0-4.096 3.072-7.168 7.168-7.168H901.12c4.096 0 7.168 3.072 7.168 7.168v518.144z"
+      d="M481.578667 968.832l-157.909334-158.293333H85.418667A85.290667 85.290667 0 0 1 0 725.12L0.426667 128.042667C0.426667 80.768 38.4 42.666667 85.845333 42.666667h852.778667c47.189333 0 85.418667 38.101333 85.376 85.418666l-0.426667 597.12c0 47.146667-38.229333 85.333333-85.376 85.333334h-237.781333l-158.549333 158.293333a42.624 42.624 0 0 1-60.288 0z m456.704-243.712L938.666667 128.042667s-852.906667-0.128-852.906667 0.042666c0 0-0.384 597.077333-0.298667 597.077334H341.333333c11.306667 0 22.186667 4.48 30.165334 12.501333l140.330666 140.629333 140.8-140.672a42.624 42.624 0 0 1 30.165334-12.458666h255.488zM277.333333 512a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m234.666667 0a64 64 0 1 1 0-128 64 64 0 0 1 0 128z m234.666667 0a64 64 0 1 1 0-128 64 64 0 0 1 0 128z"
       fill="currentColor"
-      p-id="4119"
-    ></path>
-    <path
-      d="M238.592 375.808h243.712c14.336 0 26.624-12.288 26.624-26.624s-12.288-26.624-26.624-26.624H238.592c-14.336 0-26.624 12.288-26.624 26.624s12.288 26.624 26.624 26.624zM630.784 440.32H238.592c-14.336 0-26.624 12.288-26.624 26.624 0 14.336 12.288 26.624 26.624 26.624h392.192c14.336 0 26.624-12.288 26.624-26.624 0-14.336-11.264-26.624-26.624-26.624z"
-      fill="currentColor"
-      p-id="4120"
+      p-id="4421"
     ></path>
   </svg>
 );

+ 2 - 2
dashboard/src/components/article/ToolButtonDiscussion.tsx

@@ -1,12 +1,12 @@
 import { useIntl } from "react-intl";
 import { useEffect, useState } from "react";
 import { Button, Tag, Tree } from "antd";
-import { CommentOutlined } from "@ant-design/icons";
 import { ReloadOutlined } from "@ant-design/icons";
 
 import ToolButton from "./ToolButton";
 import { post } from "../../request";
 import { IUser } from "../auth/User";
+import { CommentOutlinedIcon } from "../../assets/icon";
 
 interface IPrTreeData {
   book: number;
@@ -108,7 +108,7 @@ const ToolButtonDiscussionWidget = ({ type, articleId }: IWidget) => {
   return (
     <ToolButton
       title="讨论"
-      icon={<CommentOutlined />}
+      icon={<CommentOutlinedIcon />}
       content={
         <>
           <div style={{ display: "flex", justifyContent: "space-between" }}>

+ 6 - 1
dashboard/src/components/discussion/DiscussionBox.tsx

@@ -20,7 +20,11 @@ export interface IAnswerCount {
   count: number;
 }
 
-const DiscussionBoxWidget = () => {
+interface IWidget {
+  onTopicChange?: Function;
+}
+
+const DiscussionBoxWidget = ({ onTopicChange }: IWidget) => {
   const [childrenDrawer, setChildrenDrawer] = useState(false);
   const [topicId, setTopicId] = useState<string>();
   const [topic, setTopic] = useState<IComment>();
@@ -98,6 +102,7 @@ const DiscussionBoxWidget = () => {
             comment: IComment
           ) => showChildrenDrawer(comment)}
           onReply={(comment: IComment) => showChildrenDrawer(comment)}
+          onReady={() => {}}
           changedAnswerCount={answerCount}
           onItemCountChange={(count: number) => {
             store.dispatch(

+ 2 - 2
dashboard/src/components/discussion/DiscussionListCard.tsx

@@ -13,7 +13,7 @@ import User from "../auth/User";
 import { IArticleListResponse } from "../api/Article";
 import { useAppSelector } from "../../hooks";
 import { currentUser as _currentUser } from "../../reducers/current-user";
-import { TemplateOutlinedIcon } from "../../assets/icon";
+import { CommentOutlinedIcon, TemplateOutlinedIcon } from "../../assets/icon";
 import { ISentenceResponse } from "../api/Corpus";
 
 export type TResType = "article" | "channel" | "chapter" | "sentence" | "wbw";
@@ -104,7 +104,7 @@ const DiscussionListCardWidget = ({
             render: (text, row, index, action) => [
               row.childrenCount ? (
                 <Space key={index}>
-                  <CommentOutlined />
+                  <CommentOutlinedIcon />
                   {row.childrenCount}
                 </Space>
               ) : (

+ 6 - 3
dashboard/src/components/template/SentEdit/SentEditMenu.tsx

@@ -6,13 +6,16 @@ import {
   MoreOutlined,
   FieldTimeOutlined,
   LinkOutlined,
-  CommentOutlined,
   FileMarkdownOutlined,
 } from "@ant-design/icons";
 import type { MenuProps } from "antd";
 import { ISentence } from "../SentEdit";
 import SentHistoryModal from "../../corpus/SentHistoryModal";
-import { HandOutlinedIcon, JsonOutlinedIcon } from "../../../assets/icon";
+import {
+  CommentOutlinedIcon,
+  HandOutlinedIcon,
+  JsonOutlinedIcon,
+} from "../../../assets/icon";
 import { useIntl } from "react-intl";
 
 interface IWidget {
@@ -74,7 +77,7 @@ const SentEditMenuWidget = ({
     {
       key: "discussion",
       label: "discussion",
-      icon: <CommentOutlined />,
+      icon: <CommentOutlinedIcon />,
     },
     {
       type: "divider",

+ 3 - 3
dashboard/src/components/template/SentEdit/SuggestionToolbar.tsx

@@ -1,11 +1,11 @@
 import { Divider, Space, Tooltip, Typography } from "antd";
-import { CommentOutlined, LikeOutlined } from "@ant-design/icons";
+import { LikeOutlined } from "@ant-design/icons";
 import { ISentence } from "../SentEdit";
 import { useEffect, useState } from "react";
 import CommentBox from "../../discussion/DiscussionDrawer";
 import SuggestionBox from "./SuggestionBox";
 import PrAcceptButton from "./PrAcceptButton";
-import { HandOutlinedIcon } from "../../../assets/icon";
+import { CommentOutlinedIcon, HandOutlinedIcon } from "../../../assets/icon";
 import store from "../../../store";
 import { count, show } from "../../../reducers/discussion";
 import { useAppSelector } from "../../../hooks";
@@ -95,7 +95,7 @@ const SuggestionToolbarWidget = ({
                 store.dispatch(openPanel("discussion"));
               }}
             >
-              <CommentOutlined />
+              <CommentOutlinedIcon />
               {CommentCount}
             </Space>
           </Tooltip>

+ 7 - 3
dashboard/src/components/template/Wbw/WbwDetail.tsx

@@ -1,14 +1,18 @@
 import { useEffect, useState } from "react";
 import { useIntl } from "react-intl";
 import { Dropdown, Tabs, Divider, Button, Switch, Rate } from "antd";
-import { SaveOutlined, CommentOutlined } from "@ant-design/icons";
+import { SaveOutlined } from "@ant-design/icons";
 
 import { IWbw, IWbwField, TFieldName } from "./WbwWord";
 import WbwDetailBasic from "./WbwDetailBasic";
 import WbwDetailBookMark from "./WbwDetailBookMark";
 import WbwDetailNote from "./WbwDetailNote";
 import WbwDetailAdvance from "./WbwDetailAdvance";
-import { LockIcon, UnLockIcon } from "../../../assets/icon";
+import {
+  CommentOutlinedIcon,
+  LockIcon,
+  UnLockIcon,
+} from "../../../assets/icon";
 import { UploadFile } from "antd/es/upload/interface";
 import { IAttachmentResponse } from "../../api/Attachments";
 import WbwDetailAttachment from "./WbwDetailAttachment";
@@ -110,7 +114,7 @@ const WbwDetailWidget = ({
             <CommentBox
               resId={data.uid}
               resType="wbw"
-              trigger={<Button icon={<CommentOutlined />} type="text" />}
+              trigger={<Button icon={<CommentOutlinedIcon />} type="text" />}
               onCommentCountChange={(count: number) => {
                 if (typeof onCommentCountChange !== "undefined") {
                   onCommentCountChange(count);

+ 4 - 2
dashboard/src/components/template/Wbw/WbwPali.tsx

@@ -3,7 +3,6 @@ import { Button, Popover, Space, Typography } from "antd";
 import {
   TagTwoTone,
   InfoCircleOutlined,
-  CommentOutlined,
   ApartmentOutlined,
   EditOutlined,
 } from "@ant-design/icons";
@@ -21,6 +20,7 @@ import { useAppSelector } from "../../../hooks";
 import { add, relationAddParam } from "../../../reducers/relation-add";
 import { ArticleMode } from "../../article/Article";
 import { anchor, showWbw } from "../../../reducers/wbw";
+import { CommentOutlinedIcon } from "../../../assets/icon";
 
 const { Paragraph } = Typography;
 interface IWidget {
@@ -277,7 +277,9 @@ const WbwPaliWidget = ({ data, channelId, mode, display, onSave }: IWidget) => {
       <CommentBox
         resId={data.uid}
         resType="wbw"
-        trigger={<Button icon={<CommentOutlined />} type="text" title="讨论" />}
+        trigger={
+          <Button icon={<CommentOutlinedIcon />} type="text" title="讨论" />
+        }
         onCommentCountChange={(count: number) => {
           if (count > 0) {
             setHasComment(true);