mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
24 lines
584 B
JavaScript
24 lines
584 B
JavaScript
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 {
|
|
@service settings;
|
|
|
|
get content() {
|
|
return this.settings.announcementContent;
|
|
}
|
|
|
|
updatePreview() {
|
|
debounce(this, this.args.onChange, 300);
|
|
}
|
|
|
|
@action
|
|
setContent(html) {
|
|
this.settings.announcementContent = html;
|
|
this.settings.save();
|
|
this.updatePreview();
|
|
}
|
|
}
|