mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
97300e3531
requires https://github.com/TryGhost/Ghost/pull/8114 - adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen - separates team index into "active" and "suspended" users - adds "suspended" badge to user profile when suspended
23 lines
553 B
JavaScript
23 lines
553 B
JavaScript
import ModalComponent from 'ghost-admin/components/modals/base';
|
|
import {invokeAction} from 'ember-invoke-action';
|
|
import {alias} from 'ember-computed';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
|
|
user: alias('model'),
|
|
|
|
suspendUser: task(function* () {
|
|
try {
|
|
yield invokeAction(this, 'confirm');
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop(),
|
|
|
|
actions: {
|
|
confirm() {
|
|
return this.get('suspendUser').perform();
|
|
}
|
|
}
|
|
});
|