Files
discourse/app/assets/javascripts/discourse/components/composer-toggles.js.es6
Penar Musaraj 56948896ff UX: replace FA5 compress/expand icons
Adds a new SVG sprite file that contains non-FontAwesome 5 icons to our subset.

Adds the FontAwesome 4.7.0 icons for expand / collapse.
2018-12-03 22:29:20 -05:00

34 lines
821 B
JavaScript

import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
tagName: "",
@computed("composeState")
toggleTitle(composeState) {
return composeState === "draft" || composeState === "saving"
? "composer.abandon"
: "composer.collapse";
},
@computed("composeState")
fullscreenTitle(composeState) {
return composeState === "fullscreen"
? "composer.exit_fullscreen"
: "composer.enter_fullscreen";
},
@computed("composeState")
toggleIcon(composeState) {
return composeState === "draft" || composeState === "saving"
? "times"
: "chevron-down";
},
@computed("composeState")
fullscreenIcon(composeState) {
return composeState === "fullscreen"
? "discourse-compress"
: "discourse-expand";
}
});