Skip to content

Commit

Permalink
Implemented prototype of the note picker screens and Level 1 of Pitch…
Browse files Browse the repository at this point in the history
… Perfect
  • Loading branch information
Transfusion committed Jul 14, 2019
1 parent 894fb4f commit 79ce0d2
Show file tree
Hide file tree
Showing 8 changed files with 892 additions and 24 deletions.
39 changes: 24 additions & 15 deletions app/components/ExerciseScreens/PitchPerfect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@
</TextView>


<StackLayout flexGrow="1" :style="exerciseAreaStyle">
<StackLayout style="margin-top: 15dp; margin-left: 15dp; margin-right: 15dp; font-size: 15em; background-color: white;">

<!--<StackLayout style="margin-top: 15dp; margin-left: 15dp; margin-right: 15dp; font-size: 15em; background-color: white;">
<TextView :text="pitchPerfectReminder" style="background-color: transparent;" editable="false"/>
</StackLayout>
<!--the timer-->
&lt;!&ndash;the timer&ndash;&gt;
<TextView horizontalAlignment="center" :text="timeCounterFormatted" editable="false" id="timer" />
<!--the inner ring, absolutely positioned-->
&lt;!&ndash;the inner ring, absolutely positioned&ndash;&gt;
<FlexboxLayout :style="micIconBgStyle" justifyContent="center">
<FlexboxLayout alignSelf="center" :style="micIconBgInlayStyle" justifyContent="center" >
<Label :text="'\uf130'" :style="micIconStyle" alignSelf="center" class="fas" />
</FlexboxLayout>
</FlexboxLayout>
</FlexboxLayout>-->

<!--<MicRecorder />-->
<IntroNotePicker />


</StackLayout>

<StackLayout style="flex-grow: 1"/>

Expand All @@ -39,16 +41,23 @@

<script>
import SpectraActionButton from "@/components/UIControls/SpectraActionButton";
import MicRecorder from '@/components/ExerciseScreens/PitchPerfectComponents/MicRecorder';
import {Config} from "@/utils/Config";
import IntroNotePicker from "@/components/ExerciseScreens/PitchPerfectComponents/IntroNotePicker";
import Level1 from './PitchPerfectLevels/Level1';
export default {
components: {SpectraActionButton},
components: {IntroNotePicker, SpectraActionButton, MicRecorder},
methods: {
onBack: function() {
this.$navigateBack();
},
onLetsGo: function() {
// the note that the user selected above
this.$navigateTo(Level1, {props: {targetNote: 'D3'}});
},
startExercise(){
Expand All @@ -59,7 +68,7 @@
}
},
computed: {
exerciseAreaStyle() {
/*exerciseAreaStyle() {
return {
'background-color': Config.primaryColor,
'border-radius': '5dp',
Expand Down Expand Up @@ -93,14 +102,14 @@
return {
'font-size': '35em',
}
}
}*/
},
data() {
return {
pitchPerfectReminder: 'Start and end the exercise by touching the mic icon.',
/*pitchPerfectReminder: 'Start and end the exercise by touching the mic icon.',
timeCounter: 0,
// representing seconds as HH:mm:ss
timeCounterFormatted: new Date(0 * 1000).toISOString().substr(11, 8)
timeCounterFormatted: new Date(0 * 1000).toISOString().substr(11, 8)*/
}
}
}
Expand Down Expand Up @@ -132,14 +141,14 @@
border-color: #E8E8E8;
}
#timer {
/*#timer {
font-family: 'monospace';
font-size: 20em;
/*align-self: center;*/
!*align-self: center;*!
color: #AC2535;
font-weight: bold;
background-color: transparent;
}
}*/
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--screen in the mockups to pick the D, F, or G notes-->
<template>

<StackLayout flexGrow="1" :style="introNotePickerStyle">

<TextView editable="false" style="background-color: transparent;">

<Span text="To begin: " style="font-weight: bold;" />
<Span :text="startingNoteInfo" style="" />

