client: refactor linking and routing

Print all links through new uri.js component
Refactor the router to use more predictable parsing
Fix linking to entities with weird names (that contain slashes, + etc.)
This commit is contained in:
rr-
2017-01-20 21:51:04 +01:00
parent 6714f05b49
commit 1acceb941d
65 changed files with 380 additions and 295 deletions

View File

@ -12,13 +12,13 @@ class HelpController {
}
module.exports = router => {
router.enter('/help', (ctx, next) => {
router.enter(['help'], (ctx, next) => {
new HelpController();
});
router.enter('/help/:section', (ctx, next) => {
router.enter(['help', ':section'], (ctx, next) => {
new HelpController(ctx.parameters.section);
});
router.enter('/help/:section/:subsection', (ctx, next) => {
router.enter(['help', ':section', ':subsection'], (ctx, next) => {
new HelpController(ctx.parameters.section, ctx.parameters.subsection);
});
};