mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
42b3e3a412
requires 8ceabbcfba
- if the API responds with `meta.import_label` after an import, use it to reset and apply the filter across the members list so that it's quick to see the results of the import and perform further bulk actions (coming later)
- added ability to pass arguments through `<GhFullscreenModal>`'s `@confirm` action
- added a `console.error()` call to the members csv import so that any underlying error is not completely lost by the custom error handling
25 lines
722 B
JavaScript
25 lines
722 B
JavaScript
import Controller from '@ember/controller';
|
|
import {action} from '@ember/object';
|
|
import {inject as controller} from '@ember/controller';
|
|
import {resetQueryParams} from 'ghost-admin/helpers/reset-query-params';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class ImportController extends Controller {
|
|
@service router;
|
|
@controller members;
|
|
|
|
@action
|
|
refreshMembers({label} = {}) {
|
|
if (label) {
|
|
let queryParams = Object.assign(resetQueryParams('members.index'), {label: label.slug});
|
|
this.router.transitionTo({queryParams});
|
|
}
|
|
this.members.refreshData();
|
|
}
|
|
|
|
@action
|
|
close() {
|
|
this.router.transitionTo('members');
|
|
}
|
|
}
|