Refactor: Minor code refactoring in accordance with Vue.js best practices (#368)
This commit is contained in:
parent
17587d8a0c
commit
87fb1adab1
14 changed files with 23 additions and 27 deletions
|
@ -2,7 +2,7 @@
|
|||
<div class="row empty-state">
|
||||
<h3 class="title">{{title}}</h3>
|
||||
<p class="message">{{message}}</p>
|
||||
<slot></slot>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<i class="icon ion-ios-search-strong"></i>
|
||||
<input class="input" type="email" v-bind:placeholder="$t('CHAT_LIST.SEARCH.INPUT')">
|
||||
<i class="icon ion-ios-search-strong" />
|
||||
<input class="input" type="email" :placeholder="$t('CHAT_LIST.SEARCH.INPUT')">
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
background-color="#1f93ff"
|
||||
color="white"
|
||||
:size="avatarSize"
|
||||
>
|
||||
</Avatar>
|
||||
/>
|
||||
<img
|
||||
v-if="badge === 'Channel::FacebookPage'"
|
||||
id="badge"
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
:inbox-id="inboxId"
|
||||
:is-contact-panel-open="isContactPanelOpen"
|
||||
@contactPanelToggle="onToggleContactPanel"
|
||||
>
|
||||
</messages-view>
|
||||
<empty-state v-else></empty-state>
|
||||
/>
|
||||
<empty-state v-else />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
:label="data.attachment.fallback_title"
|
||||
:readable-time="readableTime"
|
||||
/>
|
||||
<i v-if="data.message_type === 2" class="icon ion-person"></i>
|
||||
<i v-if="data.message_type === 2" class="icon ion-person" />
|
||||
<bubble-text
|
||||
v-if="data.content"
|
||||
:message="message"
|
||||
|
@ -34,7 +34,7 @@
|
|||
class="icon ion-android-lock"
|
||||
@mouseenter="isHovered = true"
|
||||
@mouseleave="isHovered = false"
|
||||
></i>
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
<!-- <img v-if="showSenderData" src="https://chatwoot-staging.s3-us-west-2.amazonaws.com/uploads/avatar/contact/3415/thumb_10418362_10201264050880840_6087258728802054624_n.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI3KBM2ES3VRHQHPQ%2F20170422%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20170422T075421Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=8d5ff60e41415515f59ff682b9a4e4c0574d9d9aabfeff1dc5a51087a9b49e03" class="sender--thumbnail"> -->
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
class="icon ion-happy-outline"
|
||||
:class="{ active: showEmojiPicker }"
|
||||
@click="toggleEmojiPicker()"
|
||||
></i>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="reply-box__bottom">
|
||||
|
@ -65,7 +65,7 @@
|
|||
'ion-android-send': !isPrivate,
|
||||
'ion-android-lock': isPrivate,
|
||||
}"
|
||||
></i>
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,7 +114,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
const isSlashCommand = val[0] === '/';
|
||||
const hasNextWord = val.indexOf(' ') > -1;
|
||||
const hasNextWord = val.includes(' ');
|
||||
const isShortCodeActive = isSlashCommand && !hasNextWord;
|
||||
if (isShortCodeActive) {
|
||||
this.showCannedResponsesList = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue