mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
fe5264f9e9
adds a user prompt on the email digest preview page to generate a preview for a particular user also fixes some broken styling on the page
20 lines
457 B
JavaScript
20 lines
457 B
JavaScript
export default Ember.Controller.extend({
|
|
|
|
actions: {
|
|
refresh() {
|
|
const model = this.get('model');
|
|
|
|
this.set('loading', true);
|
|
Discourse.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');
|
|
}
|
|
}
|
|
|
|
});
|