-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathplugin-channels-sidebar.html
More file actions
75 lines (64 loc) · 1.85 KB
/
Copy pathplugin-channels-sidebar.html
File metadata and controls
75 lines (64 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template id="channels-sidebar-button">
<a @click="buttonClicked">
<span v-if="$state.ui.app_width > 769">{{ $t('channels') }}</span>
<i v-else class="fa fa-list" aria-hidden="true" :title="$t('channels')"></i>
</a>
</template>
<script>
kiwi.plugin('channels-sidebar', function (kiwi, log) {
var chanList = kiwi.require('components/ChannelList');
var Button = kiwi.Vue.extend({
template: '#channels-sidebar-button',
methods: {
buttonClicked: function buttonClicked() {
var network = this.$state.getActiveNetwork();
if (!network.channel_list.length && network.channel_list_state !== 'updating') {
network.channel_list_state = 'updating';
network.ircClient.raw('LIST');
}
kiwi.showInSidebar(chanList, { network: network });
}
},
});
var buttonComponent = new Button();
kiwi.addUi('header_channel', buttonComponent.$mount().$el);
});
</script>
<style>
.kiwi-sidebar .kiwi-channellist {
padding-bottom: 0;
height: 100%;
}
.kiwi-sidebar .kiwi-channellist-content-container {
height: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.kiwi-sidebar .kiwi-channellist-padding-top {
padding-top: 100px;
}
.kiwi-sidebar .kiwi-channellist-nav .u-form .u-input {
width: 100%;
}
/* Table Styling */
.kiwi-sidebar .kiwi-channellist-table {
width: 100%;
height: 100%;
overflow-y: auto;
}
.kiwi-sidebar .kiwi-channellist-grid {
grid-template-columns: 66px auto min-content;
}
.kiwi-sidebar .kiwi-channellist-topic {
grid-column: 1 / span 3;
grid-row: 2;
word-break: break-word;
}
.kiwi-sidebar .kiwi-channellist-join {
grid-column: 3;
}
.kiwi-sidebar .kiwi-channellist-nav:last-of-type {
display: none;
}
</style>