Skip to content

Commit 0b095bd

Browse files
committed
(theme) add colors
1 parent 141de0d commit 0b095bd

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

src/ChatWindow/ChatMessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export default {
361361
362362
.message-image {
363363
position: relative;
364-
background-color: #ddd !important;
364+
background-color: var(--chat-bg-color-message-image) !important;
365365
background-size: cover !important;
366366
background-position: center center !important;
367367
background-repeat: no-repeat !important;

src/ChatWindow/MessagesList.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export default {
462462
bottom: 80px;
463463
right: 20px;
464464
padding: 8px;
465-
background: #fff;
465+
background: var(--chat-bg-scroll-icon);
466466
border-radius: 50%;
467467
box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14),
468468
0 1px 2px 0 rgba(0, 0, 0, 0.12);
@@ -542,17 +542,17 @@ textarea {
542542
width: 100%;
543543
resize: none;
544544
height: 32px;
545-
caret-color: #1976d2;
545+
caret-color: var(--chat-color-caret);
546546
border: none;
547547
font-size: 16px;
548548
549549
&::placeholder {
550-
color: #9ca6af;
550+
color: var(--chat-color-placeholder);
551551
}
552552
}
553553
554554
.textarea-outline {
555-
box-shadow: inset 0px 0px 0px 1px #1976d2;
555+
box-shadow: inset 0px 0px 0px 1px var(--chat-border-color-input-selected);
556556
}
557557
558558
.icon-textarea {

src/ChatWindow/RoomsList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ export default {
116116
width: 100%;
117117
font-size: 16px;
118118
outline: 0;
119-
caret-color: #1976d2;
119+
caret-color: var(--chat-color-caret);
120120
border: none;
121121
padding: 10px;
122122
123123
&::placeholder {
124-
color: #9ca6af;
124+
color: var(--chat-color-placeholder);
125125
}
126126
}
127127

src/themes/index.js

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ export const defaultThemeColors = {
33
general: {
44
color: '#0a0a0a',
55
backgroundInput: '#fff',
6+
colorPlaceholder: '#0a0a0a',
7+
colorCaret: '#1976d2',
68
colorSpinner: '#333',
7-
colorBorder: '#d3dde7'
9+
colorBorder: '#d3dde7',
10+
backgroundScrollIcon: '#fff'
811
},
912

1013
header: {
1114
background: '#fff'
1215
},
1316

1417
footer: {
15-
background: '#f0f0f0'
18+
background: '#f0f0f0',
19+
borderInputSelected: '#1976d2'
1620
},
1721

1822
content: {
@@ -43,7 +47,8 @@ export const defaultThemeColors = {
4347
colorDate: '#505a62',
4448
backgroundReply: 'rgba(0, 0, 0, 0.08)',
4549
colorReplyUsername: '#0a0a0a',
46-
colorReply: '#6e6e6e'
50+
colorReply: '#6e6e6e',
51+
backgroundImage: '#ddd'
4752
},
4853

4954
room: {
@@ -76,16 +81,20 @@ export const defaultThemeColors = {
7681
general: {
7782
color: '#fff',
7883
backgroundInput: '#202223',
84+
colorPlaceholder: '#fff',
85+
colorCaret: '#1976d2',
7986
colorSpinner: '#fff',
80-
colorBorder: '#63686e'
87+
colorBorder: '#63686e',
88+
backgroundScrollIcon: '#fff'
8189
},
8290

8391
header: {
8492
background: '#181a1b'
8593
},
8694

8795
footer: {
88-
background: '#181a1b'
96+
background: '#181a1b',
97+
borderInputSelected: '#1976d2'
8998
},
9099

91100
content: {
@@ -116,7 +125,8 @@ export const defaultThemeColors = {
116125
colorDate: '#9ca6af',
117126
backgroundReply: 'rgba(0, 0, 0, 0.18)',
118127
colorReplyUsername: '#fff',
119-
colorReply: '#d6d6d6'
128+
colorReply: '#d6d6d6',
129+
backgroundImage: '#ddd'
120130
},
121131

122132
room: {
@@ -163,11 +173,19 @@ export const cssThemeVars = ({
163173
'--chat-color': general.color,
164174
'--chat-bg-color-input': general.backgroundInput,
165175
'--chat-color-spinner': general.colorSpinner,
176+
'--chat-color-placeholder': general.colorPlaceholder,
177+
'--chat-color-caret': general.colorCaret,
166178
'--chat-border-color': general.colorBorder,
179+
'--chat-bg-scroll-icon': general.backgroundScrollIcon,
167180

168-
// layout
181+
// header
169182
'--chat-header-bg-color': header.background,
183+
184+
// footer
170185
'--chat-bg-color-footer': footer.background,
186+
'--chat-border-color-input-selected': footer.borderInputSelected,
187+
188+
// content
171189
'--chat-bg-color-content': content.background,
172190

173191
// sidemenu
@@ -193,6 +211,7 @@ export const cssThemeVars = ({
193211
'--chat-bg-color-message-reply': message.backgroundReply,
194212
'--chat-color-message-reply-username': message.colorReplyUsername,
195213
'--chat-color-message-reply-content': message.colorReply,
214+
'--chat-bg-color-message-image': message.backgroundImage,
196215

197216
// room
198217
'--chat-color-room-username': room.colorUsername,

0 commit comments

Comments
 (0)