mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 11:28:15 -05:00
c0b277d273
This change is discussed here: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821 Prior to this change we were not booting correctly with DISCOURSE_NO_CONSTANTS
21 lines
503 B
JavaScript
21 lines
503 B
JavaScript
import EmailPreview from 'admin/models/email-preview';
|
|
|
|
export default Ember.Controller.extend({
|
|
|
|
actions: {
|
|
refresh() {
|
|
const model = this.get('model');
|
|
|
|
this.set('loading', true);
|
|
EmailPreview.findDigest(this.get('lastSeen'), this.get('username')).then(email => {
|
|
model.setProperties(email.getProperties('html_content', 'text_content'));
|
|
this.set('loading', false);
|
|
});
|
|
},
|
|
|
|
toggleShowHtml() {
|
|
this.toggleProperty('showHtml');
|
|
}
|
|
}
|
|
|
|
});
|