0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 10:40:28 +01:00
discourse-custom-wizard/assets/javascripts/wizard/components/wizard-field-composer.js.es6

42 Zeilen
956 B
Text

2020-03-21 18:30:11 +01:00
import { default as computed, observes } from 'discourse-common/utils/decorators';
2020-04-02 07:21:57 +02:00
import EmberObject from "@ember/object";
2018-02-08 05:30:55 +01:00
export default Ember.Component.extend({
2019-11-20 13:08:04 +01:00
showPreview: false,
classNameBindings: [":wizard-field-composer", "showPreview:show-preview:hide-preview"],
2019-11-20 13:08:04 +01:00
didInsertElement() {
2020-04-02 07:21:57 +02:00
this.set('composer', EmberObject.create({
2019-11-20 13:08:04 +01:00
loading: false,
reply: this.get('field.value')
}))
},
@observes('composer.reply')
setField() {
this.set('field.value', this.get('composer.reply'));
},
2018-02-08 05:30:55 +01:00
@computed('showPreview')
togglePreviewLabel(showPreview) {
return showPreview ? 'wizard_composer.hide_preview' : 'wizard_composer.show_preview';
},
actions: {
togglePreview() {
this.toggleProperty('showPreview');
2019-11-20 13:08:04 +01:00
},
groupsMentioned() {
},
afterRefresh() {
},
2019-11-20 13:08:04 +01:00
cannotSeeMention() {
},
importQuote() {
},
showUploadSelector() {
2018-02-08 05:30:55 +01:00
}
}
});