Merge remote-tracking branch 'upstream/master' into feature/ui-errors-and-expressions

This commit is contained in:
orangemug
2020-02-23 13:34:05 +00:00
21 changed files with 3547 additions and 2350 deletions

View File

@@ -226,7 +226,8 @@ export default class App extends React.Component {
open: false,
shortcuts: false,
export: false,
survey: localStorage.hasOwnProperty('survey') ? false : true,
// TODO: Disabled for now, this should be opened on the Nth visit to the editor
survey: false,
debug: false,
},
mapboxGlDebugOptions: {

View File

@@ -182,7 +182,7 @@ export default class Toolbar extends React.Component {
target="_blank"
className="maputnik-toolbar-logo"
>
<img src={logoImage} alt="Maputnik" />
<span dangerouslySetInnerHTML={{__html: logoImage}} />
<h1>
<span className="maputnik-toolbar-name">{pkgJson.name}</span>
<span className="maputnik-toolbar-version">v{pkgJson.version}</span>

View File

@@ -3,11 +3,15 @@ import PropTypes from 'prop-types'
class CheckboxInput extends React.Component {
static propTypes = {
value: PropTypes.bool.isRequired,
value: PropTypes.bool,
style: PropTypes.object,
onChange: PropTypes.func,
}
static defaultProps = {
value: false,
}
render() {
return <label className="maputnik-checkbox-wrapper">
<input

View File

@@ -158,7 +158,7 @@ export default class OpenLayersMap extends React.Component {
/>
</div>
<div className="maputnik-ol-zoom">
Zoom level: {this.state.zoom}
Zoom: {this.state.zoom}
</div>
{this.props.debugToolbox &&
<div className="maputnik-ol-debug">

View File

@@ -80,7 +80,7 @@ class ExportModal extends React.Component {
Download a JSON style to your computer.
</p>
<p>
<div>
<InputBlock
label={fieldSpecAdditional.maputnik.mapbox_access_token.label}
fieldSpec={fieldSpecAdditional.maputnik.mapbox_access_token}
@@ -108,7 +108,7 @@ class ExportModal extends React.Component {
onChange={this.changeMetadataProperty.bind(this, "maputnik:thunderforest_access_token")}
/>
</InputBlock>
</p>
</div>
<Button onClick={this.downloadStyle.bind(this)}>
<MdFileDownload />

View File

@@ -26,7 +26,7 @@ class SurveyModal extends React.Component {
title="Maputnik Survey"
>
<div className="maputnik-modal-survey">
<img className="maputnik-modal-survey__logo" src={logoImage} alt="" width="128" />
<div className="maputnik-modal-survey__logo" dangerouslySetInnerHTML={{__html: logoImage}} />
<h1>You + Maputnik = Maputnik better for you</h1>
<p className="maputnik-modal-survey__description">We dont track you, so we dont know how you use Maputnik. Help us make Maputnik better for you by completing a 7minute survey carried out by our contributing designer.</p>
<Button onClick={this.onClick} className="maputnik-big-button maputnik-white-button maputnik-wide-button">Take the Maputnik Survey</Button>