PERF: don't render composer until we need it
This commit is contained in:
parent
8b87f095c6
commit
32b52642ab
|
@ -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 New Issue