This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.html
231 lines (187 loc) · 7.82 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Rhino Rehab: Clinician View</title>
<!--Style-->
<link rel="stylesheet" type="text/css" href="mystyle.css">
<link rel="stylesheet" type="text/css" href="skeleton.css">
<!--Scripts-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.18/vue.min.js"></script>
<script src="js/amazon-cognito-identity.min.js"></script>
<script src="js/config.js"></script>
<script src="mainscript.js" defer></script>
<!--<script src="main.js"></script>-->
</head>
<body>
<div id="app">
<div>
<div style="text-align: right; padding: 2rem;">
<label for="email_value">Welcome back</span></label><label id="email_value"></label>
<button type="button" onclick="signOut()">Log out</button>
</button>
</div>
</div>
<div class="container" style="background: rgba(255, 255, 255, .5); padding: 3rem; bottom: 2rem;">
<div v-if="currentView=='login'">
<h2>Begin Session</h2>
Enter the patient's id:
<input type="text" id="patient_id" v-model="patient_id">
<button @click="beginSession()" class="button button-primary">Begin Session</button>
</div>
<div v-if="currentView!='login'">
<div>In session with patient: {{patient_id}}. Session Time: {{duration()}}.
<button @click="endSession()">End Session</button>
</div>
<div v-if="currentView=='start'">
<h2>Choose an activity</h1>
<!--<div>
<button @click="launchBoxAndBlocks()" class="button button-primary">Box and Blocks</button>
</div>
<div>
<button @click="launchBalloonGame()" class="button button-primary">Balloons</button>
</div>-->
<div>
<button onclick="launchPlaneGame()" class="button button-primary">Airplanes</button>
</div>
<!--<div>
<button @click="launchCarGame()" class="button button-primary">Model Car</button>
</div>-->
</div>
<div v-if="currentView=='clinician'">
<div>
<h2>Clinician View</h2>
</div>
<div>
<!--view for plane game-->
<div v-if="currentGame=='PlaneGame'" id="planeSettings">
<button @click="planeAction('startGame')">Start Level</button>
<button @click="planeAction('restartGame')">Restart Game</button>
<br />
<input @change="planeAction('toggleHoop')" size="25" id="hoop" type="checkbox" value="hooposcillation" />Hoop Oscillation<hr/>
<p id="diffLabel">Difficulty: 1</p>
<input type="range" @change="planeAction('difficulty')" min="0.02" max="10" value="1" class="slider" id="difficulty" step="0.01"/>
</div>
<!--view for box and blocks-->
<div v-if="currentGame=='BoxAndBlocks'" id="boxSettings">
<button @click="boxAction('leftHand')" id = "boxSettingsButton1" onclick="buttonClicked(this.id)">Left Hand</button>
<button @click="boxAction('rightHand')" id = "boxSettingsButton2" onclick="buttonClicked(this.id)">Right Hand</button><br /><hr />
<script>
function buttonClicked(clickedID)
{
document.getElementById(clickedID).style.backgroundColor = "black";
document.getElementById(clickedID).style.color = "white";
}
function noHands()
{
document.getElementById("boxSettingsButton1").style.backgroundColor = "rgba(255, 255, 255, .2)";
document.getElementById("boxSettingsButton1").style.color = "black";
document.getElementById("boxSettingsButton2").style.backgroundColor = "rgba(255, 255, 255, .2)";
document.getElementById("boxSettingsButton2").style.color = "black";
}
</script>
<button @click="boxAction('restartGame')" onclick="noHands()">Restart Game</button>
</div>
<!--view for car game-->
<div v-if="currentGame=='CarGame'" id="carSettings">
<button @click="carAction('startGame')">Start Level</button>
<button @click="carAction('restartGame')">Restart Game</button>
</div>
<!--view for balloon game-->
<div v-if="currentGame=='BalloonGame'" id="ballonSettings">
<button @click="balloonAction('startGame')">Start Level</button>
<button @click="balloonAction('restartGame')">Restart Game</button><hr />
<p id="shiftLabel">Balloon Shift: 0</p>
<input type="range" @change="balloonAction('shift')" min="-1" max="0" value="-0.5" class="slider" id="shift" step="0.1"/>
</div>
<!--<button @click="toggleHoop()">Toggle Hoop Oscillation</button>{{planeGameSettings}}-->
</div>
<div>
</div>
<div>
<table>
<tr>
<td>
Right Sensitivity:
<input type="number" min="1" max="10" v-model="leftSensitivity">
</td>
<td>
</td>
<td>
Left Sensitivity:
<input type="number" min="1" max="10" v-model="rightSensitivity">
</td>
</tr>
<tr>
<td>
Right visualus studius extents: xxx/xxx
</td>
<td rowspan="3">
<!--<img src="../muscular.png" style="height:40rem">-->
</td>
<td>
Left visualus studius extents: xxx/xxx
</td>
</tr>
<tr>
<td>
Right eclipsus extents: xxx/xxx
</td>
<td>
Left eclipsus extents: xxx/xxx
</td>
</tr>
<tr>
<td>
Right netium benum extents: xxx/xxx
</td>
<td>
Left netium benum extents: xxx/xxx
</td>
</tr>
</table>
{{kinectDataLeft}}<br />
{{kinectDataRight}}
</div>
<input type="file" id="file" @change="changePath()" style="display:none" />
<p id="ttt">Please select the game path...</p>
<button @click="setPath()">Change Path</button>
<br />
<button @click="backToStart()" class="button button-primary">Choose a different Activity</button>
</div>
<!--sign in stuff not needed rn-->
<!--<script>
var poolData = {
UserPoolId : _config.cognito.userPoolId,
ClientId : _config.cognito.clientId,
};
var userPool = new AmazonCognitoIdentity.CognitoUserPool(poolData);
var cognitoUser = userPool.getCurrentUser();
window.onload = function(){
if(cognitoUser != null){
cognitoUser.getSession(function(err,session){
if(err){
alert(err);
return;
}
console.log('session validity: ' + session.isValid());
cognitoUser.getUserAttributes(function(err, result){
if(err){
console.log(err);
return;
}
console.log(result);
document.getElementById("email_value").innerHTML = result[2].getValue();
});
});
}
}
function signOut(){
if(cognitoUser != null){
cognitoUser.signOut();
location.href='index2.html';
}
}
</script>-->
</body>
</html>