mixit/src/services/discord/Channel.vue

26 lines
586 B
Vue
Raw Normal View History

2019-05-02 16:28:00 +00:00
<template lang="pug">
.channel(:class="{ danger: channel.nsfw }") {{ name }}
</template>
<script lang="ts">
import { Component, Prop } from 'vue-property-decorator'
import ShowMediaMixin from '@/components/ShowMediaMixin'
import { MappedChannel } from './Types'
const MAX_LENGTH = 20
@Component
2019-05-03 15:03:13 +00:00
export default class Channel extends ShowMediaMixin {
2019-05-02 16:28:00 +00:00
@Prop(Object)
readonly channel!: MappedChannel
get name() {
return (this.channel.parent && this.channel.parent.name ? this.channel.parent.name + ' / ' : '')
+ (this.channel.name || this.channel.id)
}
}
</script>