You've already forked AstralRinth
forked from didirus/AstralRinth
Fix issues with privacy settings
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
<SettingsIcon />
|
||||
Settings
|
||||
</nuxt-link>
|
||||
<nuxt-link :to="'/dashboard/privacy'" class="tab last">
|
||||
<SettingsIcon />
|
||||
Privacy Settings
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<div v-else class="card page-nav">
|
||||
<a :href="authUrl" class="tab last">
|
||||
|
||||
@@ -47,20 +47,25 @@
|
||||
import scopes from '@/privacy-toggles'
|
||||
export default {
|
||||
name: 'Privacy',
|
||||
data: () => {
|
||||
const settings = scopes.settings
|
||||
return {
|
||||
scopes: settings,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
fetch() {
|
||||
Object.keys(scopes.settings).forEach((key) => {
|
||||
scopes.settings[key].value = scopes.settings[key].default
|
||||
})
|
||||
|
||||
this.$store.dispatch('consent/loadFromCookies', this.$cookies)
|
||||
|
||||
// Load the allowed scopes from the store
|
||||
this.$store.state.consent.scopes_allowed.forEach((scope) => {
|
||||
if (this.scopes[scope] != null)
|
||||
this.$set(this.scopes[scope], 'value', true)
|
||||
})
|
||||
},
|
||||
data: () => {
|
||||
const settings = scopes.settings
|
||||
return {
|
||||
scopes: settings,
|
||||
}
|
||||
},
|
||||
options: {
|
||||
auth: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user