Improve extensions page

- Allow extensions to define an icon in their flarum.json
- Show a "please wait" modal when enabling/disabling an extension
- Styling tweaks
This commit is contained in:
Toby Zerner
2015-08-07 08:51:03 +09:30
parent 4e01aa10d8
commit 3f809761d3
6 changed files with 65 additions and 21 deletions

View File

@ -28,13 +28,15 @@ export default class Modal extends Component {
return (
<div className={'Modal modal-dialog ' + this.className()}>
<div className="Modal-content">
<div className="Modal-close App-backControl">
{Button.component({
icon: 'times',
onclick: this.hide.bind(this),
className: 'Button Button--icon Button--link'
})}
</div>
{this.isDismissible() ? (
<div className="Modal-close App-backControl">
{Button.component({
icon: 'times',
onclick: this.hide.bind(this),
className: 'Button Button--icon Button--link'
})}
</div>
) : ''}
<form onsubmit={this.onsubmit.bind(this)}>
<div className="Modal-header">
@ -50,6 +52,15 @@ export default class Modal extends Component {
);
}
/**
* Determine whether or not the modal should be dismissible via an 'x' button.
*
* @return {Boolean}
*/
isDismissible() {
return true;
}
/**
* Get the class name to apply to the modal.
*