mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
21 lines
579 B
JavaScript
21 lines
579 B
JavaScript
|
import Component from '@glimmer/component';
|
||
|
import {action} from '@ember/object';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default class SiteDescriptionFormField extends Component {
|
||
|
@service settings;
|
||
|
|
||
|
@action
|
||
|
update(event) {
|
||
|
this.settings.set('description', event.target.value);
|
||
|
}
|
||
|
|
||
|
@action
|
||
|
async validate(event) {
|
||
|
const value = event.target.value;
|
||
|
this.settings.set('description', value);
|
||
|
await this.settings.validate({property: 'description'});
|
||
|
this.args.didUpdate('description', value);
|
||
|
}
|
||
|
}
|