-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP(privacy): mobile layout, add modal
- Loading branch information
Showing
6 changed files
with
164 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,72 @@ | ||
<template> | ||
<div class="d-flex align-items-center justify-content-between py-3 px-4"> | ||
<div class="banner d-flex align-items-center justify-content-between py-3 px-4"> | ||
<p | ||
class="mr-3 mb-0" | ||
v-html="$t('privacyOverview')" | ||
v-html="$t('privacyOverview') + ' ' + $t('learnMorePrivacy')" | ||
> | ||
</p> | ||
<div class="d-flex flex-column justify-content-around text-center ml-3"> | ||
<div class="navigation d-flex flex-column justify-content-around text-center ml-2"> | ||
<button class="btn btn-primary mb-2"> | ||
{{ $t('acceptAllCookies') }} | ||
</button> | ||
<button class="btn btn-secondary mb-2"> | ||
{{ $t('denyNonEssentialCookies') }} | ||
</button> | ||
<a>{{ $t('managePrivacyPreferences') }}</a> | ||
<a | ||
v-if="isStaticPage" | ||
@click="showPrivacyModal" | ||
> | ||
{{ $t('managePrivacyPreferences') }} | ||
</a> | ||
<router-link | ||
v-else | ||
to="/user/settings/siteData" | ||
> | ||
{{ $t('managePrivacyPreferences') }} | ||
</router-link> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
button { | ||
min-width: 40px; | ||
width: 558px; | ||
} | ||
a, p { | ||
line-height: 1.714; | ||
} | ||
@media only screen and (max-width: 992px) { | ||
.banner { | ||
flex-direction: column !important; | ||
.navigation { | ||
margin-left: 0px !important; | ||
} | ||
button { | ||
width: calc(100vw - 48px); | ||
} | ||
p { | ||
margin-bottom: 16px !important; | ||
} | ||
} | ||
} | ||
</style> | ||
|
||
<script> | ||
export default { | ||
computed: { | ||
isStaticPage () { | ||
return this.$route.meta.requiresLogin === false; | ||
}, | ||
}, | ||
methods: { | ||
showPrivacyModal () { | ||
this.$root.$emit('bv::show::modal', 'privacy-preferences'); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<template> | ||
<b-modal | ||
id="privacy-preferences" | ||
size="md" | ||
:hide-footer="true" | ||
:hide-header="true" | ||
> | ||
<close-x | ||
@close="close()" | ||
/> | ||
<h1 class="purple-200 mb-3"> | ||
{{ $t('yourPrivacyPreferences') }} | ||
</h1> | ||
<p> | ||
{{ $t('privacySettingsOverview') }} | ||
</p> | ||
<div class="mb-4"> | ||
<div | ||
class="d-flex justify-content-between align-items-center mb-1" | ||
> | ||
<label class="mb-0"> | ||
{{ $t('performanceAnalytics') }} | ||
</label> | ||
<toggle-switch /> | ||
</div> | ||
<small> | ||
{{ $t('usedForSupport') }} | ||
</small> | ||
</div> | ||
<div class="mt-1 mb-4"> | ||
<div | ||
class="d-flex justify-content-between align-items-center mb-1" | ||
> | ||
<label class="mb-0"> | ||
{{ $t('strictlyNecessary') }} | ||
</label> | ||
<toggle-switch /> | ||
</div> | ||
<small> | ||
{{ $t('requiredToRun') }} | ||
</small> | ||
</div> | ||
<div class="d-flex flex-column text-center"> | ||
<button class="btn btn-primary mb-2"> | ||
{{ $t('acceptAllCookies') }} | ||
</button> | ||
<button class="btn btn-secondary mb-2"> | ||
{{ $t('denyNonEssentialCookies') }} | ||
</button> | ||
<button class="btn btn-secondary mb-3"> | ||
{{ $t('savePreferences') }} | ||
</button> | ||
<a> | ||
{{ $t('habiticaPrivacyPolicy') }} | ||
</a> | ||
</div> | ||
</b-modal> | ||
</template> | ||
|
||
<style lang="scss"> | ||
#privacy-preferences { | ||
.modal-body { | ||
padding: 24px; | ||
} | ||
.modal-content { | ||
width: 448px; | ||
} | ||
} | ||
</style> | ||
|
||
<style lang="scss" scoped> | ||
label { | ||
font-weight: 700; | ||
} | ||
label, p { | ||
line-height: 1.714; | ||
} | ||
</style> | ||
|
||
<script> | ||
import closeX from '@/components/ui/closeX'; | ||
import ToggleSwitch from '@/components/ui/toggleSwitch.vue'; | ||
export default { | ||
components: { | ||
closeX, | ||
ToggleSwitch, | ||
}, | ||
methods: { | ||
close () { | ||
this.$root.$emit('bv::hide::modal', 'privacy-preferences'); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters