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

Merge pull request #1859 from visuddhinanda/agile

add title in notification
visuddhinanda 2 лет назад
Родитель
Сommit
d53361148c

+ 2 - 0
dashboard/src/components/api/notification.ts

@@ -25,6 +25,8 @@ interface INotificationData {
   from: IUser;
   to: IUser;
   url?: string;
+  title?: string;
+  book_title?: string;
   content: string;
   content_type: string;
   res_type: string;

+ 16 - 5
dashboard/src/components/notification/NotificationList.tsx

@@ -19,6 +19,8 @@ interface INotification {
   from: IUser;
   to: IUser;
   url?: string;
+  title?: string;
+  book_title?: string;
   content?: string;
   content_type: string;
   res_type: string;
@@ -103,6 +105,8 @@ const NotificationListWidget = ({ onChange }: IWidget) => {
               from: item.from,
               to: item.to,
               url: item.url,
+              title: item.title,
+              book_title: item.book_title,
               content: item.content,
               content_type: item.content_type,
               res_type: item.res_type,
@@ -154,15 +158,19 @@ const NotificationListWidget = ({ onChange }: IWidget) => {
           render: (_, row) => {
             return (
               <Text
-                style={{ cursor: "pointer" }}
+                style={{
+                  cursor: "pointer",
+                  opacity: row.status === "unread" ? 1 : 0.7,
+                }}
                 onClick={() => {
                   window.open(row.url, "_blank");
                 }}
               >
-                <Marked
-                  style={{ opacity: row.status === "unread" ? 1 : 0.7 }}
-                  text={row.content}
-                />
+                <div>
+                  <Text type="secondary">{row.book_title}</Text>
+                </div>
+                <Text style={{ fontWeight: 700 }}>{row.title}</Text>
+                <Marked style={{}} text={row.content} />
               </Text>
             );
           },
@@ -216,6 +224,9 @@ const NotificationListWidget = ({ onChange }: IWidget) => {
           onChange(key) {
             setActiveKey(key);
             ref.current?.reload();
+            if (ref.current?.setPageInfo) {
+              ref.current?.setPageInfo({ current: 1 });
+            }
           },
         },
       }}

+ 2 - 1
dashboard/src/components/template/SentEdit/SuggestionPopover.tsx

@@ -59,12 +59,13 @@ const SuggestionPopoverWidget = ({
   return (
     <Popover
       placement="bottomRight"
+      arrowPointAtCenter
       content={
         <div>
           <SentCell value={sentData} key={1} isPr={true} showDiff={false} />
         </div>
       }
-      title={`${sentData?.editor.nickName}`}
+      title={`${sentData?.editor.nickName}提交的修改建议`}
       trigger="click"
       open={open}
       onOpenChange={handleOpenChange}

+ 21 - 0
rpc/morus/morus/README.md

@@ -0,0 +1,21 @@
+# raw php fcgi
+
+api 入口文件 morus.php
+
+启动
+
+```bash
+php -S localhost:8080
+```
+
+测试
+
+http://localhost:8080
+
+laravel 设置样例
+
+```
+MORUS_GRPC_HOST="http://localhost:8080/morus.php"
+```
+
+> MORUS_GRPC_PORT 弃用