Browse Source

Merge pull request #3967 from weseek/feat/growi-bot-modify-reshape-contents-body

Feat/growi bot modify reshape contents body
Haku Mizuki 4 years ago
parent
commit
c4639ff966

+ 1 - 1
packages/slack/src/utils/reshape-contents-body.ts

@@ -64,7 +64,7 @@ export const reshapeContentsBody = (str: string): string => {
       }
       // ##*username*  HH:mm AM
       copyline = '\n## **'.concat(copyline);
-      copyline = copyline.replace(regexpTime, '**'.concat(time));
+      copyline = copyline.replace(regexpTime, '**<span class="grw-togetter-time">'.concat(time, '</span>\n'));
     }
     // Check 3: Is this line a short time(HH:mm)?
     else if (regexpShortTime.test(copyline)) {

+ 6 - 0
src/client/styles/scss/_wiki.scss

@@ -225,6 +225,12 @@ div.body {
     margin: 0 7%;
     background-color: rgba(200, 200, 200, 0.2);
     border-radius: 10px;
+
+    .grw-togetter-time {
+      float: right;
+      font-size: 0.8em;
+      font-weight: normal;
+    }
   }
 }