mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
front/general: replace manual DI with require(...)
This commit is contained in:
@ -1,15 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const topNavController = require('../controllers/top_nav_controller.js');
|
||||
const HelpView = require('../views/help_view.js');
|
||||
|
||||
class HelpController {
|
||||
constructor(topNavigationController, helpView) {
|
||||
this.topNavigationController = topNavigationController;
|
||||
this.helpView = helpView;
|
||||
constructor() {
|
||||
this.helpView = new HelpView();
|
||||
}
|
||||
|
||||
showHelpRoute(section) {
|
||||
this.topNavigationController.activate('help');
|
||||
topNavController.activate('help');
|
||||
this.helpView.render(section);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = HelpController;
|
||||
module.exports = new HelpController();
|
||||
|
Reference in New Issue
Block a user