Skip to content

Commit 2b79c96

Browse files
committed
Merge branch 'develop' of https://github.com/osmlab/maproulette3 into main
2 parents cf40021 + 3d8996d commit 2b79c96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+6209
-3020
lines changed

.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,11 @@ REACT_APP_SERVER_API_KEY=''
164164

165165
# Front-end debugging messages can be enabled, if desired
166166
REACT_APP_DEBUG='disabled'
167+
168+
# Require Challenge Owners to provide an email
169+
# Supported values = ["required", undefined]
170+
REACT_APP_EMAIL_ENFORCEMENT='required'
171+
172+
# Include ability to add changeset URL
173+
# Supported values = ["enabled", "disabled", undefined]
174+
REACT_APP_CHANGESET_URL='enabled'

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ yarn-debug.log*
3434
yarn-error.log*
3535

3636
*.swp
37+
38+
#scala plugin
39+
/.bsp
40+
/project
41+
/target
42+
/.metals
43+
44+
#vscode
45+
/.vscode

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maproulette3",
3-
"version": "3.7.7",
3+
"version": "3.7.8",
44
"private": true,
55
"dependencies": {
66
"@apollo/client": "^3.1.1",
Lines changed: 70 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
import React, { Component } from 'react'
2-
import PropTypes from 'prop-types'
3-
import { Switch, Route, withRouter } from 'react-router-dom'
4-
import MediaQuery from 'react-responsive'
5-
import AsManager from '../../interactions/User/AsManager'
6-
import SignIn from '../../pages/SignIn/SignIn'
7-
import WithStatus from '../HOCs/WithStatus/WithStatus'
8-
import WithCurrentUser from '../HOCs/WithCurrentUser/WithCurrentUser'
9-
import ScreenTooNarrow
10-
from '../ScreenTooNarrow/ScreenTooNarrow'
11-
import EditChallenge from './Manage/ManageChallenges/EditChallenge/EditChallenge'
12-
import EditProject from './Manage/EditProject/EditProject'
13-
import ManageChallengeList from './Manage/VirtualProjects/ManageChallengeList'
14-
import EditTask from './Manage/ManageTasks/EditTask/EditTask'
15-
import InspectTask from './Manage/InspectTask/InspectTask'
16-
import ProjectsDashboard from './Manage/ProjectsDashboard/ProjectsDashboard'
17-
import ProjectDashboard from './Manage/ProjectDashboard/ProjectDashboard'
18-
import ChallengeDashboard from './Manage/ChallengeDashboard/ChallengeDashboard'
19-
import BusySpinner from '../BusySpinner/BusySpinner'
20-
import './Manage/Widgets/widget_registry.js'
21-
import './AdminPane.scss'
22-
1+
import React, { Component } from "react";
2+
import PropTypes from "prop-types";
3+
import { Switch, Route, withRouter } from "react-router-dom";
4+
import MediaQuery from "react-responsive";
5+
import AsManager from "../../interactions/User/AsManager";
6+
import SignIn from "../../pages/SignIn/SignIn";
7+
import WithStatus from "../HOCs/WithStatus/WithStatus";
8+
import WithCurrentUser from "../HOCs/WithCurrentUser/WithCurrentUser";
9+
import ScreenTooNarrow from "../ScreenTooNarrow/ScreenTooNarrow";
10+
import EditChallenge from "./Manage/ManageChallenges/EditChallenge/EditChallenge";
11+
import EditProject from "./Manage/EditProject/EditProject";
12+
import ManageChallengeList from "./Manage/VirtualProjects/ManageChallengeList";
13+
import EditTask from "./Manage/ManageTasks/EditTask/EditTask";
14+
import InspectTask from "./Manage/InspectTask/InspectTask";
15+
import ProjectsDashboard from "./Manage/ProjectsDashboard/ProjectsDashboard";
16+
import ProjectDashboard from "./Manage/ProjectDashboard/ProjectDashboard";
17+
import ChallengeDashboard from "./Manage/ChallengeDashboard/ChallengeDashboard";
18+
import BusySpinner from "../BusySpinner/BusySpinner";
19+
import EmailRequirementNotice from "./Manage/EmailRequirementNotice/EmailRequirementNotice";
20+
import "./Manage/Widgets/widget_registry.js";
21+
import "./AdminPane.scss";
2322

2423
/**
2524
* AdminPane is the top-level component for administration functions. It has a
@@ -31,71 +30,92 @@ import './AdminPane.scss'
3130
*/
3231
export class AdminPane extends Component {
3332
componentDidUpdate(prevProps) {
34-
if (this.props.location.pathname !== prevProps.location.pathname &&
35-
this.props.location.search !== prevProps.location.search) {
36-
window.scrollTo(0, 0)
33+
if (
34+
this.props.location.pathname !== prevProps.location.pathname &&
35+
this.props.location.search !== prevProps.location.search
36+
) {
37+
window.scrollTo(0, 0);
3738
}
3839
}
3940

4041
render() {
4142
// The user needs to be logged in.
42-
const manager = AsManager(this.props.user)
43+
const manager = AsManager(this.props.user);
4344
if (!manager.isLoggedIn()) {
44-
return (
45-
this.props.checkingLoginStatus ?
45+
return this.props.checkingLoginStatus ? (
4646
<div className="admin mr-flex mr-justify-center mr-py-8 mr-w-full mr-bg-blue">
4747
<BusySpinner />
48-
</div> :
48+
</div>
49+
) : (
4950
<SignIn {...this.props} />
50-
)
51+
);
5152
}
5253

5354
return (
5455
<React.Fragment>
56+
<EmailRequirementNotice />
5557
<div className="admin mr-bg-gradient-r-green-dark-blue mr-text-white">
5658
<div className="admin-pane">
5759
<Switch>
58-
<Route exact path='/admin/project/:projectId/challenge/:challengeId'
59-
component={ChallengeDashboard} />
6060
<Route
6161
exact
62-
path={[
63-
'/admin/projects/new',
64-
'/admin/project/:projectId/edit',
65-
]}
62+
path="/admin/project/:projectId/challenge/:challengeId"
63+
component={ChallengeDashboard}
64+
/>
65+
<Route
66+
exact
67+
path={["/admin/projects/new", "/admin/project/:projectId/edit"]}
6668
component={EditProject}
6769
/>
6870
<Route
6971
exact
7072
path={[
71-
'/admin/project/:projectId/challenges/new',
72-
'/admin/project/:projectId/challenge/:challengeId/edit',
73-
'/admin/project/:projectId/challenge/:challengeId/clone',
73+
"/admin/project/:projectId/challenges/new",
74+
"/admin/project/:projectId/challenge/:challengeId/edit",
75+
"/admin/project/:projectId/challenge/:challengeId/clone",
7476
]}
7577
component={EditChallenge}
7678
/>
77-
<Route exact path='/admin/project/:projectId/challenge/:challengeId/task/:taskId/edit'
78-
component={EditTask} />
79-
<Route exact path='/admin/project/:projectId/challenge/:challengeId/task/:taskId/inspect'
80-
component={InspectTask} />
81-
<Route exact path='/admin/virtual/project/:projectId/challenges/manage' component={ManageChallengeList} />
82-
<Route exact path='/admin/projects' component={ProjectsDashboard} />
83-
<Route exact path='/admin/project/:projectId' component={ProjectDashboard} />
79+
<Route
80+
exact
81+
path="/admin/project/:projectId/challenge/:challengeId/task/:taskId/edit"
82+
component={EditTask}
83+
/>
84+
<Route
85+
exact
86+
path="/admin/project/:projectId/challenge/:challengeId/task/:taskId/inspect"
87+
component={InspectTask}
88+
/>
89+
<Route
90+
exact
91+
path="/admin/virtual/project/:projectId/challenges/manage"
92+
component={ManageChallengeList}
93+
/>
94+
<Route
95+
exact
96+
path="/admin/projects"
97+
component={ProjectsDashboard}
98+
/>
99+
<Route
100+
exact
101+
path="/admin/project/:projectId"
102+
component={ProjectDashboard}
103+
/>
84104
<Route component={ProjectsDashboard} />
85105
</Switch>
86106
</div>
87107
</div>
88108
<MediaQuery query="(max-width: 1023px)">
89109
<ScreenTooNarrow />
90110
</MediaQuery>
91-
</React.Fragment>
92-
)
111+
</React.Fragment>
112+
);
93113
}
94114
}
95115

96116
AdminPane.propTypes = {
97117
/** router location */
98118
location: PropTypes.object.isRequired,
99-
}
119+
};
100120

101-
export default WithStatus(WithCurrentUser(withRouter(AdminPane)))
121+
export default WithStatus(WithCurrentUser(withRouter(AdminPane)));

0 commit comments

Comments
 (0)