-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the first step in the merge. Everything works but there is some redundancy and minor TODOs. The main issue is the duplication of CSS, see: styles/uploader/*. Consolidating the CSS will also require bringing the uploader design in line with the browser. I did manage to fairly easily consolidate the collecticons, but there were 2 missing icons oam-design-system for dropbox and gdrive, see: styles/uploader/_buttons.scss. The merge includes commit history. Touches #220 Closes hotosm/oam-uploader#76
- Loading branch information
Showing
37 changed files
with
4,242 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -e # halt script on error | ||
|
||
# If this is the production branch, build it with | ||
# If this is the production branch, build it with | ||
# the production environment, otherwise use staging | ||
if [ $TRAVIS_BRANCH = ${DEPLOY_BRANCH} ]; then | ||
echo "We're going live with production!" | ||
npm run build | ||
else | ||
echo "Building based on staging environment" | ||
npm run stage | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ensure that all text files have their line endings normalized | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ language: node_js | |
branches: | ||
only: | ||
- develop | ||
- master | ||
- master | ||
|
||
env: | ||
global: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
'use strict'; | ||
var React = require('react/addons'); | ||
var Reflux = require('reflux'); | ||
var Router = require('react-router'); | ||
var RouteHandler = Router.RouteHandler; | ||
var AppActions = require('../actions/actions'); | ||
var Notifications = require('./notifications'); | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'App', | ||
|
||
mixins: [ | ||
Reflux.listenTo(AppActions.showNotification, 'onNotificationShow'), | ||
Reflux.listenTo(AppActions.clearNotification, 'dismissNotification'), | ||
Reflux.listenTo(AppActions.clearNotificationAfter, 'dismissNotification'), | ||
Router.State | ||
], | ||
|
||
getInitialState: function () { | ||
return { | ||
notification: { type: null, message: null } | ||
}; | ||
}, | ||
|
||
onNotificationShow: function (type, message) { | ||
this.setState({ | ||
notification: { type: type, message: message } | ||
}); | ||
}, | ||
|
||
dismissNotification: function (time) { | ||
if (!time) { | ||
time = 0; | ||
} | ||
|
||
setTimeout(function () { | ||
this.setState({ | ||
notification: { type: null, message: null } | ||
}); | ||
}.bind(this), time); | ||
}, | ||
|
||
render: function () { | ||
return ( | ||
<div> | ||
<div className='inner-wrapper'> | ||
<header className='site-header' role='banner'> | ||
<div className='inner'> | ||
<div className='site-headline'> | ||
<h1 className='site-title'> | ||
<img | ||
src='assets/graphics/layout/oam-logo-h-pos.svg' | ||
width='167' | ||
height='32' | ||
alt='OpenAerialMap logo' /> | ||
<span>OpenAerialMap</span> | ||
<small>Uploader</small> | ||
</h1> | ||
</div> | ||
</div> | ||
</header> | ||
<main className='site-body' role='main'> | ||
<div className='inner'> | ||
<RouteHandler/> | ||
</div> | ||
</main> | ||
</div> | ||
<Notifications | ||
type={this.state.notification.type} | ||
onNotificationDismiss={this.dismissNotification}> | ||
{this.state.notification.message} | ||
</Notifications> | ||
</div> | ||
); | ||
} | ||
}); |
Oops, something went wrong.