mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
686dadbeda
no issue - added actions for handling close/confirm/cancel of portal settings rather than re-using the route-level leave modal because the portal settings modal does not need any knowledge of the route - added controller reset that is called when the route is exited to ensure no modals are shown when navigating back to the membership screen - fixed "cannot set on destroyed" error when portal settings are opened and closed quickly - removed usage of old `{{action}}` helper - this has been replaced with `{{on}}` and `{{fn}}`
29 lines
632 B
JavaScript
29 lines
632 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class MembershipSettingsRoute extends AuthenticatedRoute {
|
|
@service settings;
|
|
|
|
model() {
|
|
this.settings.reload();
|
|
}
|
|
|
|
actions = {
|
|
willTransition(transition) {
|
|
return this.controller.leaveRoute(transition);
|
|
}
|
|
}
|
|
|
|
buildRouteInfoMetadata() {
|
|
return {
|
|
titleToken: 'Settings - Membership'
|
|
};
|
|
}
|
|
|
|
resetController(controller, isExiting) {
|
|
if (isExiting) {
|
|
controller.reset();
|
|
}
|
|
}
|
|
}
|