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:
@ -7,16 +7,16 @@ const SettingsView = require('../views/settings_view.js');
|
||||
|
||||
class SettingsController {
|
||||
constructor() {
|
||||
this.settingsView = new SettingsView();
|
||||
this._settingsView = new SettingsView();
|
||||
}
|
||||
|
||||
registerRoutes() {
|
||||
page('/settings', (ctx, next) => { this.settingsRoute(); });
|
||||
page('/settings', (ctx, next) => { this._settingsRoute(); });
|
||||
}
|
||||
|
||||
settingsRoute() {
|
||||
_settingsRoute() {
|
||||
topNavController.activate('settings');
|
||||
this.settingsView.render({
|
||||
this._settingsView.render({
|
||||
getSettings: () => settings.getSettings(),
|
||||
saveSettings: newSettings => settings.saveSettings(newSettings),
|
||||
});
|
||||
|
Reference in New Issue
Block a user