mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-09 04:13:28 +02:00
Render modal dialog above page
This commit is contained in:
@@ -173,7 +173,7 @@ class PluginsOverview extends React.Component<Props, State> {
|
||||
key={"updateAll"}
|
||||
icon={"sync-alt"}
|
||||
label={this.computeUpdateAllSize()}
|
||||
onClick={() => this.setState({ showUpdateAllModal: true })}
|
||||
action={() => this.setState({ showUpdateAllModal: true })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -195,8 +195,30 @@ class PluginsOverview extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, error, collection, pendingPlugins } = this.props;
|
||||
const { loading, error, collection } = this.props;
|
||||
|
||||
if (error) {
|
||||
return <ErrorNotification error={error} />;
|
||||
}
|
||||
|
||||
if (!collection || loading) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
const actions = this.createActions();
|
||||
return (
|
||||
<>
|
||||
{this.renderHeader(actions)}
|
||||
<hr className="header-with-actions" />
|
||||
{this.renderPluginsList()}
|
||||
{this.renderFooter(actions)}
|
||||
{this.renderModals()}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
renderModals = () => {
|
||||
const { collection, pendingPlugins } = this.props;
|
||||
const {
|
||||
showPendingModal,
|
||||
showCancelModal,
|
||||
@@ -229,25 +251,7 @@ class PluginsOverview extends React.Component<Props, State> {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return <ErrorNotification error={error} />;
|
||||
}
|
||||
|
||||
if (!collection || loading) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
const actions = this.createActions();
|
||||
return (
|
||||
<>
|
||||
{this.renderHeader(actions)}
|
||||
<hr className="header-with-actions" />
|
||||
{this.renderPluginsList()}
|
||||
{this.renderFooter(actions)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
renderPluginsList() {
|
||||
const { collection, t } = this.props;
|
||||
|
||||
Reference in New Issue
Block a user