Переглянути джерело

ui: web chat facelift

master
Bettenbuk Zoltan 5 роки тому
джерело
коміт
9265e1ffec

+ 32
- 14
css/_chat.scss Переглянути файл

@@ -82,9 +82,10 @@
82 82
 
83 83
 #chat-recipient {
84 84
     align-items: center;
85
-    background-color: $defaultWarningColor;
85
+    background-color: $chatPrivateMessageBackgroundColor;
86 86
     display: flex;
87 87
     flex-direction: row;
88
+    font-weight: 100;
88 89
     padding: 10px;
89 90
 
90 91
     span {
@@ -132,6 +133,7 @@
132 133
 #chat-input {
133 134
     border-top: 1px solid $chatInputSeparatorColor;
134 135
     display: flex;
136
+    padding: 5px 10px;
135 137
 
136 138
     * {
137 139
         background-color: transparent;
@@ -152,8 +154,7 @@
152 154
     box-shadow: none;
153 155
     color: white;
154 156
     font-size: 15px;
155
-    line-height: 30px;
156
-    padding: 5px;
157
+    padding: 10px;
157 158
     overflow-y: auto;
158 159
     resize: none;
159 160
     width: 100%;
@@ -183,6 +184,7 @@
183 184
     .display-name {
184 185
         font-size: 13px;
185 186
         font-weight: bold;
187
+        margin-bottom: 5px;
186 188
         white-space: nowrap;
187 189
         text-overflow: ellipsis;
188 190
         overflow: hidden;
@@ -196,7 +198,6 @@
196 198
     color: white;
197 199
     margin-top: 3px;
198 200
     max-width: 100%;
199
-    padding-bottom: 3px;
200 201
     position: relative;
201 202
 
202 203
     &.localuser {
@@ -219,8 +220,12 @@
219 220
     }
220 221
 
221 222
     .privatemessagenotice {
222
-        color: $defaultWarningColor;
223
-        font-style: italic;
223
+        font-size: 11px;
224
+        font-weight: 100;
225
+    }
226
+
227
+    .messagecontent {
228
+        margin: 5px 10px;
224 229
     }
225 230
 }
226 231
 
@@ -297,10 +302,6 @@
297 302
     cursor: pointer;
298 303
 }
299 304
 
300
-#usermsg::-webkit-input-placeholder {
301
-    line-height: 30px;
302
-}
303
-
304 305
 #usermsg::-webkit-scrollbar-track-piece {
305 306
     background: #3a3a3a;
306 307
 }
@@ -315,6 +316,10 @@
315 316
         .chatmessage {
316 317
             background-color: $chatLocalMessageBackgroundColor;
317 318
             border-radius: 6px 0px 6px 6px;
319
+
320
+            &.privatemessage {
321
+                background-color: $chatPrivateMessageBackgroundColor;
322
+            }
318 323
         }
319 324
 
320 325
         .display-name {
@@ -328,8 +333,9 @@
328 333
 
329 334
     &.error {
330 335
         .chatmessage {
336
+            background-color: $defaultWarningColor;
331 337
             border-radius: 0px;
332
-            color: red;
338
+            font-weight: 100;
333 339
         }
334 340
 
335 341
         .display-name {
@@ -345,8 +351,17 @@
345 351
             flex-direction: row;
346 352
             align-items: center;
347 353
 
348
-            .toolbox-icon {
349
-                cursor: pointer;
354
+            .messageactions {
355
+                align-self: stretch;
356
+                border-left: 1px solid $chatActionsSeparatorColor;
357
+                display: flex;
358
+                flex-direction: column;
359
+                justify-content: center;
360
+                padding: 5px;
361
+
362
+                .toolbox-icon {
363
+                    cursor: pointer;
364
+                }
350 365
             }
351 366
         }
352 367
     }
@@ -357,6 +372,9 @@
357 372
         display: inline-block;
358 373
         margin-top: 3px;
359 374
         color: white;
360
-        padding: 8px;
375
+
376
+        &.privatemessage {
377
+            background-color: $chatPrivateMessageBackgroundColor;
378
+        }
361 379
     }
362 380
 }

