router.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. // Users
  27. this.route('users', { path: 'users/' }, function() {
  28. this.route('rank', { path: ':slug/' }, function() {
  29. this.route('page', { path: ':page/' });
  30. });
  31. this.route('online', { path: 'online/' });
  32. this.route('active', { path: 'active/' });
  33. });
  34. // User
  35. this.route('user', { path: 'user/:url_name/' });
  36. // Legal
  37. this.route('terms-of-service', { path: 'terms-of-service/' });
  38. this.route('privacy-policy', { path: 'privacy-policy/' });
  39. // Error
  40. this.route('error-0', { path: 'error-0/' });
  41. this.route('error-403', { path: 'error-403/:reason/' });
  42. this.route('error-404', { path: 'error-404/' });
  43. this.route('error-banned', { path: 'banned/:reason/' });
  44. this.route('not-found', { path: '*path' });
  45. });
  46. export default Router;