[#38: Enhance new repertory release available notification - partial] [Added FocusTrap to modals]
This commit is contained in:
20
src/App.js
20
src/App.js
@@ -11,6 +11,7 @@ import InfoDetails from './components/InfoDetails/InfoDetails';
|
||||
import IPCContainer from './containers/IPCContainer/IPCContainer';
|
||||
import Loading from './components/UI/Loading/Loading';
|
||||
import MountItems from './containers/MountItems/MountItems';
|
||||
import NewReleases from './components/NewReleases/NewReleases';
|
||||
import {notifyError} from './redux/actions/error_actions';
|
||||
import Reboot from './components/Reboot/Reboot';
|
||||
import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay';
|
||||
@@ -111,12 +112,26 @@ class App extends IPCContainer {
|
||||
!this.props.DismissDependencies &&
|
||||
this.props.AllowMount;
|
||||
|
||||
const showNewReleases = !showConfig &&
|
||||
!this.props.DisplayConfirmYesNo &&
|
||||
!showDependencies &&
|
||||
!this.props.DownloadActive &&
|
||||
!this.props.DisplayError &&
|
||||
!this.props.DisplayInfo &&
|
||||
!this.props.InstallActive &&
|
||||
!this.props.RebootRequired &&
|
||||
!this.props.DisplaySelectAppPlatform &&
|
||||
!showUpgrade &&
|
||||
!this.props.DismissNewReleasesAvailable &&
|
||||
(this.props.NewReleasesAvailable.length > 0);
|
||||
|
||||
const configDisplay = createModalConditionally(showConfig, <Configuration version={selectedVersion} remoteSupported={remoteSupported} />);
|
||||
const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, <YesNo/>);
|
||||
const dependencyDisplay = createModalConditionally(showDependencies, <DependencyList/>);
|
||||
const downloadDisplay = createModalConditionally(this.props.DownloadActive, <DownloadProgress/>);
|
||||
const downloadDisplay = createModalConditionally(this.props.DownloadActive, <DownloadProgress />, false, true);
|
||||
const errorDisplay = createModalConditionally(this.props.DisplayError, <ErrorDetails/>, true);
|
||||
const infoDisplay = createModalConditionally(this.props.DisplayInfo, <InfoDetails/>, true);
|
||||
const newReleasesDisplay = createModalConditionally(showNewReleases, <NewReleases/>);
|
||||
const rebootDisplay = createModalConditionally(this.props.RebootRequired, <Reboot />);
|
||||
const selectAppPlatformDisplay = createModalConditionally(this.props.DisplaySelectAppPlatform, <SelectAppPlatform/>);
|
||||
const upgradeDisplay = createModalConditionally(showUpgrade, <UpgradeUI/>);
|
||||
@@ -175,6 +190,7 @@ class App extends IPCContainer {
|
||||
{mainContent}
|
||||
</div>
|
||||
</div>
|
||||
{newReleasesDisplay}
|
||||
{selectAppPlatformDisplay}
|
||||
{dependencyDisplay}
|
||||
{upgradeDisplay}
|
||||
@@ -201,12 +217,14 @@ const mapStateToProps = state => {
|
||||
DisplayError: state.error.DisplayError,
|
||||
DisplayInfo: state.error.DisplayInfo,
|
||||
DisplaySelectAppPlatform: state.common.DisplaySelectAppPlatform,
|
||||
DismissNewReleasesAvailable: state.relver.DismissNewReleasesAvailable,
|
||||
DownloadActive: state.download.DownloadActive,
|
||||
InstallActive: state.install.InstallActive,
|
||||
InstalledVersion: state.relver.InstalledVersion,
|
||||
LocationsLookup: state.relver.LocationsLookup,
|
||||
MissingDependencies: state.install.MissingDependencies,
|
||||
MountsBusy: state.mounts.MountsBusy,
|
||||
NewReleasesAvailable: state.relver.NewReleasesAvailable,
|
||||
Platform: state.common.Platform,
|
||||
ProviderState: state.mounts.ProviderState,
|
||||
RebootRequired: state.common.RebootRequired,
|
||||
|
||||
Reference in New Issue
Block a user