From 4fb99407f4db81c4e08e60b2c1de28ebc4fca6ff Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 21 Mar 2018 20:27:34 +0100 Subject: [PATCH] [init.channels | vue.menu] renamed channel.active to channel.current --- webpack/init/channels.js | 12 ++++++------ webpack/vue/menu.vue | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/webpack/init/channels.js b/webpack/init/channels.js index 7e37f0d..cecaa31 100644 --- a/webpack/init/channels.js +++ b/webpack/init/channels.js @@ -4,7 +4,7 @@ gs.set('channel', {}); /* (2) Set default active channel */ -gs.get.channel.active = null; +gs.get.channel.current = null; /* (3) Initialize list */ gs.get.channel.list = [ @@ -40,7 +40,7 @@ gs.get.channel.nav = function(channel_id=null){ gs.get.router.push(`/channel/${channel.label}`); /* (4) Update active element */ - this.active = channel.id; + this.current = channel.id; /* (5) Log channel */ console.log(`[channel.current] ${channel.label}`); @@ -95,12 +95,12 @@ gs.get.channel.get = function(channel_id=null){ /* (1) Get @active channel ---------------------------------------------------------*/ /* (1) If @active is set */ - if( !isNaN(this.active) ){ + if( !isNaN(this.current) ){ /* (2) Return matching id in list */ for( let c of this.list ){ - if( c.id === this.active ) + if( c.id === this.current ) return c; // exit point } @@ -121,7 +121,7 @@ gs.get.channel.get = function(channel_id=null){ if( c.label === label ){ - this.active = c.id; // set @active + this.current = c.id; // set @active return c; // exit point } @@ -141,7 +141,7 @@ gs.get.channel.get = function(channel_id=null){ return c; // exit point /* (2) Return default: if ID not found */ - this.active = this.list[0].id; + this.current = this.list[0].id; return this.list[0]; } diff --git a/webpack/vue/menu.vue b/webpack/vue/menu.vue index 08a3a58..92ec304 100644 --- a/webpack/vue/menu.vue +++ b/webpack/vue/menu.vue @@ -9,7 +9,7 @@