Skip to content

Commit

Permalink
TrackingConsent: now centered on the bottom of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
mraveux committed Jul 1, 2020
1 parent b8b48d8 commit 709a7a4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
63 changes: 35 additions & 28 deletions src/components/TrackingConsent.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<template>
<div
class="tracking-consent nq-shadow"
:class="[ theme, safariFix ]"
v-if="uiRequired && uiAllowed"
>
{{ text.main }}
<div class="button-group">
<button
class="nq-button-pill light-blue"
@click="allowUsageData"
>{{ text.yes }}</button>
<button
class="nq-button-s"
@click="denyConsent"
:class="{ inverse: theme === constructor.Themes.DARK }"
>{{ text.no }}</button>
<button
class="nq-button-s"
@click="allowBrowserData"
:class="{ inverse: theme === constructor.Themes.DARK }"
>{{ text.browserOnly }}</button>
<div class="tracking-consent">
<div
class="content nq-shadow"
:class="[ theme, safariFix ]"
v-if="uiRequired && uiAllowed"
>
{{ text.main }}
<div class="button-group">
<button
class="nq-button-pill light-blue"
@click="allowUsageData"
>{{ text.yes }}</button>
<button
class="nq-button-s"
@click="denyConsent"
:class="{ inverse: theme === constructor.Themes.DARK }"
>{{ text.no }}</button>
<button
class="nq-button-s"
@click="allowBrowserData"
:class="{ inverse: theme === constructor.Themes.DARK }"
>{{ text.browserOnly }}</button>
</div>
</div>
</div>
</template>
Expand Down Expand Up @@ -402,23 +404,28 @@ export default TrackingConsent;
position: fixed;
bottom: 2rem;
z-index: 900;
display: flex;
justify-content: center;
width: 100%;
}
padding: 1.5rem;
.content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem;
border-radius: 1rem;
font-size: 2rem;
}
.tracking-consent.light {
.content.light {
background: white;
color: var(--nimiq-blue);
}
.tracking-consent.dark {
.content.dark {
background: var(--nimiq-blue);
color: white;
}
Expand All @@ -433,7 +440,7 @@ export default TrackingConsent;
}
@media (max-width: 860px) {
.tracking-consent {
.content {
flex-direction: column;
align-items: flex-start;
width: 100%;
Expand All @@ -443,11 +450,11 @@ export default TrackingConsent;
padding: 2.5rem;
}
.tracking-consent.ios-safari-13-fix {
.content.ios-safari-13-fix {
bottom: 74px;
}
.tracking-consent.ios-safari-12-fix {
.content.ios-safari-12-fix {
bottom: 34px;
}
Expand Down
6 changes: 3 additions & 3 deletions src/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ msgstr ""
msgid "Grant camera access when asked."
msgstr ""

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

Expand Down Expand Up @@ -161,7 +161,7 @@ msgstr ""
msgid "Nimiq provides this service free of charge."
msgstr ""

#: src/components/TrackingConsent.vue:48
#: src/components/TrackingConsent.vue:50
msgid "No"
msgstr ""

Expand Down Expand Up @@ -262,7 +262,7 @@ msgstr ""
msgid "Vendor crypto markup"
msgstr ""

#: src/components/TrackingConsent.vue:47
#: src/components/TrackingConsent.vue:49
msgid "Yes"
msgstr ""

Expand Down

0 comments on commit 709a7a4

Please sign in to comment.