Merge pull request #4596 from techAPJ/composer

FEATURE: show close button instead of maximize in collapsed composer
This commit is contained in:
Arpit Jalan 2016-12-08 21:31:54 +05:30 committed by GitHub
commit 3d4299151c
4 changed files with 24 additions and 21 deletions

View File

@ -388,18 +388,13 @@ export default Ember.Controller.extend({
toggle() {
this.closeAutocomplete();
switch (this.get('model.composeState')) {
case Composer.OPEN:
if (this.get('model.composeState') === Composer.OPEN) {
if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
this.close();
} else {
this.shrink();
}
break;
case Composer.DRAFT:
this.set('model.composeState', Composer.OPEN);
break;
case Composer.SAVING:
} else {
this.close();
}
return false;

View File

@ -136,7 +136,7 @@
</div>
<div class='draft-text'>
{{#if model.topic}}
{{fa-icon "reply"}} {{{draftTitle}}}
{{fa-icon "mail-forward"}} {{{draftTitle}}}
{{else}}
{{i18n "composer.saved_draft"}}
{{/if}}

View File

@ -187,11 +187,15 @@
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.draft-text {
display: block;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
content: "\f00d";
}
}
}

View File

@ -103,11 +103,15 @@ input {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
content: "\f00d";
}
}
}