Done so far

Basic backend skeleton

- technology choices
- database migration outline
- basic self hosting facade
- basic REST outline
- proof of concept for auth and privileges

Basic frontend skeleton

- technology choices
- pretty robust frontend compilation
- top navigation
- proof of concept for registration form
This commit is contained in:
rr-
2016-03-19 21:37:04 +01:00
commit 797ace982f
48 changed files with 1331 additions and 0 deletions

View File

@ -0,0 +1,38 @@
'use strict';
class UsersController {
constructor(topNavigationController, authController, registrationView) {
this.topNavigationController = topNavigationController;
this.authController = authController;
this.registrationView = registrationView;
}
listUsersRoute() {
this.topNavigationController.activate('users');
}
createUserRoute() {
const self = this;
this.topNavigationController.activate('register');
this.registrationView.render({
onRegistered: (user) => {
alert(user);
self.authController.login(user);
}});
}
showUserRoute(user) {
if (this.authController.isLoggedIn() &&
user == this.authController.getCurrentUser().name) {
this.topNavigationController.activate('account');
} else {
this.topNavigationController.activate('users');
}
}
editUserRoute(user) {
this.topNavigationController.activate('users');
}
}
module.exports = UsersController;