Skip to content

Commit 4a62ad4

Browse files
committed
(clean) templates text and css
1 parent b9c627e commit 4a62ad4

File tree

10 files changed

+23
-29
lines changed

10 files changed

+23
-29
lines changed

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
"eslint-plugin-vue": "^7.14.0",
3030
"node-sass": "^6.0.1",
3131
"sass-loader": "^10.1.1",
32-
"vue-template-compiler": "^2.6.11"
32+
"vue-template-compiler": "^2.6.14"
3333
}
3434
}

demo/src/ChatContainer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ export default {
150150
},
151151
{
152152
tag: 'action',
153-
text: 'this is the action'
153+
text: 'This is the action'
154154
},
155155
{
156156
tag: 'action 2',
157-
text: 'this is the second action'
157+
text: 'This is the second action'
158158
}
159159
]
160160
// ,dbRequestCount: 0

src/lib/Room/Room.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
@select-user-tag="selectUserTag($event)"
141141
/>
142142

143-
<room-Templates-Text
143+
<room-templates-text
144144
:filtered-templates-text="filteredTemplatesText"
145145
:active-template="activeTemplate"
146146
:active-up-or-down="activeUpOrDown"
@@ -536,7 +536,7 @@ export default {
536536
if (isMobile) {
537537
this.message = this.message + '\n'
538538
setTimeout(() => this.onChangeInput())
539-
} else if (this.filteredTemplatesText.length === 0) {
539+
} else if (!this.filteredTemplatesText.length) {
540540
this.sendMessage()
541541
}
542542
}
@@ -786,7 +786,9 @@ export default {
786786
},
787787
selectTemplateText(template) {
788788
this.activeTemplate = false
789+
789790
if (!template) return
791+
790792
const { position, endPosition } = this.getCharPosition('/')
791793
792794
const space = this.message.substr(endPosition, endPosition).length
@@ -801,6 +803,7 @@ export default {
801803
802804
this.cursorRangePosition =
803805
position + template.text.length + space.length + 1
806+
804807
this.focusTextarea()
805808
},
806809
beforeEnter() {

src/lib/Room/RoomEmojis/RoomEmojis.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
font-size: 30px;
1212
border-radius: 4px;
1313
cursor: pointer;
14+
background: var(--chat-footer-bg-color-tag);
15+
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
1416

1517
&:hover {
1618
background: var(--chat-footer-bg-color-tag-active);
17-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
18-
}
19-
20-
&:not(:hover) {
21-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
2219
}
2320
}
2421
}

src/lib/Room/RoomTemplatesText/RoomTemplatesText.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.vac-template-container {
2-
position: absolute;
32
display: flex;
43
flex-direction: column;
54
align-items: center;
@@ -14,21 +13,24 @@
1413
background: var(--chat-footer-bg-color-tag);
1514
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
1615
}
16+
1717
.vac-template-active {
1818
background: var(--chat-footer-bg-color-tag-active);
19-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1) !important;
2019
}
20+
2121
.vac-template-info {
2222
display: flex;
2323
overflow: hidden;
2424
padding: 0 20px;
2525
align-items: center;
2626
}
27+
2728
.vac-template-tag {
2829
font-size: 14px;
2930
font-weight: bold;
3031
margin-right: 10px;
3132
}
33+
3234
.vac-template-text {
3335
font-size: 14px;
3436
}
@@ -42,4 +44,4 @@
4244
padding: 0 12px;
4345
}
4446
}
45-
}
47+
}

src/lib/Room/RoomTemplatesText/RoomTemplatesText.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
>
1616
<div class="vac-template-info">
1717
<div class="vac-template-tag">
18-
/{{ template.tag }}
19-
</div>
18+
/{{ template.tag }}
19+
</div>
2020
<div class="vac-template-text">
2121
{{ template.text }}
2222
</div>

src/lib/Room/RoomUsersTag/RoomUsersTag.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@
1010
height: 54px;
1111
overflow: hidden;
1212
cursor: pointer;
13-
background: var(--chat-footer-bg-color);
13+
background: var(--chat-footer-bg-color-tag);
14+
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
1415

1516
&:hover {
1617
background: var(--chat-footer-bg-color-tag-active);
17-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
18-
}
19-
20-
&:not(:hover) {
21-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
2218
}
2319
}
2420

src/lib/RoomsList/RoomsList.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@
4343
padding: 0 14px;
4444
position: relative;
4545
min-height: 71px;
46+
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
4647

4748
&:hover {
4849
background: var(--chat-sidemenu-bg-color-hover);
49-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
50-
}
51-
52-
&:not(:hover) {
53-
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
5450
}
5551
}
5652

src/lib/RoomsList/RoomsList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import Loader from '../../components/Loader/Loader'
6868
import RoomsSearch from './RoomsSearch/RoomsSearch'
6969
import RoomContent from './RoomContent/RoomContent'
7070
71-
import filteredUsers from '../../utils/filter-items'
71+
import filteredItems from '../../utils/filter-items'
7272
7373
export default {
7474
name: 'RoomsList',
@@ -175,7 +175,7 @@ export default {
175175
}
176176
},
177177
searchRoom(ev) {
178-
this.filteredRooms = filteredUsers(
178+
this.filteredRooms = filteredItems(
179179
this.rooms,
180180
'roomName',
181181
ev.target.value

src/themes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const defaultThemeStyles = {
2929
borderInputSelected: '#1976d2',
3030
backgroundReply: '#e5e5e6',
3131
backgroundTagActive: '#e5e5e6',
32-
backgroundTag: '#fff'
32+
backgroundTag: '#f8f9fa'
3333
},
3434

3535
content: {

0 commit comments

Comments
 (0)