controltower
Advanced tools
Comparing version 0.13.12 to 0.14.0
@@ -13,7 +13,8 @@ const formLabels = { | ||
sidebar: { | ||
home: 'Home', | ||
home: 'Início', | ||
channels: 'Canais', | ||
ecommerce: 'E-commerce', | ||
ecommerce: 'Comércio', | ||
replies: 'Respostas', | ||
mutedChats: 'Assistentes silenciados' | ||
mutedChats: 'Assistentes silenciados', | ||
debug: 'Depuração' | ||
}, | ||
@@ -130,3 +131,6 @@ footer: { | ||
} | ||
}, | ||
developers: { | ||
title: 'Depuração' | ||
} | ||
}; |
{ | ||
"name": "controltower", | ||
"version": "0.13.12", | ||
"version": "0.14.0", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "license": "AGPL-3.0", |
@@ -19,3 +19,3 @@ 'use strict'; | ||
e.preventDefault(); | ||
const pathname = key === 'home' ? '/' : `/${ key }`; | ||
const pathname = `/${ key }`; | ||
send('ui:selectSection', key); | ||
@@ -22,0 +22,0 @@ send('location:set', { pathname }); |
@@ -81,7 +81,8 @@ 'use strict'; | ||
var _debug = require('./views/debug'); | ||
var _debug2 = _interopRequireDefault(_debug); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// config | ||
const app = (0, _choo2.default)({ history: false, href: false }); | ||
// views | ||
@@ -91,3 +92,6 @@ | ||
// models | ||
const app = (0, _choo2.default)({ history: false, href: false }); | ||
// config | ||
app.model(_app2.default); | ||
@@ -105,10 +109,12 @@ app.model(_ui2.default); | ||
const viewWrapper = (0, _ramda.pipe)(authWrapper, _main2.default); | ||
const homeView = (0, _dashboard2.default)(_home2.default); | ||
const channelsView = (0, _dashboard2.default)(_channels2.default); | ||
const ecommerceView = (0, _dashboard2.default)(_ecommerce2.default); | ||
const repliesView = (0, _dashboard2.default)(_replies4.default); | ||
const mutedChatsView = (0, _dashboard2.default)(_mutedChats2.default); | ||
const viewWrapper = (0, _ramda.pipe)(authWrapper, _dashboard2.default); | ||
const homeView = viewWrapper(_home2.default); | ||
const channelsView = viewWrapper(_channels2.default); | ||
const ecommerceView = viewWrapper(_ecommerce2.default); | ||
const repliesView = viewWrapper(_replies4.default); | ||
const mutedChatsView = viewWrapper(_mutedChats2.default); | ||
const debugView = viewWrapper(_debug2.default); | ||
app.router([['/', viewWrapper(homeView)], ['/controltower', viewWrapper(homeView)], ['/channels', viewWrapper(channelsView)], ['/ecommerce', viewWrapper(ecommerceView)], ['/replies', viewWrapper(repliesView)], ['/mutedChats', viewWrapper(mutedChatsView)]]); | ||
const rootView = debugView; | ||
app.router([['/', rootView], ['/controltower', rootView], ['/home', homeView], ['/channels', channelsView], ['/ecommerce', ecommerceView], ['/replies', repliesView], ['/mutedChats', mutedChatsView], ['/debug', debugView]]); | ||
@@ -119,2 +125,4 @@ const tree = app.start(); | ||
document.body.appendChild(_fbSDK2.default); | ||
document.body.appendChild(tree); | ||
document.body.appendChild((0, _main2.default)()); | ||
const mainWrapper = document.getElementById('mainContent'); | ||
mainWrapper.appendChild(tree); |
@@ -12,5 +12,5 @@ 'use strict'; | ||
state: { | ||
selectedSection: 'home', | ||
enabledSections: ['home'], | ||
menu: ['home', 'channels', 'ecommerce', 'replies', 'mutedChats'], | ||
selectedSection: 'debug', | ||
enabledSections: ['home', 'debug'], | ||
menu: ['home', 'channels', 'ecommerce', 'replies', 'mutedChats', 'debug'], | ||
facebookPages: [], | ||
@@ -17,0 +17,0 @@ selectedMutedUsers: [], |
@@ -39,3 +39,4 @@ 'use strict'; | ||
replies: 'fa fa-comments-o', | ||
mutedChats: 'fa fa-user-times' | ||
mutedChats: 'fa fa-user-times', | ||
debug: 'fa fa-terminal' | ||
} | ||
@@ -42,0 +43,0 @@ }; |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
@@ -13,11 +13,4 @@ | ||
exports.default = state => _html2.default` | ||
exports.default = () => _html2.default` | ||
<div> | ||
<h2>${ JSON.stringify(state.location) }</h2> | ||
<h1>Auth</h1> | ||
<code><pre>${ JSON.stringify(state.api, ' ', 2) }</pre></code> | ||
<h1>Customer</h1> | ||
<code><pre>${ JSON.stringify(state.customer, ' ', 2) }</pre></code> | ||
<h1>Bot</h1> | ||
<code><pre>${ JSON.stringify(state.bot, ' ', 2) }</pre></code> | ||
</div> | ||
@@ -24,0 +17,0 @@ `; |
@@ -133,10 +133,8 @@ 'use strict'; | ||
// module.exports = view => (state, prev, send) => html` | ||
exports.default = view => (state, prev, send) => _html2.default` | ||
exports.default = () => _html2.default` | ||
<div class=${ mainCss }> | ||
${ _fontAwesome2.default } | ||
${ view(state, prev, send) } | ||
<div id="mainContent"></div> | ||
</div>`; | ||
module.exports = exports['default']; |
98188
36
1532