From bd1dd7eb4242b0e191e9fd63f7a97a300cf44561 Mon Sep 17 00:00:00 2001 From: Neil Fulwiler Date: Wed, 11 Mar 2020 09:17:00 +0000 Subject: [PATCH] change text, add close button (#281) --- src/App.js | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/App.js b/src/App.js index 52205d7..fd80587 100644 --- a/src/App.js +++ b/src/App.js @@ -6,12 +6,16 @@ import _ from "lodash"; import RootRef from "@material-ui/core/RootRef"; import Button from "@material-ui/core/Button"; +import IconButton from "@material-ui/core/IconButton"; import Snackbar from "@material-ui/core/Snackbar"; +import { withStyles } from "@material-ui/core/styles"; +import Typography from "@material-ui/core/Typography"; import Dialog from "@material-ui/core/Dialog"; import DialogActions from "@material-ui/core/DialogActions"; import DialogTitle from "@material-ui/core/DialogTitle"; import DialogContent from "@material-ui/core/DialogContent"; import DialogContentText from "@material-ui/core/DialogContentText"; +import CloseIcon from "@material-ui/icons/Close"; import TutorialPage from "./components/pages/TutorialPage"; import WelcomePage from "./components/pages/WelcomePage"; @@ -37,6 +41,14 @@ import FeedbackReportsSubrouter from "./components/FeedbackReports/FeedbackRepor import MapLocation from "./types/MapLocation"; const placeholderImage = process.env.PUBLIC_URL + "/custom/images/logo.svg"; +const styles = theme => ({ + dialogClose: { + position: "absolute", + top: theme.spacing(1), + right: theme.spacing(1) + } +}); + class App extends Component { constructor(props) { super(props); @@ -383,7 +395,7 @@ class App extends Component { if (this.props.config.SECURITY.UPLOAD_REQUIRES_LOGIN && !this.state.user) { this.setState({ dialogOpen: true, - dialogTitle: "attention", + dialogTitle: "Please login to add a photo", dialogContentText: "Before adding photos, you must be logged into your account." }); @@ -458,10 +470,6 @@ class App extends Component { }); }; - handleRejectLoginPhotoAdd = () => { - this.setState({ dialogOpen: false }); - }; - handleNextClick = async () => { const user = await authFirebase.reloadUser(); if (user.emailVerified) { @@ -637,7 +645,7 @@ class App extends Component { }; render() { - const { fields, config, history } = this.props; + const { classes, fields, config, history } = this.props; return (
{!this.state.termsAccepted && @@ -880,7 +888,16 @@ class App extends Component { /> - {this.state.dialogTitle} + + {this.state.dialogTitle} + + + + {this.state.dialogContentText} @@ -888,10 +905,6 @@ class App extends Component { - - {/* clicking ok should either open a login box or there should be a text field in the box to enter your email address */}