2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
2019-10-29 07:20:54 +00:00
|
|
|
<div
|
|
|
|
class="small-3 columns channel"
|
|
|
|
:class="{ inactive: !isActive(channel) }"
|
|
|
|
@click="onItemClick"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
v-if="channel === 'facebook'"
|
|
|
|
src="~dashboard/assets/images/channels/facebook.png"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-if="channel === 'twitter'"
|
|
|
|
src="~dashboard/assets/images/channels/twitter.png"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-if="channel === 'telegram'"
|
|
|
|
src="~dashboard/assets/images/channels/telegram.png"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-if="channel === 'line'"
|
|
|
|
src="~dashboard/assets/images/channels/line.png"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
v-if="channel === 'website'"
|
|
|
|
src="~dashboard/assets/images/channels/website.png"
|
|
|
|
/>
|
2020-04-05 16:41:27 +00:00
|
|
|
<img
|
|
|
|
v-if="channel === 'twilio'"
|
|
|
|
src="~dashboard/assets/images/channels/twilio.png"
|
|
|
|
/>
|
2019-10-29 07:20:54 +00:00
|
|
|
<h3 class="channel__title">
|
|
|
|
{{ channel }}
|
|
|
|
</h3>
|
2019-08-14 09:48:44 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2019-10-29 07:20:54 +00:00
|
|
|
props: {
|
|
|
|
channel: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2019-10-29 07:20:54 +00:00
|
|
|
isActive(channel) {
|
2020-04-05 16:41:27 +00:00
|
|
|
return ['facebook', 'website', 'twitter', 'twilio'].includes(channel);
|
2019-10-29 07:20:54 +00:00
|
|
|
},
|
|
|
|
onItemClick() {
|
|
|
|
if (this.isActive(this.channel)) {
|
|
|
|
this.$emit('channel-item-click', this.channel);
|
|
|
|
}
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|