From fc7f8600fbc1c31ea66a6642a478189befe2cee9 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Mon, 5 Oct 2020 19:12:33 -0400 Subject: [PATCH] chat: resolve conflicts in #3646 --- .../views/apps/chat/components/ChatInput.tsx | 10 ++-- .../views/apps/chat/components/chat-editor.js | 2 +- .../apps/chat/components/content/text.js | 2 +- .../apps/chat/components/unread-notice.js | 50 ++++++++++++------- .../src/views/apps/chat/css/custom.css | 8 ++- 5 files changed, 47 insertions(+), 25 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatInput.tsx b/pkg/interface/src/views/apps/chat/components/ChatInput.tsx index 957288182..0fdfd289f 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatInput.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatInput.tsx @@ -49,7 +49,7 @@ export default class ChatInput extends Component this.submit = this.submit.bind(this); this.toggleCode = this.toggleCode.bind(this); - + } toggleCode() { @@ -81,7 +81,7 @@ export default class ChatInput extends Component } } - + submit(text) { const { props, state } = this; @@ -133,7 +133,7 @@ export default class ChatInput extends Component { url } ); } - + } uploadError(error) { @@ -205,7 +205,7 @@ export default class ChatInput extends Component onPaste={this.onPaste.bind(this)} placeholder='Message...' /> -
/>
-
+ style={{ flexGrow: 1, paddingBottom: '3px', maxHeight: '224px', width: 'calc(100% - 88px)' }}> {content.text} diff --git a/pkg/interface/src/views/apps/chat/components/unread-notice.js b/pkg/interface/src/views/apps/chat/components/unread-notice.js index 954ed3357..d4a673048 100644 --- a/pkg/interface/src/views/apps/chat/components/unread-notice.js +++ b/pkg/interface/src/views/apps/chat/components/unread-notice.js @@ -1,5 +1,6 @@ -import React, { Component } from 'react'; +import React from 'react'; import moment from 'moment'; +import { Box, Text } from '@tlon/indigo-react'; export const UnreadNotice = (props) => { const { unreadCount, unreadMsg, dismissUnread, onClick } = props; @@ -16,26 +17,41 @@ export const UnreadNotice = (props) => { } return ( -
-
-

+ + + {unreadCount} new messages since{' '} {datestamp && ( <> - ~{datestamp} at{' '} + ~{datestamp} at{' '} )} - {timestamp} -

-
+ {timestamp} + + Mark as Read -
-
-
+ + + ); -} +} \ No newline at end of file diff --git a/pkg/interface/src/views/apps/chat/css/custom.css b/pkg/interface/src/views/apps/chat/css/custom.css index af5e573d7..09c32edd1 100644 --- a/pkg/interface/src/views/apps/chat/css/custom.css +++ b/pkg/interface/src/views/apps/chat/css/custom.css @@ -231,6 +231,11 @@ blockquote { font-family: 'Inter'; } +.chat .cm-s-tlon.CodeMirror { + font-size: 16px; + margin-top: 6px; +} + pre, code { background-color: var(--light-gray); } @@ -380,7 +385,8 @@ pre.CodeMirror-placeholder.CodeMirror-line-like { color: var(--gray); } .chat .cm-s-tlon.CodeMirror { background: #333; color: #fff; - font-size: 12px; + font-size: 16px; + margin-top: 6px; } .chat .cm-s-tlon span.cm-def {