mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 11:32:24 -05:00
0947191060
- new "show-footer" mixins - converted most of the routes to ES6 - FIX: handling of "indexStream" in user pages There will now be a footer on all the following pages - /exception - /about - /latest - /new - /unread - /starred - /top - /categories - /c/:category - /c/:category/l/latest - /c/:category/l/new - /c/:category/l/unread - /c/:category/l/top - /t/:topic/:id - /groups/:name/members - /user/activity - /user/activity/topics - /user/activity/posts - /user/activity/replies - /user/activity/likes-given - /user/activity/likes-received - /user/activity/bookmarks - /user/activity/starred - /user/badges - /user/notifications - /user/flagged-posts - /user/deleted-posts - /user/private-messages - /user/private-messages/mine - /user/private-messages/unread - /user/invited - /user/:username/preferences - /faq (static pages) - /badges - /badges/:id/:badge
25 lines
753 B
JavaScript
25 lines
753 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
import DiscourseController from 'discourse/controllers/controller';
|
|
|
|
export default DiscourseController.extend(ModalFunctionality, {
|
|
remote: Em.computed.not("local"),
|
|
local: false,
|
|
showMore: false,
|
|
|
|
_initialize: function() {
|
|
this.setProperties({
|
|
local: this.get("allowLocal"),
|
|
showMore: false
|
|
});
|
|
}.on('init'),
|
|
|
|
maxSize: Discourse.computed.setting('max_attachment_size_kb'),
|
|
allowLocal: Em.computed.gt('maxSize', 0),
|
|
|
|
actions: {
|
|
useLocal: function() { this.setProperties({ local: true, showMore: false}); },
|
|
useRemote: function() { this.set("local", false); },
|
|
toggleShowMore: function() { this.toggleProperty("showMore"); }
|
|
}
|
|
|
|
});
|