UX: Show the footer on the user summary and preferences pages
This commit is contained in:
parent
fb91d24deb
commit
c0ef6ca01c
|
@ -1,11 +1,19 @@
|
|||
import Composer from 'discourse/models/composer';
|
||||
|
||||
const DiscourseRoute = Ember.Route.extend({
|
||||
showFooter: false,
|
||||
|
||||
// Set to true to refresh a model without a transition if a query param
|
||||
// changes
|
||||
resfreshQueryWithoutTransition: false,
|
||||
|
||||
activate() {
|
||||
this._super();
|
||||
if (this.get('showFooter')) {
|
||||
this.controllerFor('application').set('showFooter', true);
|
||||
}
|
||||
},
|
||||
|
||||
refresh() {
|
||||
if (!this.refreshQueryWithoutTransition) { return this._super(); }
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
model: function() {
|
||||
return this.modelFor('user');
|
||||
},
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
setupController(controller, user) {
|
||||
controller.reset();
|
||||
controller.setProperties({
|
||||
|
|
|
@ -2,6 +2,8 @@ import UserBadge from 'discourse/models/user-badge';
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
model: function() {
|
||||
return UserBadge.findByUsername(this.modelFor('user').get('username'));
|
||||
},
|
||||
|
|
|
@ -2,6 +2,8 @@ import UserBadge from 'discourse/models/user-badge';
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
model: function() {
|
||||
return UserBadge.findByUsername(this.modelFor('user').get('username'));
|
||||
},
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true
|
||||
});
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
model: function() {
|
||||
return this.modelFor('user');
|
||||
},
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
redirect() {
|
||||
this.transitionTo('preferences.account');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
setupController(controller, user) {
|
||||
controller.setProperties({
|
||||
model: user
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true
|
||||
});
|
|
@ -1,6 +1,8 @@
|
|||
import RestrictedUserRoute from "discourse/routes/restricted-user";
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
showFooter: true,
|
||||
|
||||
model: function() {
|
||||
return this.modelFor('user');
|
||||
},
|
||||
|
|
|
@ -3,6 +3,7 @@ import showModal from 'discourse/lib/show-modal';
|
|||
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
|
||||
export default RestrictedUserRoute.extend({
|
||||
|
||||
model() {
|
||||
return this.modelFor('user');
|
||||
},
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export default Discourse.Route.extend({
|
||||
showFooter: true,
|
||||
|
||||
model() {
|
||||
return this.modelFor("user").summary();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue