Remove modal responsibility for loading UI; using loading button state

This commit is contained in:
Toby Zerner
2015-08-02 17:25:05 +09:30
parent 5876ee30ed
commit d44ffd1866
9 changed files with 46 additions and 40 deletions

View File

@ -1,5 +1,4 @@
import Component from 'flarum/Component';
import LoadingIndicator from 'flarum/components/LoadingIndicator';
import Alert from 'flarum/components/Alert';
import Button from 'flarum/components/Button';
@ -19,13 +18,6 @@ export default class Modal extends Component {
* @type {Alert}
*/
this.alert = null;
/**
* Whether or not the form is processing.
*
* @type {Boolean}
*/
this.loading = false;
}
view() {
@ -54,10 +46,6 @@ export default class Modal extends Component {
{this.content()}
</form>
</div>
{LoadingIndicator.component({
className: 'Modal-loading ' + (this.loading ? 'active' : '')
})}
</div>
);
}