Skip to content

Commit 3cc298c

Browse files
committed
(props) rename formatMessages to textFormatting
1 parent 2087b76 commit 3cc298c

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ You can import it as a custom component:
101101
| showFiles | Boolean | - | true |
102102
| showEmojis | Boolean | - | true |
103103
| showReactionEmojis | Boolean | - | true |
104-
| formatMessages (7) | Boolean | - | true |
104+
| textFormatting (7) | Boolean | - | true |
105105
| textMessages (8) | Object | - | null |
106106
| responsiveBreakpoint (9) | Number | - | 900 |
107107
| singleRoom (10) | Number | - | false |
@@ -189,14 +189,14 @@ textMessages="{
189189
}"
190190
```
191191

192-
(8) `formatMessages` can be used to add text formatting. Currently, bold, italic, strikethrough and underline formatting are available. All text formatting can be used in conjonction. Ex:
192+
(8) `textFormatting` can be used to add text formatting. Currently, bold, italic, strikethrough and underline formatting are available. All text formatting can be used in conjonction. Ex:
193193

194194
| Style | Syntax | Example | Output |
195195
| ----------------- | --------------- | -------------------------------------- | -------------------------------------- |
196196
| Bold | `* *` | `*This is bold text*` | **This is bold text** |
197197
| Italic | `_ _` | `_This text is italicized_` | _This text is italicized_ |
198198
| Strikethrough | `~ ~` | `~This was mistaken text~` | ~~This was mistaken text~~ |
199-
| Underline | `° °` | `°This text is underlined°` | <ins>This text is underlined</ins> |
199+
| Underline | `° °` | `°This text is underlined°` | <ins>This text is underlined</ins> |
200200
| Nested formatting | `* *` and `_ _` | `*This text is _extremely_ important*` | **This text is _extremely_ important** |
201201

202202
(9) `responsiveBreakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.

src/ChatWindow/ChatWindow.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:textMessages="t"
1111
:showAddRoom="showAddRoom"
1212
:showRoomsList="showRoomsList"
13-
:formatMessages="formatMessages"
13+
:textFormatting="textFormatting"
1414
:isMobile="isMobile"
1515
@fetchRoom="fetchRoom"
1616
@addRoom="addRoom"
@@ -34,7 +34,7 @@
3434
:textMessages="t"
3535
:singleRoom="singleRoom"
3636
:showRoomsList="showRoomsList"
37-
:formatMessages="formatMessages"
37+
:textFormatting="textFormatting"
3838
:isMobile="isMobile"
3939
:loadingRooms="loadingRooms"
4040
:roomInfo="$listeners.roomInfo"
@@ -96,7 +96,7 @@ export default {
9696
showFiles: { type: Boolean, default: true },
9797
showEmojis: { type: Boolean, default: true },
9898
showReactionEmojis: { type: Boolean, default: true },
99-
formatMessages: { type: Boolean, default: true },
99+
textFormatting: { type: Boolean, default: true },
100100
newMessage: { type: Object, default: null }
101101
},
102102

src/ChatWindow/FormatMessage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<div v-if="formatMessages">
3+
<div v-if="textFormatting">
44
<template v-for="(message, i) in linkifiedMessage">
55
<component
66
:is="message.types.indexOf('url') !== -1 ? 'a' : 'span'"
@@ -30,7 +30,7 @@ export default {
3030
props: {
3131
content: { type: [String, Number], required: true },
3232
formatLinks: { type: Boolean, default: true },
33-
formatMessages: { type: Boolean, required: true }
33+
textFormatting: { type: Boolean, required: true }
3434
},
3535
3636
computed: {

src/ChatWindow/Message.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<div v-else-if="!message.file">
6565
<format-message
6666
:content="this.message.content"
67-
:formatMessages="formatMessages"
67+
:textFormatting="textFormatting"
6868
></format-message>
6969
</div>
7070

@@ -103,7 +103,7 @@
103103
</div>
104104
<format-message
105105
:content="this.message.content"
106-
:formatMessages="formatMessages"
106+
:textFormatting="textFormatting"
107107
></format-message>
108108
</div>
109109

@@ -251,7 +251,7 @@ export default {
251251
roomFooterRef: { type: HTMLDivElement },
252252
newMessages: { type: Array },
253253
showReactionEmojis: { type: Boolean, required: true },
254-
formatMessages: { type: Boolean, required: true },
254+
textFormatting: { type: Boolean, required: true },
255255
emojisList: { type: Object, required: true },
256256
hideOptions: { type: Boolean, required: true }
257257
},

src/ChatWindow/Room.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
:roomFooterRef="$refs.roomFooter"
9595
:newMessages="newMessages"
9696
:showReactionEmojis="showReactionEmojis"
97-
:formatMessages="formatMessages"
97+
:textFormatting="textFormatting"
9898
:emojisList="emojisList"
9999
:hideOptions="hideOptions"
100100
@messageActionHandler="messageActionHandler"
@@ -265,7 +265,7 @@ export default {
265265
showFiles: { type: Boolean, required: true },
266266
showEmojis: { type: Boolean, required: true },
267267
showReactionEmojis: { type: Boolean, required: true },
268-
formatMessages: { type: Boolean, required: true },
268+
textFormatting: { type: Boolean, required: true },
269269
loadingRooms: { type: Boolean, required: true },
270270
roomInfo: { type: Function }
271271
},

src/ChatWindow/RoomsList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<format-message
6767
:content="getLastMessage(room)"
6868
:formatLinks="false"
69-
:formatMessages="formatMessages"
69+
:textFormatting="textFormatting"
7070
></format-message>
7171
</div>
7272
</div>
@@ -91,7 +91,7 @@ export default {
9191
textMessages: { type: Object, required: true },
9292
showRoomsList: { type: Boolean, required: true },
9393
showAddRoom: { type: Boolean, required: true },
94-
formatMessages: { type: Boolean, required: true },
94+
textFormatting: { type: Boolean, required: true },
9595
isMobile: { type: Boolean, required: true },
9696
rooms: { type: Array, required: true },
9797
loadingRooms: { type: Boolean, required: true },

0 commit comments

Comments
 (0)