0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/client/app/components/modals/delete-user.js
Kevin Ansfield 1c6b208047 Refactor modals
refs #5798, closes #5018
- adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place
- adds spin-buttons to all modals with async behaviour
- adds/improves behaviour of inline-validation in modals
- improves re-authenticate modal to properly handle validation and authentication errors
2016-01-12 20:53:08 +00:00

18 lines
345 B
JavaScript

import ModalComponent from 'ghost/components/modals/base';
export default ModalComponent.extend({
submitting: false,
user: null,
actions: {
confirm() {
this.set('submitting', true);
this.attrs.confirm().finally(() => {
this.send('closeModal');
});
}
}
});