mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
b226b03f09
refs https://github.com/TryGhost/Toolbox/issues/356 - this commit updates the route to `/settings/history` and moves all the files to their new name so we can avoid further cleanup down the line
21 lines
487 B
JavaScript
21 lines
487 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
import {task, timeout} from 'ember-concurrency';
|
|
|
|
export default class HistorySearch extends Component {
|
|
@service store;
|
|
|
|
@action
|
|
clear() {
|
|
this.args.onChange(null);
|
|
}
|
|
|
|
@task
|
|
*searchUsersTask(term) {
|
|
yield timeout(300); // debounce
|
|
|
|
return yield this.store.query('user', {search: term, limit: 20});
|
|
}
|
|
}
|