mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
parent
65ba464548
commit
e39c79a811
@ -1,5 +1,6 @@
|
|||||||
import Component from '@glimmer/component';
|
import Component from '@glimmer/component';
|
||||||
import {action} from '@ember/object';
|
import {action} from '@ember/object';
|
||||||
|
import {debounce} from '@ember/runloop';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
|
|
||||||
export default class AnnouncementSettingsContentComponent extends Component {
|
export default class AnnouncementSettingsContentComponent extends Component {
|
||||||
@ -9,10 +10,14 @@ export default class AnnouncementSettingsContentComponent extends Component {
|
|||||||
return this.settings.announcementContent;
|
return this.settings.announcementContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updatePreview() {
|
||||||
|
debounce(this, this.args.onChange, 300);
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setContent(html) {
|
setContent(html) {
|
||||||
this.settings.announcementContent = html;
|
this.settings.announcementContent = html;
|
||||||
this.settings.save();
|
this.settings.save();
|
||||||
this.args.onChange?.();
|
this.updatePreview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user