Skip to content

Commit 709a7a4

Browse files
committed
TrackingConsent: now centered on the bottom of the page
1 parent b8b48d8 commit 709a7a4

File tree

2 files changed

+38
-31
lines changed

2 files changed

+38
-31
lines changed

src/components/TrackingConsent.vue

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
<template>
2-
<div
3-
class="tracking-consent nq-shadow"
4-
:class="[ theme, safariFix ]"
5-
v-if="uiRequired && uiAllowed"
6-
>
7-
{{ text.main }}
8-
<div class="button-group">
9-
<button
10-
class="nq-button-pill light-blue"
11-
@click="allowUsageData"
12-
>{{ text.yes }}</button>
13-
<button
14-
class="nq-button-s"
15-
@click="denyConsent"
16-
:class="{ inverse: theme === constructor.Themes.DARK }"
17-
>{{ text.no }}</button>
18-
<button
19-
class="nq-button-s"
20-
@click="allowBrowserData"
21-
:class="{ inverse: theme === constructor.Themes.DARK }"
22-
>{{ text.browserOnly }}</button>
2+
<div class="tracking-consent">
3+
<div
4+
class="content nq-shadow"
5+
:class="[ theme, safariFix ]"
6+
v-if="uiRequired && uiAllowed"
7+
>
8+
{{ text.main }}
9+
<div class="button-group">
10+
<button
11+
class="nq-button-pill light-blue"
12+
@click="allowUsageData"
13+
>{{ text.yes }}</button>
14+
<button
15+
class="nq-button-s"
16+
@click="denyConsent"
17+
:class="{ inverse: theme === constructor.Themes.DARK }"
18+
>{{ text.no }}</button>
19+
<button
20+
class="nq-button-s"
21+
@click="allowBrowserData"
22+
:class="{ inverse: theme === constructor.Themes.DARK }"
23+
>{{ text.browserOnly }}</button>
24+
</div>
2325
</div>
2426
</div>
2527
</template>
@@ -402,23 +404,28 @@ export default TrackingConsent;
402404
position: fixed;
403405
bottom: 2rem;
404406
z-index: 900;
407+
display: flex;
408+
justify-content: center;
409+
width: 100%;
410+
}
405411
406-
padding: 1.5rem;
407-
412+
.content {
408413
display: flex;
409414
align-items: center;
410415
justify-content: space-between;
411416
417+
padding: 1.5rem;
418+
412419
border-radius: 1rem;
413420
font-size: 2rem;
414421
}
415422
416-
.tracking-consent.light {
423+
.content.light {
417424
background: white;
418425
color: var(--nimiq-blue);
419426
}
420427
421-
.tracking-consent.dark {
428+
.content.dark {
422429
background: var(--nimiq-blue);
423430
color: white;
424431
}
@@ -433,7 +440,7 @@ export default TrackingConsent;
433440
}
434441
435442
@media (max-width: 860px) {
436-
.tracking-consent {
443+
.content {
437444
flex-direction: column;
438445
align-items: flex-start;
439446
width: 100%;
@@ -443,11 +450,11 @@ export default TrackingConsent;
443450
padding: 2.5rem;
444451
}
445452
446-
.tracking-consent.ios-safari-13-fix {
453+
.content.ios-safari-13-fix {
447454
bottom: 74px;
448455
}
449456
450-
.tracking-consent.ios-safari-12-fix {
457+
.content.ios-safari-12-fix {
451458
bottom: 34px;
452459
}
453460

src/i18n/en.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ msgstr ""
103103
msgid "Grant camera access when asked."
104104
msgstr ""
105105

106-
#: src/components/TrackingConsent.vue:42
106+
#: src/components/TrackingConsent.vue:44
107107
msgid "Help Nimiq improve by sharing anonymized usage data. Thank you! ❤️"
108108
msgstr ""
109109

@@ -161,7 +161,7 @@ msgstr ""
161161
msgid "Nimiq provides this service free of charge."
162162
msgstr ""
163163

164-
#: src/components/TrackingConsent.vue:48
164+
#: src/components/TrackingConsent.vue:50
165165
msgid "No"
166166
msgstr ""
167167

@@ -262,7 +262,7 @@ msgstr ""
262262
msgid "Vendor crypto markup"
263263
msgstr ""
264264

265-
#: src/components/TrackingConsent.vue:47
265+
#: src/components/TrackingConsent.vue:49
266266
msgid "Yes"
267267
msgstr ""
268268

0 commit comments

Comments
 (0)