mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 09:05:47 +08:00
5c899c765b
This reverts commit c21457d6a7
.
22 lines
503 B
JavaScript
22 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');
|
|
}
|
|
}
|
|
|
|
});
|