Skip to content

Commit 0b003dc

Browse files
committed
(prop) add show-footer
1 parent 2236d10 commit 0b003dc

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,14 @@ fetchMessages({ room, options }) {
184184
| show-emojis | Boolean | - | true |
185185
| show-reaction-emojis | Boolean | - | true |
186186
| show-new-messages-divider (9) | Boolean | - | true |
187-
| text-messages (10) | Object | - | null |
188-
| text-formatting (11) | Boolean | - | true |
189-
| responsive-breakpoint (12) | Number | - | 900 |
190-
| single-room (13) | Boolean | - | false |
191-
| theme (14) | Sring | - | light |
192-
| accepted-files (15) | String | - | "\*" |
193-
| styles (16) | Object | - | (10) |
187+
| show-footer (10) | Boolean | - | true |
188+
| text-messages (11) | Object | - | null |
189+
| text-formatting (12) | Boolean | - | true |
190+
| responsive-breakpoint (13) | Number | - | 900 |
191+
| single-room (14) | Boolean | - | false |
192+
| theme (15) | Sring | - | light |
193+
| accepted-files (16) | String | - | "\*" |
194+
| styles (17) | Object | - | (10) |
194195

195196
(1) `current-user-id` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
196197

@@ -266,7 +267,9 @@ messageActions="[
266267

267268
(9) `show-new-messages-divider` can be used to show/hide the blue line divider between seen and unseen messages.
268269

269-
(10) `text-messages` can be used to replace default i18n texts. Ex:
270+
(10) `show-footer` can be used to hide the room footer. For example to prevent users to send any message or media.
271+
272+
(11) `text-messages` can be used to replace default i18n texts. Ex:
270273

271274
```javascript
272275
text-messages="{
@@ -284,7 +287,7 @@ text-messages="{
284287
}"
285288
```
286289

287-
(11) `text-formatting` can be used to add text formatting. Currently, bold, italic, strikethrough, underline, inline code and multiline code formatting are available and can be used in conjonction. You can disable text formatting by passing the prop as `:textFormatting="false"`.
290+
(12) `text-formatting` can be used to add text formatting. Currently, bold, italic, strikethrough, underline, inline code and multiline code formatting are available and can be used in conjonction. You can disable text formatting by passing the prop as `:textFormatting="false"`.
288291

289292
| Style | Syntax | Example | Output |
290293
| ----------------- | --------------- | -------------------------------------- | -------------------------------------- |
@@ -311,17 +314,17 @@ This is
311314
multiline code
312315
```
313316

314-
(12) `responsive-breakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
317+
(13) `responsive-breakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
315318

316-
(13) `single-room` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
319+
(14) `single-room` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
317320

318-
(14) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
321+
(15) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
319322

320-
(15) `accepted-files` can be used to set specifics file types allowed in chat. By default, all file types are allowed: `"*"`.
323+
(16) `accepted-files` can be used to set specifics file types allowed in chat. By default, all file types are allowed: `"*"`.
321324

322325
Example: set `"accepted-files="image/png, image/jpeg, application/pdf"` to allow `JPG` `PNG` and `PDF` files
323326

324-
(16) `styles` can be used to customize your own theme. Ex:
327+
(17) `styles` can be used to customize your own theme. Ex:
325328

326329
```javascript
327330
styles="{

src/ChatWindow/ChatWindow.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
:show-emojis="showEmojis"
3737
:show-reaction-emojis="showReactionEmojis"
3838
:show-new-messages-divider="showNewMessagesDivider"
39+
:show-footer="showFooter"
3940
:text-messages="t"
4041
:single-room="singleRoom"
4142
:show-rooms-list="showRoomsList"
@@ -111,6 +112,7 @@ export default {
111112
showEmojis: { type: Boolean, default: true },
112113
showReactionEmojis: { type: Boolean, default: true },
113114
showNewMessagesDivider: { type: Boolean, default: true },
115+
showFooter: { type: Boolean, default: true },
114116
textFormatting: { type: Boolean, default: true },
115117
newMessage: { type: Object, default: null },
116118
roomMessage: { type: String, default: '' },

src/ChatWindow/Room.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
</div>
190190
</transition>
191191

192-
<div class="vac-box-footer">
192+
<div class="vac-box-footer" v-if="showFooter">
193193
<div class="vac-icon-textarea-left" v-if="showAudio && !imageFile">
194194
<div class="vac-svg-button" @click="recordAudio">
195195
<slot
@@ -373,6 +373,7 @@ export default {
373373
showEmojis: { type: Boolean, required: true },
374374
showReactionEmojis: { type: Boolean, required: true },
375375
showNewMessagesDivider: { type: Boolean, required: true },
376+
showFooter: { type: Boolean, required: true },
376377
acceptedFiles: { type: String, required: true },
377378
textFormatting: { type: Boolean, required: true },
378379
loadingRooms: { type: Boolean, required: true },

0 commit comments

Comments
 (0)