router.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import Ember from 'ember';
  2. import config from './config/environment';
  3. var Router = Ember.Router.extend({
  4. location: config.locationType
  5. });
  6. Router.map(function() {
  7. // Auth
  8. this.route('activation', { path: 'activation/' }, function() {
  9. this.route('activate', { path: ':user_id/:token/' });
  10. });
  11. this.route('forgotten-password', { path: 'forgotten-password/' }, function() {
  12. this.route('change-form', { path: ':user_id/:token/' });
  13. });
  14. // Options
  15. this.route('options', { path: 'options/' }, function() {
  16. this.route('forum', { path: 'forum-options/' });
  17. this.route('signature', { path: 'edit-signature/' });
  18. this.route('username', { path: 'change-username/' });
  19. this.route('password', { path: 'change-password/' }, function() {
  20. this.route('confirm', { path: ':token/' });
  21. });
  22. this.route('email', { path: 'change-email/' }, function() {
  23. this.route('confirm', { path: ':token/' });
  24. });
  25. });
  26. // Legal
  27. this.route('terms-of-service', { path: 'terms-of-service/' });
  28. this.route('privacy-policy', { path: 'privacy-policy/' });
  29. // Error
  30. this.route('error-0', { path: 'error-0/' });
  31. this.route('error-403', { path: 'error-403/:reason/' });
  32. this.route('error-404', { path: 'error-404/' });
  33. this.route('error-banned', { path: 'banned/:reason/' });
  34. this.route('not-found', { path: '*path' });
  35. });
  36. export default Router;