mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Co-authored-by: Nithin David Thomas <webofnithin@gmail.com> Co-authored-by: Sojan Jose <sojan@pepalo.com>
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <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"
 | 
						|
    />
 | 
						|
    <h3 class="channel__title">
 | 
						|
      {{ channel }}
 | 
						|
    </h3>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
export default {
 | 
						|
  props: {
 | 
						|
    channel: {
 | 
						|
      type: String,
 | 
						|
      required: true,
 | 
						|
    },
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    isActive(channel) {
 | 
						|
      return ['facebook', 'website'].includes(channel);
 | 
						|
    },
 | 
						|
    onItemClick() {
 | 
						|
      if (this.isActive(this.channel)) {
 | 
						|
        this.$emit('channel-item-click', this.channel);
 | 
						|
      }
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 |