mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
PERF: don't render composer until we need it
This commit is contained in:
parent
8b87f095c6
commit
32b52642ab
2 changed files with 8 additions and 1 deletions
|
@ -465,6 +465,11 @@ export default DiscourseController.extend({
|
|||
|
||||
canEdit: function() {
|
||||
return this.get("model.action") === "edit" && Discourse.User.current().get("can_edit");
|
||||
}.property("model.action")
|
||||
}.property("model.action"),
|
||||
|
||||
visible: function() {
|
||||
var state = this.get('model.composeState');
|
||||
return state && state !== 'closed';
|
||||
}.property('model.composeState')
|
||||
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{#if visible}}
|
||||
<div class='composer-loading'>
|
||||
{{loading-spinner}}
|
||||
</div>
|
||||
|
@ -116,3 +117,4 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in a new issue