+ 4
- 2
css/_variables.scss Переглянути файл

@@ -86,10 +86,12 @@ $modalTextColor: #333;
86 86
 /**
87 87
  * Chat
88 88
  */
89
+$chatActionsSeparatorColor: rgb(173, 105, 112);
89 90
 $chatHeaderBackgroundColor: rgba(42, 58, 75, 0.9);
90 91
 $chatInputSeparatorColor: #A4B8D1;
91
-$chatLocalMessageBackgroundColor: rgba(26, 108, 180, 1);
92
-$chatRemoteMessageBackgroundColor:  rgba(240, 243, 247, 0.15);
92
+$chatLocalMessageBackgroundColor: rgb(4, 98, 178);
93
+$chatPrivateMessageBackgroundColor: rgb(153, 69, 77);
94
+$chatRemoteMessageBackgroundColor:  rgb(86, 101, 114);
93 95
 $sidebarWidth: 375px;
94 96
 
95 97
  /**

+ 4
- 1
react/features/chat/components/web/Chat.js Переглянути файл

@@ -4,6 +4,7 @@ import React from 'react';
4 4
 import Transition from 'react-transition-group/Transition';
5 5
 
6 6
 import { translate } from '../../../base/i18n';
7
+import { Icon, IconClose } from '../../../base/icons';
7 8
 import { connect } from '../../../base/redux';
8 9
 
9 10
 import AbstractChat, {
@@ -137,7 +138,9 @@ class Chat extends AbstractChat<Props> {
137 138
             <div className = 'chat-header'>
138 139
                 <div
139 140
                     className = 'chat-close'
140
-                    onClick = { this.props._onToggleChat }>X</div>
141
+                    onClick = { this.props._onToggleChat }>
142
+                    <Icon src = { IconClose } />
143
+                </div>
141 144
             </div>
142 145
         );
143 146
     }

+ 17
- 11
react/features/chat/components/web/ChatMessage.js Переглянути файл

@@ -41,19 +41,25 @@ class ChatMessage extends AbstractChatMessage<Props> {
41 41
 
42 42
         return (
43 43
             <div className = 'chatmessage-wrapper'>
44
-                <div className = 'replywrapper'>
45
-                    <div className = 'chatmessage'>
46
-                        { this.props.showDisplayName && this._renderDisplayName() }
47
-                        <div className = 'usermessage'>
48
-                            { processedMessage }
44
+                <div className = { `chatmessage ${message.privateMessage ? 'privatemessage' : ''}` }>
45
+                    <div className = 'replywrapper'>
46
+                        <div className = 'messagecontent'>
47
+                            { this.props.showDisplayName && this._renderDisplayName() }
48
+                            <div className = 'usermessage'>
49
+                                { processedMessage }
50
+                            </div>
51
+                            { message.privateMessage && this._renderPrivateNotice() }
49 52
                         </div>
50
-                        { message.privateMessage && this._renderPrivateNotice() }
53
+                        { message.privateMessage && message.messageType !== MESSAGE_TYPE_LOCAL
54
+                            && (
55
+                                <div className = 'messageactions'>
56
+                                    <PrivateMessageButton
57
+                                        participantID = { message.id }
58
+                                        reply = { true }
59
+                                        showLabel = { false } />
60
+                                </div>
61
+                            ) }
51 62
                     </div>
52
-                    { message.privateMessage && message.messageType !== MESSAGE_TYPE_LOCAL
53
-                    && <PrivateMessageButton
54
-                        participantID = { message.id }
55
-                        reply = { true }
56
-                        showLabel = { false } /> }
57 63
                 </div>
58 64
                 { this.props.showTimestamp && this._renderTimestamp() }
59 65
             </div>

Завантаження…
Відмінити
Зберегти