Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleung27 committed Aug 7, 2020
1 parent 2aef05f commit 3dfb694
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 0 additions & 2 deletions bboyproj/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
load_dotenv()
from .settings import *


DEBUG = True


SECURE_SSL_REDIRECT = False
5 changes: 2 additions & 3 deletions bboyproj/production.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from .settings import *


DEBUG = False



CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
SECURE_SSL_REDIRECT = True
21 changes: 14 additions & 7 deletions src/containers/TrainingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,19 @@ class TrainingView extends React.Component {
})
}

startPlaying() {
speakMove(move) {
var synth = window.speechSynthesis;
var textToSay = null
if(move.reverseEnabled) {
textToSay = new SpeechSynthesisUtterance(move.name + " reversed");
} else {
textToSay = new SpeechSynthesisUtterance(move.name);
}
textToSay.rate = 1
synth.speak(textToSay)
}

startPlaying() {
this.setState({
playing: true
})
Expand All @@ -167,9 +178,7 @@ class TrainingView extends React.Component {
// this.addMovesFromBacklog()
// this.fillBacklog()
if(this.state.voiceOn) {
var textToSay = new SpeechSynthesisUtterance(this.state.backlogSet[0].name);
textToSay.rate = 1
synth.speak(textToSay)
this.speakMove(this.state.backlogSet[0]);
}
}
// if first move is out of length, remove first and fill with more
Expand All @@ -183,9 +192,7 @@ class TrainingView extends React.Component {
if(this.state.voiceOn) {
// if moves are going too fast, then cut off previous speech midway
speechSynthesis.cancel()
var textToSay = new SpeechSynthesisUtterance(this.state.backlogSet[0].name);
textToSay.rate = 1
synth.speak(textToSay)
this.speakMove(this.state.backlogSet[0]);
}
// otherwise, keep decreasing first move's length
} else {
Expand Down
Binary file removed src/img/dan.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const app = (
clientId={process.env.REACT_APP_AUTH0_CLIENT_ID}
redirectUri={window.location.origin}
onRedirectCallback={onRedirectCallback}
useRefreshTokens={true}
>
{/*paste link to logo from github here*/}
<Favicon url="https://i.imgur.com/2qyUQEj.png" />
Expand Down

0 comments on commit 3dfb694

Please sign in to comment.