mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-23 22:12:30 -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() {
|
canEdit: function() {
|
||||||
return this.get("model.action") === "edit" && Discourse.User.current().get("can_edit");
|
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'>
|
<div class='composer-loading'>
|
||||||
{{loading-spinner}}
|
{{loading-spinner}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,3 +117,4 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
Loading…
Reference in a new issue