diff --git a/webpack/lib/channel-controller.js b/webpack/lib/channel-controller.js
index faba422..0d97e87 100644
--- a/webpack/lib/channel-controller.js
+++ b/webpack/lib/channel-controller.js
@@ -28,6 +28,10 @@ export default class ChannelController{
*
---------------------------------------------------------*/
nav(channel_id=null){
+
+ if( channel_id == -2 )
+ return gs.get.popup.show('channel.create');
+
console.log(`channel.nav(${channel_id})`);
/* (1) Get channel data */
diff --git a/webpack/lib/popup-controller.js b/webpack/lib/popup-controller.js
index c4a5a0b..2fe95a3 100644
--- a/webpack/lib/popup-controller.js
+++ b/webpack/lib/popup-controller.js
@@ -29,14 +29,14 @@ export default class PopupController{
reset(){ this.data.type = 'text'; this.data.name = ''; },
submit(){ gs.get.room.create(this.data.type, this.data.name) && this.parent.hide(); }
});
- // this.croom = {
-
- // active: false,
- // type: 'text',
- // name: '',
-
-
- // }; this.reset.push(this.croom.reset);
+ /* (2) Create a new Channel */
+ this.register('channel.create', {
+ data: {
+ name: ''
+ },
+ reset(){ this.data.name = ''; },
+ submit(){ gs.get.channel.create(this.data.name) && this.parent.hide(); }
+ });
}
diff --git a/webpack/page/noauth/register.js b/webpack/page/noauth/register.js
index b1837c9..39e7a21 100644
--- a/webpack/page/noauth/register.js
+++ b/webpack/page/noauth/register.js
@@ -126,8 +126,6 @@ gs.get.register.func.register = function(){
/* (3) API bindings */
api.call('POST /user', { username: username, password: password }, function(rs){
- console.log(rs);
-
// manage error
if( rs.error !== 0 || rs.uid == null || rs.token == null )
return gs.get.router.push('register');
diff --git a/webpack/vue/auth/channel.vue b/webpack/vue/auth/channel.vue
index ee482aa..75732c2 100644
--- a/webpack/vue/auth/channel.vue
+++ b/webpack/vue/auth/channel.vue
@@ -22,7 +22,7 @@
diff --git a/webpack/vue/auth/menu.vue b/webpack/vue/auth/menu.vue
index 871578c..4fafa23 100644
--- a/webpack/vue/auth/menu.vue
+++ b/webpack/vue/auth/menu.vue
@@ -8,7 +8,7 @@
-
+
+
+
+