mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/general: refactor all the things
- Move controls to the "controls/" directory - Make controls interface look similar to each other - Prefix "private" methods and attributes with underscore
This commit is contained in:
@ -6,24 +6,24 @@ const HelpView = require('../views/help_view.js');
|
||||
|
||||
class HelpController {
|
||||
constructor() {
|
||||
this.helpView = new HelpView();
|
||||
this._helpView = new HelpView();
|
||||
}
|
||||
|
||||
registerRoutes() {
|
||||
page('/help', () => { this.showHelpRoute(); });
|
||||
page('/help', () => { this._showHelpRoute(); });
|
||||
page(
|
||||
'/help/:section',
|
||||
(ctx, next) => { this.showHelpRoute(ctx.params.section); });
|
||||
(ctx, next) => { this._showHelpRoute(ctx.params.section); });
|
||||
page(
|
||||
'/help/:section/:subsection',
|
||||
(ctx, next) => {
|
||||
this.showHelpRoute(ctx.params.section, ctx.params.subsection);
|
||||
this._showHelpRoute(ctx.params.section, ctx.params.subsection);
|
||||
});
|
||||
}
|
||||
|
||||
showHelpRoute(section, subsection) {
|
||||
_showHelpRoute(section, subsection) {
|
||||
topNavController.activate('help');
|
||||
this.helpView.render({
|
||||
this._helpView.render({
|
||||
section: section,
|
||||
subsection: subsection,
|
||||
});
|
||||
|
Reference in New Issue
Block a user