-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.js
More file actions
348 lines (331 loc) · 11.5 KB
/
Copy pathconfig.js
File metadata and controls
348 lines (331 loc) · 11.5 KB
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
export default {
// if set to true, the user will be routed to /tutorial instead of /play if
// they haven't taken a tutorial
needsTutorial: false,
// each time the app is run, it will check this manifest and update the firebase database
// if new entries are there, they will be added, and entries that aren't in the manifest
// but are in the firebase database will be *removed*
manifestUrl: 'https://raw.githubusercontent.com/SwipesForScience/exampleConfig/master/bsHbnManifest.json',
manifestType: 'json',
widgetType: 'ImageSwipe',
widgetProperties: {
baseUrlTemplate: 'https://s3-us-west-2.amazonaws.com/akeshavan-mindcontrol/hbnSplat/{0}/tiles/base_{1}.png',
delimiter: '__',
leftSwipeLabel: 'Fail',
rightSwipeLabel: 'Pass',
},
// if manifestType = 'pubmed' then you should also include a manifestQuery key.
// if manifestType = 'json' then you're fine
// if manifestType = 'github' then you need to provide a github user, repo,
// and path under manifestGitHub
// manifestType: 'github',
// manifestQuery: '(neuroimaging OR "Magnetic Resonance Imaging" OR "MRI") AND brain AND autism',
// manifestGitHub: { user: 'akeshavan',
// repo: 'mHealthLandscape',
// path: 'ios',
// },
// manifestType: 'S3',
// manifestS3: {
// bucket: 'himatdata',
// prefix: 'BeringStrait',
// delimiter: '.wav',
// max_keys: 10000,
// },
// widgetType: 'ImageSwipe', //'BranchingTemplateWidget',
/* eslint-disable */
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// delimiter: '%',
// autoComplete: [
// 'active data entry',
// 'passive data entry',
// 'gamified',
// 'social media',
// 'educational',
// 'sensors',
// ],
// stages: [
// {
// id: 'relevant',
// showCriteria: {},
// question: 'Is this app about mental health?',
// responseProperties: {
// widgetType: 'TextBinarySwipe',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// leftSwipeLabel: 'No',
// rightSwipeLabel: 'Yes',
// },
// },
// },
// {
// id: 'datacollection',
// showCriteria: {
// node: 'relevant',
// statement: '==',
// value: 1,
// },
// question: 'Does this app collect user data?',
// responseProperties: {
// widgetType: 'TextBinarySwipe',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// leftSwipeLabel: 'No',
// rightSwipeLabel: 'Yes',
// },
// },
// },
// {
// id: 'sensors',
// showCriteria: {
// node: 'datacollection',
// statement: '==',
// value: 1,
// },
// question: 'Interoperable with sensors/wearables?',
// responseProperties: {
// widgetType: 'TextBinarySwipe',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// leftSwipeLabel: 'No',
// rightSwipeLabel: 'Yes, sensors',
// },
// },
// },
// {
// id: 'social',
// showCriteria: {
// node: 'datacollection',
// statement: '==',
// value: 1,
// },
// question: 'Is there a social component?',
// responseProperties: {
// widgetType: 'TextBinarySwipe',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// leftSwipeLabel: 'Not social',
// rightSwipeLabel: 'Yes, social',
// },
// },
// },
// {
// id: 'game',
// showCriteria: {
// node: 'datacollection',
// statement: '==',
// value: 1,
// },
// question: 'Are there game elements?',
// responseProperties: {
// widgetType: 'TextBinarySwipe',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// leftSwipeLabel: 'No',
// rightSwipeLabel: 'Yes',
// },
// },
// },
// {
// id: 'disorder',
// showCriteria: {
// node: 'datacollection',
// statement: '==',
// value: 1,
// },
// question: 'What disorders does it target?',
// responseProperties: {
// widgetType: 'TextTagger',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// autoComplete: ['depression', 'anxiety', 'sleep'],
// },
// },
// },
// {
// id: 'treatment',
// showCriteria: {
// node: 'datacollection',
// statement: '==',
// value: 1,
// },
// question: 'What is the treatment strategy?',
// responseProperties: {
// widgetType: 'TextTagger',
// widgetProperties: {
// titleKey: 'trackName',
// textKey: 'description',
// delimiter: '%',
// baseUrlTemplate: 'https://raw.githubusercontent.com/akeshavan/mHealthLandscape/master/ios/{0}.json',
// autoComplete: ['CBT', 'journal'],
// },
// },
// },
// ],
// },
/* eslint-enable */
iconAttribute: {
name: 'openmoji',
url: 'http://openmoji.org',
},
levels: {
0: {
level: 0,
min: 0,
max: 100,
character: null,
img: null,
img_grey: null,
},
1: {
level: 1,
min: 101,
max: 350,
character: 'fish',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F41F.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F41F.svg?sanitize=true',
},
2: {
level: 2,
min: 351,
max: 750,
character: 'frog',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F438.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F438.svg?sanitize=true',
},
3: {
level: 3,
min: 751,
max: 1000,
character: 'duck',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F986.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F986.svg?sanitize=true',
},
4: {
level: 4,
min: 1001,
max: 1500,
character: 'koala',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F428.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F428.svg?sanitize=true',
},
5: {
level: 5,
min: 1501,
max: 2000,
character: 'cat',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F408.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F408.svg?sanitize=true',
},
6: {
level: 6,
min: 2001,
max: 2500,
character: 'lion',
img: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/color/svg/1F981.svg?sanitize=true',
img_grey: 'https://raw.githubusercontent.com/hfg-gmuend/openmoji/master/black/svg/1F981.svg?sanitize=true',
},
},
// this shows a 'beta' ribbon in the bottom right corner
betaMode: false,
// this comes from your firebase console
firebaseKeys: {
apiKey: 'AIzaSyBLr1HyCf7tXGwnppkfjlIb6I0XSkJgybY',
authDomain: 'swipesforsciencedev1.firebaseapp.com',
databaseURL: 'https://swipesforsciencedev1.firebaseio.com',
projectId: 'swipesforsciencedev1',
storageBucket: 'swipesforsciencedev1.appspot.com',
messagingSenderId: '380364880642',
},
app: {
navbarVariant: 'info',
},
// Homepage configuration
// your app's title and tagline
home: {
title: 'Swipes for Science',
tagline: 'A citizen science game template',
// background image on Homepage
backgroundUrl: 'https://raw.githubusercontent.com/SwipesForScience/testConfig/master/images/SwipesForScience.svg?sanitize=true',
},
// Play configuration
play: {
blankImage: 'https://raw.githubusercontent.com/SwipesForScience/testConfig/master/images/undraw_blank_canvas.svg?sanitize=true',
},
// Chats configuration
chats: {
blankImage: 'https://raw.githubusercontent.com/SwipesForScience/testConfig/master/images/undraw_no_data.svg?sanitize=true',
},
// Profile configuration
profile: {
blankImage: 'https://raw.githubusercontent.com/SwipesForScience/testConfig/master/images/undraw_chatting.svg?sanitize=true',
},
// your app's tutorial page
// describe your problem and the way you want people to annotate
tutorial: {
// there is only 1 available custom animiation right now, and its 'Bubbles'
customBackgroundAnimation: 'Bubbles',
// steps have 2 parts, the intro and examples. In the intro you provide
// text and images. In the examples, you provide text, data pointers, and tutorial steps
// that the widget will display
steps: {
intro: [
{
// keep the text really short
text: 'here is an example tutorial step',
image: 'https://upload.wikimedia.org/wikipedia/commons/8/8b/Humpback_whales_in_singing_position.jpg',
},
{
// use \n to linebreak the text
text: 'here is another one.',
image: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Hydrophone_being_lowered_into_the_Atlantic.jpg',
},
],
examples: [
{
// fill these with examples with respect to the widget you're using
text: 'swipe right when the image is good quality',
pointer: 'sub-NDARYX806FL1__cor_184',
answer: 1,
tutorialStep: 0,
},
{
text: 'swipe left when its bad',
pointer: 'sub-NDAREG590BNY__sag_201',
answer: 0,
tutorialStep: 1,
},
{
text: `if you're not sure, click 'help' \n to discuss with scientists ${''}`,
pointer: 'sub-NDAREW671HZW__ax_86',
answer: 0,
tutorialStep: 2,
},
{
text: 'Are you ready to play?',
tutorialCompleted: true,
},
],
},
},
};