[mockup.channels] update with 'local' data encapsuled [init.local-channels] removed [vue.menu] updated
This commit is contained in:
parent
8c8acdaca7
commit
cc062028aa
|
@ -25,6 +25,3 @@ gs.set('router', new VueRouter({
|
|||
---------------------------------------------------------*/
|
||||
/* (1) Initialize channels & channel menu */
|
||||
require('./init/channels.js');
|
||||
|
||||
/* (2) Initialize local channels (for a specific channel) */
|
||||
require('./init/local-channels.js');
|
|
@ -8,10 +8,8 @@ gs.get.channel.current = null;
|
|||
|
||||
/* (3) Initialize list */
|
||||
gs.get.channel.list = [
|
||||
{ id: -1, link: 'me', label: 'My data', sub: '0 online', icon: 'group' },
|
||||
{ id: 0, link: 'test-1', label: 'test 1', sub: null, icon: 'test1' },
|
||||
{ id: 1, link: 'test-2', label: 'test 2', sub: null, icon: 'test2' },
|
||||
{ id: -2, link: null, label: 'add', sub: null, icon: 'add', add: 1 }
|
||||
{ id: -1, link: 'me', label: 'My data', sub: '0 online', icon: 'group', local: [] },
|
||||
{ id: -2, link: null, label: 'add', sub: null, icon: 'add', local: [], add: 1 }
|
||||
];
|
||||
|
||||
/* (4) Initialize vue-router channel navigation */
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/* (1) Initialisation
|
||||
---------------------------------------------------------*/
|
||||
/* (1) Init @channel object */
|
||||
gs.set('lchannel', [
|
||||
{
|
||||
type: 'text',
|
||||
visible: true,
|
||||
list: [ 'general', 'test-text' ],
|
||||
active: 0
|
||||
},
|
||||
{
|
||||
type: 'voice',
|
||||
visible: true,
|
||||
list: [ 'general' , 'test-voice' ],
|
||||
active: null
|
||||
}
|
||||
]);
|
|
@ -24,5 +24,12 @@ new Vue({
|
|||
render(h){ return h(wrapper); }
|
||||
})
|
||||
|
||||
|
||||
|
||||
/* (3) Channel data gathering
|
||||
---------------------------------------------------------*/
|
||||
/* (1) Fetch channel data */
|
||||
gs.get.channel.dump( require('./mockup/channels.json') );
|
||||
|
||||
/* (2) Initialize channel_id guess */
|
||||
gs.get.channel.nav();
|
|
@ -2,11 +2,39 @@
|
|||
{
|
||||
"id": 0,
|
||||
"link": "channel-1",
|
||||
"label": "first channel"
|
||||
"label": "first channel",
|
||||
"local": [
|
||||
{
|
||||
"type": "text",
|
||||
"visible": true,
|
||||
"list": [ "general", "test-text" ],
|
||||
"active": 0
|
||||
},
|
||||
{
|
||||
"type": "voice",
|
||||
"visible": true,
|
||||
"list": [ "general" , "test-voice" ],
|
||||
"active": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"link": "common-channel",
|
||||
"label": "Common Channel"
|
||||
"label": "Common Channel",
|
||||
"local": [
|
||||
{
|
||||
"type": "text",
|
||||
"visible": true,
|
||||
"list": [ "general2", "test-text-common" ],
|
||||
"active": 0
|
||||
},
|
||||
{
|
||||
"type": "voice",
|
||||
"visible": true,
|
||||
"list": [ "general2" , "test-voice-common" ],
|
||||
"active": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<div class='body'>
|
||||
|
||||
<div v-for='c in gs.lchannel'>
|
||||
<div v-for='c in gs.channel.get().local' v-show='c.list.length>0'>
|
||||
<div class='toggle'
|
||||
:data-toggle='c.visible?1:0'
|
||||
@click='c.visible=!c.visible'>{{ c.type }} channels</div>
|
||||
|
|
Loading…
Reference in New Issue