Interactive interface for browsing global, full-resolution satellite imagery
Fix notify styling #1779
Benjamin Kingf632dc706d11
diff --git a/web/css/modal.css b/web/css/modal.cssindex d33416afb..26310eb4c 100644--- a/web/css/modal.css+++ b/web/css/modal.css@@ -4,7 +4,8 @@background: #282828;color: #eee;}-.modal-dialog .close, .modal-body pre {+.modal-dialog .close,+.modal-body pre {color: #eee;}.clickable-behind-modal .modal {@@ -49,3 +50,6 @@.dynamic-modal.modal-dialog {position: absolute;}+.notify .modal-footer {+ border: none;+}diff --git a/web/js/components/image-download/notify.js b/web/js/components/image-download/notify.jsindex 6449c2aed..53898c5c8 100644--- a/web/js/components/image-download/notify.js+++ b/web/js/components/image-download/notify.js@@ -1,7 +1,7 @@import React from 'react';import PropTypes from 'prop-types';-import { Button, ModalFooter } from 'reactstrap';-+import { ModalFooter } from 'reactstrap';+import Button from '../util/button';export class Notify extends React.Component {render() {const { bodyText, cancel, accept } = this.props;@@ -11,12 +11,8 @@ export class Notify extends React.Component {<p>{bodyText}</p></div><ModalFooter>- <Button color="primary" onClick={cancel}>- Cancel- </Button>{' '}- <Button color="#fff" onClick={accept}>- OK- </Button>+ <Button className="cancel-notify" text="Cancel" onClick={cancel} />+ <Button className="accept-notify" text="OK" onClick={accept} /></ModalFooter></React.Fragment>);diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.jsindex 2b028e6b4..c8e19ed15 100644--- a/web/js/containers/animation-widget.js+++ b/web/js/containers/animation-widget.js@@ -439,6 +439,8 @@ const mapDispatchToProps = dispatch => ({openCustomContent('image_download_notify_' + type, {headerText: 'Notify',bodyComponent: Notify,+ size: 'sm',+ modalClassName: 'notify',bodyComponentProps}));diff --git a/web/js/containers/gif.js b/web/js/containers/gif.jsindex a7c5da2a6..9404bc2d3 100644--- a/web/js/containers/gif.js+++ b/web/js/containers/gif.js@@ -291,7 +291,11 @@ class GIF extends Component {if (isDownloading) {let headerText = progress ? 'Creating GIF' : 'Requesting Imagery';return (- <Modal isOpen={true} toggle={onClose}>+ <Modal+ isOpen={true}+ toggle={onClose}+ size={progress === 0 ? 'sm' : 'md'}+ ><ModalHeader toggle={onClose}>{headerText}</ModalHeader><ModalBody><div style={{ minHeight: 50 }}>diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.jsindex 66c1f3971..c0b778d3a 100644--- a/web/js/containers/toolbar.js+++ b/web/js/containers/toolbar.js@@ -129,7 +129,8 @@ class toolbarContainer extends Component {notificationType,notificationContentNumber,config,- isImageDownloadActive+ isImageDownloadActive,+ isCompareActive} = this.props;const notificationClass = notificationType? ' wv-status-' + notificationType@@ -175,7 +176,13 @@ class toolbarContainer extends Component {: 'wv-toolbar-button disabled'}disabled={!isImageDownloadActive}- title="Take a snapshot"+ title={+ isCompareActive+ ? 'You must exit comparison mode to use the snapshot feature'+ : isImageDownloadActive+ ? 'You must exit data download mode to use the snapshot feature'+ : 'Take a snapshot'+ }onClick={this.openImageDownload}><i className="fa fa-camera fa-2x" />{' '}@@ -205,13 +212,15 @@ function mapStateToProps(state) {{ proj: proj.id },state);+ const isCompareActive = compare.active;return {notificationType: type,notificationContentNumber: number,config: state.config,isImageDownloadActive: Boolean(- lodashGet(state, 'map.ui.selected') && !compare.active+ lodashGet(state, 'map.ui.selected') && !isCompareActive),+ isCompareActive,hasCustomPalette: hasCustomPaletteInActiveProjection(activeLayersForProj,palettes[activeString]@@ -245,6 +254,8 @@ const mapDispatchToProps = dispatch => ({openCustomContent('image_download_notify_' + type, {headerText: 'Notify',bodyComponent: Notify,+ size: 'sm',+ modalClassName: 'notify',bodyComponentProps}));@@ -272,6 +283,7 @@ toolbarContainer.propTypes = {config: PropTypes.object,hasCustomPalette: PropTypes.bool,hasGraticule: PropTypes.bool,+ isCompareActive: PropTypes.bool,isImageDownloadActive: PropTypes.bool,isRotated: PropTypes.bool,notificationContentNumber: PropTypes.number,