renamed fileManager.js to controller.js

This commit is contained in:
Danny Coates 2018-11-08 15:12:07 -08:00
parent cab6f1bafb
commit 0631abe653
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
4 changed files with 20 additions and 12 deletions

View File

@ -33,13 +33,21 @@ if (navigator.userAgent === 'Send Android') {
function body(main) {
return function(state, emit) {
return html`<body class="flex flex-col items-center font-sans bg-blue-lightest md:h-screen md:bg-grey-lightest">
<a id="hamburger" class="absolute pin-t pin-r z-50" href="#" onclick=${clickPreferences}>
<img src=${assets.get('preferences.png')} />
return html`
<body
class="flex flex-col items-center font-sans bg-blue-lightest md:h-screen md:bg-grey-lightest"
>
<a
id="hamburger"
class="absolute pin-t pin-r z-50"
href="#"
onclick="${clickPreferences}"
>
<img src="${assets.get('preferences.png')}" />
</a>
${header(state, emit)}
${main(state, emit)}
</body>`;
${header(state, emit)} ${main(state, emit)}
</body>
`;
function clickPreferences(event) {
event.preventDefault();
@ -64,7 +72,7 @@ app.use((state, emitter) => {
window.appState = state;
window.appEmit = emitter.emit.bind(emitter);
});
app.use(require('../app/fileManager').default);
app.use(require('../app/controller').default);
app.use(require('./stores/intents').default);
app.route('/', body(home));
app.route('/options', require('./pages/options').default);

View File

@ -3,7 +3,7 @@ import 'fluent-intl-polyfill';
import routes from './routes';
import capabilities from './capabilities';
import locale from '../common/locales';
import fileManager from './fileManager';
import controller from './controller';
import dragManager from './dragManager';
import pasteManager from './pasteManager';
import storage from './storage';
@ -54,7 +54,7 @@ import User from './user';
}
});
app.use(metrics);
app.use(fileManager);
app.use(controller);
app.use(dragManager);
app.use(experiments);
app.use(pasteManager);

View File

@ -135,9 +135,9 @@ emitter.on('pushState', function(path) {
console.log('pushState ' + path + ' ' + JSON.stringify(state));
});
const fileManager = require('../app/fileManager').default;
const controller = require('../app/controller').default;
try {
fileManager(state, emitter);
controller(state, emitter);
} catch (e) {
console.error('error' + e);
console.error(e);