mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
7d997d5c2d
no issue - the member count is automatically calculated via the length of the live members array so there's no need to manually decrement it - if we do manually decrement then the count is off by one because the auto calculation runs to get the new value before the manual decrement
25 lines
531 B
JavaScript
25 lines
531 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {alias} from '@ember/object/computed';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
// Allowed actions
|
|
confirm: () => {},
|
|
|
|
member: alias('model'),
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.deleteMember.perform();
|
|
}
|
|
},
|
|
|
|
deleteMember: task(function* () {
|
|
try {
|
|
yield this.confirm();
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|