File tree Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 11
11
{{ user.username }}
12
12
</option >
13
13
</select >
14
- <chat-container :currentUserId =" currentUserId" v-if =" showChat" />
14
+
15
+ <div class =" button-theme" >
16
+ <button @click =" theme = 'light'" class =" button-light" >Light</button >
17
+ <button @click =" theme = 'dark'" class =" button-dark" >Dark</button >
18
+ </div >
19
+
20
+ <chat-container
21
+ :currentUserId =" currentUserId"
22
+ :theme =" theme"
23
+ v-if =" showChat"
24
+ />
15
25
</div >
16
26
</div >
17
27
</template >
@@ -27,6 +37,7 @@ export default {
27
37
28
38
data () {
29
39
return {
40
+ theme: ' light' ,
30
41
showChat: true ,
31
42
users: [
32
43
{
@@ -124,4 +135,37 @@ select {
124
135
font-size : 12px ;
125
136
margin-right : 5px ;
126
137
}
138
+
139
+ .button-theme {
140
+ float : right ;
141
+
142
+ .button-light {
143
+ background : #cbced1 ;
144
+ }
145
+
146
+ .button-dark {
147
+ background : #1C1D21 ;
148
+ }
149
+
150
+ button {
151
+ color : #fff ;
152
+ outline : none ;
153
+ cursor : pointer ;
154
+ border-radius : 4px ;
155
+ padding : 8px 12px ;
156
+ margin-left : 10px ;
157
+ border : none ;
158
+ font-size : 14px ;
159
+ transition : 0.3s ;
160
+ vertical-align : middle ;
161
+
162
+ & :hover {
163
+ opacity : 0.8 ;
164
+ }
165
+
166
+ & :active {
167
+ opacity : 0.6 ;
168
+ }
169
+ }
170
+ }
127
171
</style >
Original file line number Diff line number Diff line change 47
47
48
48
<chat-window
49
49
height =" calc(100vh - 80px)"
50
+ :theme =" theme"
50
51
:rooms =" rooms"
51
52
:loadingRooms =" loadingRooms"
52
53
:messages =" messages"
@@ -81,7 +82,7 @@ export default {
81
82
ChatWindow
82
83
},
83
84
84
- props: [' currentUserId' ],
85
+ props: [' currentUserId' , ' theme ' ],
85
86
86
87
data () {
87
88
return {
You can’t perform that action at this time.
0 commit comments