• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

super3 / nilo.chat / 14284891346

05 Apr 2025 07:02PM UTC coverage: 96.296%. Remained the same
14284891346

push

github

super3
Update ChannelSidebar.vue

157 of 164 branches covered (95.73%)

Branch coverage included in aggregate %.

233 of 241 relevant lines covered (96.68%)

9.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.65
/src/components/ChannelSidebar.vue
1
<template>
2
  <div class="bg-indigo-darkest text-purple-lighter flex-none w-24 p-6 hidden md:block">
3
    <div class="cursor-pointer mb-4 relative" @click="switchChannel('general')">
4
      <div class="bg-indigo-lighter opacity-25 h-12 w-12 flex items-center justify-center text-black text-2xl font-semibold rounded-lg mb-1 overflow-hidden">
1✔
5
        N
6
      </div>
7
      <div class="text-center text-white opacity-50 text-sm">&#8984;1</div>
1✔
8
      <div v-if="getUnreadCount('general') > 0" class="absolute -top-1 -right-1">
1✔
9
        <span class="bg-red-600 text-white text-xs rounded-full py-1 px-2 font-bold">
10
          {{ getUnreadCount('general') }}
11
        </span>
12
      </div>
13
    </div>
14
    
15
    <a href="https://github.com/super3/nilo.chat" target="_blank" class="cursor-pointer block">
16
      <div class="bg-white opacity-25 h-12 w-12 flex items-center justify-center text-black text-2xl font-semibold rounded-lg mb-1 overflow-hidden hover:opacity-30 transition-opacity">
17
        <svg class="fill-current h-10 w-10 block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
1✔
18
          <path d="M16 10c0 .553-.048 1-.601 1H11v4.399c0 .552-.447.601-1 .601-.553 0-1-.049-1-.601V11H4.601C4.049 11 4 10.553 4 10c0-.553.049-1 .601-1H9V4.601C9 4.048 9.447 4 10 4c.553 0 1 .048 1 .601V9h4.399c.553 0 .601.447.601 1z"/>
19
        </svg>
20
      </div>
21
    </a>
22
  </div>
23
</template>
24

25
<script>
26
export default {
×
27
  name: 'ChannelSidebar',
×
28
  props: {
29
    currentChannel: {
30
      type: String,
31
      default: 'general'
1✔
32
    },
33
    channelUnreadCounts: {
34
      type: Object,
35
      default: () => ({
1✔
36
        general: 0,
37
        feedback: 0,
1✔
38
        dm_self: 0
39
      })
40
    }
1✔
41
  },
1✔
42
  methods: {
1✔
43
    switchChannel(channel) {
44
      if (channel !== this.currentChannel) {
45
        this.$emit('channel-change', channel);
1✔
46
      }
47
    },
48
    getUnreadCount(channel) {
49
      return this.channelUnreadCounts[channel] || 0;
1✔
50
    }
51
  }
52
}
53
</script> 
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc