Skip to content

Commit 7bc1ad2

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

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

src/components/TrackingConsent.vue

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
<template>
2-
<div
3-
class="tracking-consent nq-shadow"
2+
<div class="tracking-consent"
43
:class="[ theme, safariFix ]"
54
v-if="uiRequired && uiAllowed"
65
>
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>
6+
<div class="content nq-shadow">
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>
23+
</div>
2324
</div>
2425
</div>
2526
</template>
@@ -402,23 +403,28 @@ export default TrackingConsent;
402403
position: fixed;
403404
bottom: 2rem;
404405
z-index: 900;
406+
display: flex;
407+
justify-content: center;
408+
width: 100%;
409+
}
405410
406-
padding: 1.5rem;
407-
411+
.content {
408412
display: flex;
409413
align-items: center;
410414
justify-content: space-between;
411415
416+
padding: 1.5rem;
417+
412418
border-radius: 1rem;
413419
font-size: 2rem;
414420
}
415421
416-
.tracking-consent.light {
422+
.light .content {
417423
background: white;
418424
color: var(--nimiq-blue);
419425
}
420426
421-
.tracking-consent.dark {
427+
.dark .content {
422428
background: var(--nimiq-blue);
423429
color: white;
424430
}
@@ -433,16 +439,18 @@ export default TrackingConsent;
433439
}
434440
435441
@media (max-width: 860px) {
436-
.tracking-consent {
442+
.content {
437443
flex-direction: column;
438444
align-items: flex-start;
439-
width: 100%;
440-
bottom: 0;
441445
border-bottom-left-radius: 0;
442446
border-bottom-right-radius: 0;
443447
padding: 2.5rem;
444448
}
445449
450+
.tracking-consent {
451+
bottom: 0;
452+
}
453+
446454
.tracking-consent.ios-safari-13-fix {
447455
bottom: 74px;
448456
}

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:43
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:49
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:48
266266
msgid "Yes"
267267
msgstr ""
268268

0 commit comments

Comments
 (0)