mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
20 lines
435 B
JavaScript
20 lines
435 B
JavaScript
export default Ember.Controller.extend({
|
|
|
|
actions: {
|
|
refresh() {
|
|
const model = this.get('model');
|
|
|
|
this.set('loading', true);
|
|
Discourse.EmailPreview.findDigest(this.get('lastSeen')).then(email => {
|
|
model.setProperties(email.getProperties('html_content', 'text_content'));
|
|
this.set('loading', false);
|
|
});
|
|
},
|
|
|
|
toggleShowHtml() {
|
|
this.toggleProperty('showHtml');
|
|
}
|
|
}
|
|
|
|
});
|