1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 23:44:27 +02:00

Roughly implement change password/email, delete account modals

This commit is contained in:
Toby Zerner
2015-05-26 18:03:02 +09:30
parent a4a0092513
commit e5532d9618
7 changed files with 123 additions and 8 deletions

View File

@@ -4,6 +4,9 @@ import SwitchInput from 'flarum/components/switch-input';
import ActionButton from 'flarum/components/action-button';
import FieldSet from 'flarum/components/field-set';
import NotificationGrid from 'flarum/components/notification-grid';
import ChangePasswordModal from 'flarum/components/change-password-modal';
import ChangeEmailModal from 'flarum/components/change-email-modal';
import DeleteAccountModal from 'flarum/components/delete-account-modal';
import listItems from 'flarum/helpers/list-items';
import icon from 'flarum/helpers/icon';
@@ -62,21 +65,24 @@ export default class SettingsPage extends UserPage {
items.add('changePassword',
ActionButton.component({
label: 'Change Password',
className: 'btn btn-default'
className: 'btn btn-default',
onclick: () => app.modal.show(new ChangePasswordModal())
})
);
items.add('changeEmail',
ActionButton.component({
label: 'Change Email',
className: 'btn btn-default'
className: 'btn btn-default',
onclick: () => app.modal.show(new ChangeEmailModal())
})
);
items.add('deleteAccount',
ActionButton.component({
label: 'Delete Account',
className: 'btn btn-default btn-danger'
className: 'btn btn-default btn-danger',
onclick: () => app.modal.show(new DeleteAccountModal())
})
);