Skip to content

Instantly share code, notes, and snippets.

@ItsOnlyBinary
Last active December 16, 2018 18:29
Show Gist options
  • Save ItsOnlyBinary/174760259d8b9fe3b2fbb42a13027ea4 to your computer and use it in GitHub Desktop.
Save ItsOnlyBinary/174760259d8b9fe3b2fbb42a13027ea4 to your computer and use it in GitHub Desktop.
<template id="channel_list_button_template">
<div @click="buttonClicked">
<a v-if="$state.ui.app_width > 769">Channel List</a>
<a v-else><i class="fa fa-list" aria-hidden="true"></i></a>
</div>
</template>
<script>
kiwi.plugin('channel_list_button', function(kiwi, log) {
var button = new kiwi.Vue({
template: '#channel_list_button_template',
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');
}
network.showServerBuffer('channels');
}
},
});
button.$mount();
setTimeout(function t() {
kiwi.addUi('header_channel', button.$el);
}, 5000);
});
</script>
@MrGrays
Copy link

MrGrays commented Dec 14, 2018

screenshot_20181214-165052_chrome

No close button showing on mobile device (Samsung S8+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment