FEATURE: show close button instead of maximize in collapsed composer

This commit is contained in:
Arpit Jalan 2016-12-08 20:11:58 +05:30
parent 312a07e452
commit d9459d09ed
4 changed files with 24 additions and 21 deletions

View File

@ -388,19 +388,14 @@ export default Ember.Controller.extend({
toggle() { toggle() {
this.closeAutocomplete(); this.closeAutocomplete();
switch (this.get('model.composeState')) { if (this.get('model.composeState') === Composer.OPEN) {
case Composer.OPEN: if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
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:
this.close(); this.close();
} else {
this.shrink();
}
} else {
this.close();
} }
return false; return false;
}, },

View File

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

View File

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

View File

@ -97,17 +97,21 @@ input {
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.draft-text { .draft-text {
display: block; display: block;
position: absolute; position: absolute;
margin-right: 40px; margin-right: 40px;
max-width: 80%; max-width: 80%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
} }
.toggler { .toggler {
&:before { &:before {
font-family: "FontAwesome"; font-family: "FontAwesome";
content: "\f077"; content: "\f00d";
} }
} }
} }