-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsPage.ux
executable file
·337 lines (287 loc) · 20.1 KB
/
SettingsPage.ux
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
<Page ux:Class="SettingsPage">
<Router ux:Dependency="depRouter" />
<JavaScript File="SettingsPage.js" />
<JavaScript File="UserTimeObservables.js" />
<JavaScript File="PickerChoices.js" />
<Activated>
<Callback Handler="{onActivated}" />
</Activated>
<ModalDatePicker ux:Name="SmokeDatePicker" Date="{userData.smokeFreeSince}" MinDate="{minDate}" MaxDate="{maxDate}" />
<ModalDatePicker ux:Name="SnusDatePicker" Date="{userData.snusFreeSince}" MinDate="{minDate}" MaxDate="{maxDate}" />
<Picker ux:Name="CigDailyNumberPicker" Entries="{AntallSigaretter}" Current="{userData.dailyCigarettes}" />
<Picker ux:Name="SnusDailyNumberPicker" Entries="{AntallSnus}" Current="{userData.dailySnus}" />
<Picker ux:Name="CigPrisPicker" Entries="{PrisSigaretter}" Current="{userData.pricePerCigarette}" />
<Picker ux:Name="SnusPrisPicker" Entries="{PrisSnus}" Current="{userData.pricePerSnus}" />
<Picker ux:Name="CigReasonPicker" Entries="{Reason}" Current="{userData.quitSmokingReason}" />
<Picker ux:Name="SnusReasonPicker" Entries="{SnusReason}" Current="{userData.quitSnusReason}" />
<DockPanel Dock="Top" Color="#EFEFF4">
<StackPanel Dock="Top">
<!-- nav bar -->
<DockPanel Color="White" Height="50" Padding="0,0,10,0">
<Shadow ux:Name="RectangleShadow" Size="10" Distance="1"/>
<Panel HitTestMode="LocalBoundsAndChildren" Dock="Left"
Tapped="{returnAndLoad}">
<Image File="Assets/backArrow.png" Margin="12"/>
<Tapped>
<Scale Factor="1.5" Duration="0.2" />
</Tapped>
</Panel>
<Text Dock="Left" Value="Tilbake" Margin="5,5,5,5" FontSize="16" Alignment="Center" TextAlignment="Left" />
<StackPanel HitTestMode="LocalBoundsAndChildren" Dock="Right"
Tapped="{returnAndSave}" Orientation="Horizontal">
<Text Value="Lagre" Margin="5,5,5,5" FontSize="16" Alignment="Center" TextAlignment="Left" Tapped="{returnAndSave}" />
<Image File="Assets/ic_done_black_48dp.png" Margin="7" />
<Tapped>
<Scale Factor="1.5" Duration="0.2" />
</Tapped>
</StackPanel>
</DockPanel>
</StackPanel>
<StackPanel Dock="Top" ClipToBounds="True" Color="#fff">
<StackPanel Padding="20">
<Text Value="Velkommen!" Color="#444" Font="SluttaMedium" FontSize="36" />
<Text TextWrapping="Wrap" Color="Black" Margin="0,5,0,0" FontSize="16" TextAlignment="Left">
Appen er din personlige motivator. Å bli tobakksfri kan være lettere enn du tror!
</Text>
</StackPanel>
<Rectangle Color="#eee" Height="1" />
</StackPanel>
<ScrollView>
<StackPanel>
<StackPanel Color="#fff" Margin="0, 0, 0, 40">
<Text Value="Jeg" Color="SluttaRed" FontSize="18" Margin="20, 15, 20, 15" />
<Rectangle Color="SluttaRed" Height="1" />
<DockPanel Margin="20, 5, 20, 5">
<Text Value="Røyker" Color="Black" FontSize="16" Margin="0, 10, 0, 10"
Dock="Left" />
<MySwitch ux:Name="dotheysmoke" Dock="Right" Value="{userData.smokes}" Clicked="{resetSmokeSince}" />
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 5, 20, 5">
<Text Value="Snuser" Color="Black" FontSize="16" Margin="0, 10, 0, 10"
Dock="Left" />
<MySwitch Dock="Right" Value="{userData.snus}" Clicked="{resetSnusSince}"/>
</DockPanel>
</StackPanel>
<WhileTrue Value="{userData.smokes}">
<StackPanel Color="#fff" Margin="0, 0, 0, 40">
<Text Value="Mine vaner - Røyk" Color="SluttaRed" FontSize="18" Margin="20, 15, 20, 15" />
<Rectangle Color="SluttaRed" Height="1" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 1*">
<Text Value="Antall sigaretter daglig" Color="Black" FontSize="16" Margin="0" Alignment="VerticalCenter"
TextWrapping="Wrap" Dock="Left" />
<Text Value="{userData.dailyCigarettes.NameEn}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="CigDailyNumberPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 1*">
<Text Value="Pris per sigarett" Color="Black" FontSize="16" Margin="0" Alignment="VerticalCenter"
TextWrapping="Wrap" Dock="Left" />
<Text Value="{userData.pricePerCigarette.NameEn}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="CigPrisPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="2*, 1*">
<Text Value="Røykfri siden" Color="Black" FontSize="16" Margin="0"
Dock="Left" />
<DockPanel Dock="Right">
<Text Value="{smokeFreeSincePretty}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" />
</DockPanel>
</Grid>
<Tapped>
<Set Target="SmokeDatePicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 2*">
<Text Value="Jeg slutter på grunn av:" Color="Black" FontSize="16" Margin="0" Alignment="VerticalCenter"
TextWrapping="Wrap" Dock="Left" />
<Text Value="{userData.quitSmokingReason.NameEn}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="CigReasonPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
</StackPanel>
</WhileTrue>
<WhileTrue Value="{userData.snus}">
<StackPanel Color="#fff" Margin="0, 0, 0, 40">
<Text Value="Mine vaner - Snus" Color="SluttaRed" FontSize="18" Margin="20, 15, 20, 15" />
<Rectangle Color="SluttaRed" Height="1" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 1*">
<Text Value="Antall snus daglig" Color="Black" FontSize="16" Margin="0" Alignment="VerticalCenter"
TextWrapping="Wrap" Dock="Left" />
<Text Value="{userData.dailySnus.NameEn}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="SnusDailyNumberPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 1*">
<Text Value="Pris per snus" Color="Black" FontSize="16" Margin="0" Alignment="VerticalCenter"
TextWrapping="Wrap" Dock="Left" />
<Text Value="{userData.pricePerSnus.NameEn}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="SnusPrisPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="2*, 1*">
<Text Value="Snusfri siden" Color="Black" FontSize="16" Margin="0"
Dock="Left" />
<DockPanel Dock="Right">
<Text Value="{snusFreeSincePretty}" Color="Gray" FontSize="16" Margin="0"
Dock="Right" />
</DockPanel>
</Grid>
<Tapped>
<Set Target="SnusDatePicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
<Rectangle Height="1" Color="#ddd" />
<DockPanel Margin="20, 15, 20, 15" HitTestMode="LocalBounds">
<Grid Columns="3*, 2*">
<Text Value="Jeg slutter på grunn av:"
TextWrapping="Wrap" Color="Black" FontSize="16"
Dock="Left"/>
<Text Value="{userData.quitSnusReason.NameEn}" Color="Gray" FontSize="16" Margin="0" Dock="Right"
Alignment="Right" TextAlignment="Right" />
</Grid>
<Tapped>
<Set Target="SnusReasonPicker.IsOpen" Value="true" />
</Tapped>
</DockPanel>
</StackPanel>
</WhileTrue>
<StackPanel Color="#fff" Margin="0, 0, 0, 40">
<Text Value="Bakgrunnsspeil" Color="SluttaRed" FontSize="18" Margin="20, 15, 20, 15" />
<Rectangle Color="SluttaRed" Height="1" />
<DockPanel Margin="20, 5, 20, 5">
<Grid Columns="4*, 1*">
<Text Value="Tillat bruk av kamera til bakgrunn" Color="Black" FontSize="16" Margin="0, 10, 0, 10"
Dock="Left" TextWrapping="Wrap" />
<DockPanel>
<MySwitch ux:Name="camerabackground" Dock="Right" Value="{userData.allowCameraBackground}" />
</DockPanel>
</Grid>
</DockPanel>
</StackPanel>
<StackPanel Color="#fff" Margin="0, 0, 0, 40">
<Text Value="Info" Color="SluttaRed" FontSize="18" Margin="20, 20, 20, 16" />
<Rectangle Color="SluttaRed" Height="1" />
<StackPanel Margin="10, 10, 10, 20">
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Ønsker du ikke å motta pushmeldinger lenger? Dette kan skrus av i telefonens innstillinger." />
<Text Color="Black" FontSize="16" Margin="10, 10, 10, 30" TextWrapping="Wrap"
Value="Husk at meldingene du får er ment å være motiverende. Vi anbefaler derfor at varsling er på." />
</StackPanel>
</StackPanel>
<StackPanel Color="#fff" Margin="0">
<Text Value="Personvern" Color="SluttaRed" FontSize="18" Margin="20, 20, 20, 16" />
<Rectangle Color="SluttaRed" Height="1" />
<StackPanel Margin="10, 10, 10, 20">
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="1.0 App-eier (dataeier):" />
<Text Color="Black" FontSize="16" Margin="10, 10, 10, 0" TextWrapping="Wrap"
Value="Helsedirektoratet" />
<Text Color="Black" FontSize="16" Margin="10, 00" TextWrapping="Wrap"
Value="Pb. 220 Skøyen" />
<Text Color="Black" FontSize="16" Margin="10, 00, 10, 10" TextWrapping="Wrap"
Value="0213 Oslo" />
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="2.0 Visualisering av dine sluttedata" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Slutta appen sin kjernefunksjonalitet baserer seg på brukerens innlasting av sluttedato samt antall røyk/snus og prisen av disse. På bakgrunn av disse dataene vil appen automatisk oppdatere antall dager røyk-/snusfri, antall kroner spart samt mengde giftstoffer man har unngått. I tillegg vil vi sende ut motiverende meldinger basert på hvor mange dager du har vært røyk-/snusfri." />
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="3.0 Informasjonskapsler " />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Som de fleste nettsider og apper har vi informasjonskapsler plassert i Slutta appen. Formålet med disse er å kunne gi en bedre brukeropplevelse basert på hvordan appen brukes. Vi sparer ikke på andre data enn det bruker selv har gitt (sluttedato). Det er ingen personlige data lagret i appen." />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="I tillegg benytter vi informasjonskapsler for å effektivisere annonseringen av appen, og måle hvor brukeren kommer fra." />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Våre data blir ikke delt med andre tredjepartsaktører utover det vi beskriver under." />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="For å analysere bruken av appen benytter vi oss av ulike analyseverktøy som beskrevet i punktene 3.1, 3.2 og 3.3." />
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="3.1 Firebase" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Vi benytter Firebase for å måle hvilke deler av appen som brukes. Vi bruker denne innsikten til å oppgradere appen for å gi brukeren et bedre slutteverktøy. " />
<Text ux:Name="firebaselink" Color="SluttaBlue" Font="Bold" FontSize="15" Margin="10, 5, 10, 10" TextWrapping="Wrap"
Value="www.firebase.com">
<WhilePressed>
<Change firebaselink.Color="SluttaLighterBlue" Duration="0.1" DurationBack="0.1" />
</WhilePressed>
<Clicked>
<LaunchUri Uri="http://www.firebase.com" />
</Clicked>
</Text>
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="3.2 Adform" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Adform er et annonsestyringsverktøy vi bruker for å promotere appen og som gir oss innsikt i hvor brukeren kommer fra." />
<Text ux:Name="adformlink" Color="SluttaBlue" Font="Bold" FontSize="15" Margin="10, 5, 10, 10" TextWrapping="Wrap"
Value="www.adform.com">
<WhilePressed>
<Change adformlink.Color="SluttaLighterBlue" Duration="0.1" DurationBack="0.1" />
</WhilePressed>
<Clicked>
<LaunchUri Uri="http://www.adform.com" />
</Clicked>
</Text>
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="3.3 Facebook analytics" />
<Text Color="Black" FontSize="16" Margin="10, 10" TextWrapping="Wrap"
Value="Vi promoterer appen gjennom Facebook. På samme måte som Adform gir Facebook analytics oss innsikt i bruken og nedlasting av appen." />
<Text ux:Name="fbprivacy" Color="SluttaBlue" Font="Bold" FontSize="15" Margin="10, 5, 10, 10" TextWrapping="Wrap"
Value="www.facebook.com/about/privacy/">
<WhilePressed>
<Change fbprivacy.Color="SluttaLighterBlue" Duration="0.1" DurationBack="0.1" />
</WhilePressed>
<Clicked>
<LaunchUri Uri="http://www.facebook.com/about/privacy/" />
</Clicked>
</Text>
<Rectangle Height="1" Color="#ddd" Margin="0, 10" />
<Text Color="Black" FontSize="16" Margin="10, 0" TextWrapping="Wrap"
Value="Har du spørsmål vedrørende personvern eller om denne appen vennligst ta kontakt ved å sende e-post til:" />
<Text ux:Name="kontaktslutta" Color="SluttaBlue" Font="Bold" FontSize="15" Margin="10, 5, 10, 10" TextWrapping="Wrap"
Value="kontaktslutta@helsedir.no">
<WhilePressed>
<Change kontaktslutta.Color="SluttaLighterBlue" Duration="0.1" DurationBack="0.1" />
</WhilePressed>
<Clicked>
<LaunchUri Uri="mailto:kontaktslutta@helsedir.no" />
</Clicked>
</Text>
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollView>
</DockPanel>
</Page>