mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 16:21:24 -05:00
5c899c765b
This reverts commit c21457d6a7
.
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');
|
|
}
|
|
}
|
|
|
|
});
|