Skip to content

Commit

Permalink
Add warning banner if in test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-koan committed Sep 12, 2016
1 parent acfd2d7 commit ca7be29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
app.config.from_envvar('FLASK_SETTINGS_FILE')

settings = sys.modules[settings_module]
app.config['TEST_MODE'] = settings.TEST_MODE

_GOOGLE_OAUTH_SCOPES = [
'https://www.googleapis.com/auth/drive.readonly',
Expand Down
11 changes: 11 additions & 0 deletions static/css/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -1015,3 +1015,14 @@ animation: none;

.note {font-size: 0.8em;}
.ui-note {font: 13px Roboto, Arial, Sans-serif;}

/*
test mode banner
*/
.test-mode-warning {
padding: 5px;
text-align: center;
font-weight: bold;
background-color: orange;
color: white;
}
4 changes: 4 additions & 0 deletions templates/_editor.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{% if config.TEST_MODE %}
<div class="test-mode-warning">Running in test mode: Data will not be saved.</div>
{% endif %}

<div class="menu-bar">
<div class="menu-bar-left">
<a id="storymap_list" class="btn" href="{{ url_for('select') }}"><i class="icon-chevron-left"></i> My Maps</a>
Expand Down

0 comments on commit ca7be29

Please sign in to comment.