mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
65ba464548
commit
e39c79a811
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import Component from '@glimmer/component';
|
||||
import {action} from '@ember/object';
|
||||
import {debounce} from '@ember/runloop';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class AnnouncementSettingsContentComponent extends Component {
|
||||
|
@ -9,10 +10,14 @@ export default class AnnouncementSettingsContentComponent extends Component {
|
|||
return this.settings.announcementContent;
|
||||
}
|
||||
|
||||
updatePreview() {
|
||||
debounce(this, this.args.onChange, 300);
|
||||
}
|
||||
|
||||
@action
|
||||
setContent(html) {
|
||||
this.settings.announcementContent = html;
|
||||
this.settings.save();
|
||||
this.args.onChange?.();
|
||||
this.updatePreview();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue