From e73bf1e9a7520fed28ccca3e00e361407b44fb45 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Sun, 3 Mar 2019 21:43:57 +0200 Subject: [PATCH] Move closeChan functionality to vue. --- client/components/Channel.vue | 34 ++++++++++++++++++++++++---- client/components/ChannelWrapper.vue | 26 +++++++++++++++++++++ client/js/contextMenuFactory.js | 11 ++++++++- client/js/lounge.js | 6 +---- client/js/utils.js | 26 --------------------- 5 files changed, 66 insertions(+), 37 deletions(-) diff --git a/client/components/Channel.vue b/client/components/Channel.vue index e48df51a..815ab750 100644 --- a/client/components/Channel.vue +++ b/client/components/Channel.vue @@ -1,5 +1,10 @@ @@ -37,5 +56,10 @@ export default { network: Object, channel: Object, }, + methods: { + close() { + this.$refs.wrapper.close(); + }, + }, }; diff --git a/client/components/ChannelWrapper.vue b/client/components/ChannelWrapper.vue index 6e010735..3638da00 100644 --- a/client/components/ChannelWrapper.vue +++ b/client/components/ChannelWrapper.vue @@ -19,6 +19,7 @@ :data-name="channel.name" :aria-controls="'#chan-' + channel.id" :aria-selected="activeChannel && channel === activeChannel.channel" + :style="closed ? {transition: 'none', opacity: 0.4} : null" role="tab" > @@ -26,6 +27,8 @@