mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
parent
65ba464548
commit
e39c79a811
@ -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…
Reference in New Issue
Block a user