mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-08 20:22:45 +01:00
renamed fileManager.js to controller.js
This commit is contained in:
parent
cab6f1bafb
commit
0631abe653
@ -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')} />
|
||||
</a>
|
||||
${header(state, emit)}
|
||||
${main(state, emit)}
|
||||
</body>`;
|
||||
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>
|
||||
`;
|
||||
|
||||
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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user