Ghost/ghost/admin/app/components/modal-upgrade-unsuspend-user-host-limit.js
Kevin Ansfield 909bd60db3 Fixed errors when enter key is pressed in modals
no issue

- enter key when a modal is displayed will always trigger the `confirm` action, if it's not provided then the base modal will throw a `You must override the "confirm" action ...` error
2021-06-18 10:12:46 +01:00

17 lines
344 B
JavaScript

import ModalComponent from 'ghost-admin/components/modal-base';
import {inject as service} from '@ember/service';
export default ModalComponent.extend({
router: service(),
actions: {
upgrade() {
this.router.transitionTo('pro');
},
confirm() {
this.send('upgrade');
}
}
});