mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
d51f2bcf23
closes https://github.com/TryGhost/Admin/pull/2107 - updated related babel dependencies - bumped eslint - ran `yarn lint:js --fix` - added eslint ignore comments for some required non-camel-case properties
41 lines
1001 B
JavaScript
41 lines
1001 B
JavaScript
import AdminRoute from 'ghost-admin/routes/admin';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class MembershipSettingsRoute extends AdminRoute {
|
|
@service notifications;
|
|
@service settings;
|
|
|
|
beforeModel(transition) {
|
|
super.beforeModel(...arguments);
|
|
|
|
if (transition.to.queryParams?.supportAddressUpdate === 'success') {
|
|
this.notifications.showAlert(
|
|
`Support email address has been updated`,
|
|
{type: 'success', key: 'members.settings.support-address.updated'}
|
|
);
|
|
}
|
|
}
|
|
|
|
model() {
|
|
this.settings.reload();
|
|
}
|
|
|
|
actions = {
|
|
willTransition(transition) {
|
|
return this.controller.leaveRoute(transition);
|
|
}
|
|
};
|
|
|
|
buildRouteInfoMetadata() {
|
|
return {
|
|
titleToken: 'Settings - Membership'
|
|
};
|
|
}
|
|
|
|
resetController(controller, isExiting) {
|
|
if (isExiting) {
|
|
controller.reset();
|
|
}
|
|
}
|
|
}
|