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

super3 / nilo.chat / 14297512225

06 Apr 2025 11:06PM UTC coverage: 93.706%. Remained the same
14297512225

push

github

super3
Change to ServerSidebar

165 of 182 branches covered (90.66%)

Branch coverage included in aggregate %.

1 of 2 new or added lines in 2 files covered. (50.0%)

237 of 247 relevant lines covered (95.95%)

10.51 hits per line

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

80.65
/src/components/ServerSidebar.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 {
NEW
27
  name: 'ServerSidebar',
×
28
  props: {
×
29
    currentChannel: {
30
      type: String,
31
      default: 'general'
32
    },
1✔
33
    channelUnreadCounts: {
34
      type: Object,
35
      default: () => ({
36
        general: 0,
1✔
37
        feedback: 0,
38
        'slack-feed': 0,
1✔
39
        dm_self: 0
40
      })
41
    }
1✔
42
  },
1✔
43
  methods: {
1✔
44
    switchChannel(channel) {
45
      if (channel !== this.currentChannel) {
46
        this.$emit('channel-change', channel);
1✔
47
      }
48
    },
49
    getUnreadCount(channel) {
50
      return this.channelUnreadCounts[channel] || 0;
1✔
51
    }
52
  }
53
}
54
</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