handle most of the boilerplate stuff

This commit is contained in:
ansuz
2017-07-23 14:27:47 +02:00
parent 0d43a84c2b
commit dcf5719eaf
7 changed files with 289 additions and 1 deletions

View File

@@ -517,5 +517,13 @@ define([
];
};
Pages['/todo/'] = Pages['/todo/index.html'] = function () {
return [
h('div#toolbar'),
h('div#container'),
loadingScreen()
];
};
return Pages;
});

View File

@@ -12,7 +12,7 @@ $(function () {
var Messages = Cryptpad.Messages;
var $body = $('body');
var isMainApp = function () {
return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile)\/$/.test(location.pathname);
return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile|todo)\/$/.test(location.pathname);
};
var rightLink = function (ref, loc, txt) {
@@ -166,6 +166,9 @@ $(function () {
} else if (/^\/profile\//.test(pathname)) {
$('body').append(h('body', Pages[pathname]()).innerHTML);
require([ '/profile/main.js', ], ready);
} else if (/^\/todo\//.test(pathname)) {
$('body').append(h('body', Pages[pathname]()).innerHTML);
require([ '/todo/main.js', ], ready);
}
});