mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 14:49:57 +08:00
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:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user