</TextView>

<TextView editable="false" style="background-color: transparent;">

<Span text="Practice: " style="font-weight: bold;" />
<Span :text="practiceInfo" style="" />

</TextView>

<StackLayout height="15dp"/>

<FlexboxLayout flexDirection="row" justifyContent="space-around" >
<IntroNotePickerButton text="D" />
<IntroNotePickerButton text="F" />
<IntroNotePickerButton text="G" />
</FlexboxLayout>
</StackLayout>
</template>


<script>
import {Config} from "@/utils/Config";
import IntroNotePickerButton from "@/components/ExerciseScreens/PitchPerfectComponents/IntroNotePickerButton";
export default {
components: {IntroNotePickerButton},
computed: {
introNotePickerStyle() {
}
},
data() {
return {
startingNoteInfo: "Choose the note below that is most comfortable for you to hold right now." +
" This will be your starting note during the exercise.",
practiceInfo: "As you listen, make the sound 'ol' (like 'old' without the 'd'). " +
"Your lips should be rounded, and you should feel vibrations on your lips."
}
}
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<FlexboxLayout flexDirection="row" justifyContent="space-between" :style="style" @tap="tap" >
<Label :text="text" alignSelf="center" style="font-weight: bold; font-size: 20em" />
<Label :text="'\uf028'" alignSelf="center" style="font-size: 20em;" class="fas" />
</FlexboxLayout>
</template>

<script>
export default {
props: ['selected', 'text'],
components: {
},
computed: {
style() {
return {
'background-color': '#C98DD8',
'padding': '15dp',
'min-width': '80dp',
// 'height': '20dp',
'border-radius': '5dp',
'box-shadow': '5px 5px 10px'
}
}
}
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<template>

<StackLayout flexGrow="1" :style="recordAreaStyle">

<StackLayout style="margin-top: 15dp; margin-left: 15dp; margin-right: 15dp; font-size: 15em; background-color: white;">
<TextView :text="pitchPerfectReminder" style="background-color: transparent;" editable="false"/>
</StackLayout>

<!--the timer-->
<TextView horizontalAlignment="center" :text="timeCounterFormatted" editable="false" id="timer" />

<!--the inner ring, absolutely positioned-->
<FlexboxLayout :style="micIconBgStyle" justifyContent="center">
<FlexboxLayout alignSelf="center" :style="micIconBgInlayStyle" justifyContent="center" >
<Label :text="'\uf130'" :style="micIconStyle" alignSelf="center" class="fas" />
</FlexboxLayout>
</FlexboxLayout>

</StackLayout>

</template>


<script>
import {Config} from "@/utils/Config";
export default {
methods: {
},
computed: {
recordAreaStyle() {
return {
'background-color': Config.primaryColor,
'border-radius': '5dp',
}
},
micIconBgStyle() {
return {
'background-color': Config.mutedColor,
'width': '150dp',
'height': '150dp',
'border-radius': '100%'
}
},
micIconBgInlayStyle() {
return {
'background-color': 'rgba(255, 255, 255, 0.8)',
'width': '60dp',
'height': '60dp',
'border-radius': '100%',
position: 'absolute',
left: '50%',
right: '50%',
'margin-left': '-30dp',
'margin-right': '-30dp'
}
},
micIconStyle(){
return {
'font-size': '35em',
}
}
},
data() {
return {
pitchPerfectReminder: 'Start and end the exercise by touching the mic icon.',
timeCounter: 0,
// representing seconds as HH:mm:ss
timeCounterFormatted: new Date(0 * 1000).toISOString().substr(11, 8)
}
}
}
</script>


<style scoped>
#timer {
font-family: 'monospace';
font-size: 20em;
/*align-self: center;*/
color: #AC2535;
font-weight: bold;
background-color: transparent;
}
</style>
Loading

0 comments on commit 79ce0d2

Please sign in to comment.