Show legal links from api if configured
This commit is contained in:
parent
8ab9824f96
commit
0be280aae3
9 changed files with 56 additions and 0 deletions
|
@ -60,6 +60,8 @@
|
|||
<router-link :to="{name: 'user.settings'}" class="dropdown-item">
|
||||
Settings
|
||||
</router-link>
|
||||
<a :href="imprintUrl" v-if="imprintUrl" class="dropdown-item" target="_blank">Imprint</a>
|
||||
<a :href="privacyPolicyUrl" v-if="privacyPolicyUrl" class="dropdown-item" target="_blank">Privacy policy</a>
|
||||
<a @click="logout()" class="dropdown-item">
|
||||
Logout
|
||||
</a>
|
||||
|
@ -404,6 +406,8 @@
|
|||
},
|
||||
currentList: CURRENT_LIST,
|
||||
background: 'background',
|
||||
imprintUrl: state => state.config.legal.imprintUrl,
|
||||
privacyPolicyUrl: state => state.config.legal.privacyPolicyUrl,
|
||||
}),
|
||||
methods: {
|
||||
logout() {
|
||||
|
|
19
src/components/misc/legal.vue
Normal file
19
src/components/misc/legal.vue
Normal file
|
@ -0,0 +1,19 @@
|
|||
<template>
|
||||
<div class="legal-links">
|
||||
<a :href="imprintUrl" v-if="imprintUrl" target="_blank">Imprint</a>
|
||||
<span v-if="imprintUrl && privacyPolicyUrl"> | </span>
|
||||
<a :href="privacyPolicyUrl" v-if="privacyPolicyUrl" target="_blank">Privacy policy</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'legal',
|
||||
computed: mapState({
|
||||
imprintUrl: state => state.config.legal.imprintUrl,
|
||||
privacyPolicyUrl: state => state.config.legal.privacyPolicyUrl,
|
||||
})
|
||||
}
|
||||
</script>
|
|
@ -15,6 +15,10 @@ export default {
|
|||
taskAttachmentsEnabled: true,
|
||||
totpEnabled: true,
|
||||
enabledBackgroundProviders: [],
|
||||
legal: {
|
||||
imprintUrl: '',
|
||||
privacyPolicyUrl: '',
|
||||
}
|
||||
}),
|
||||
mutations: {
|
||||
[CONFIG](state, config) {
|
||||
|
@ -28,6 +32,8 @@ export default {
|
|||
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
||||
state.totpEnabled = config.totp_enabled
|
||||
state.enabledBackgroundProviders = config.enabled_background_providers
|
||||
state.legal.imprintUrl = config.legal.imprint_url
|
||||
state.legal.privacyPolicyUrl = config.legal.privacy_policy_url
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
|
|
@ -19,3 +19,4 @@
|
|||
@import 'list-backgrounds';
|
||||
@import 'color-picker';
|
||||
@import 'namespaces';
|
||||
@import 'legal';
|
||||
|
|
6
src/styles/components/legal.scss
Normal file
6
src/styles/components/legal.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.legal-links {
|
||||
margin-top: 1rem;
|
||||
text-align: right;
|
||||
color: $grey-light;
|
||||
font-size: 1rem;
|
||||
}
|
|
@ -66,6 +66,7 @@
|
|||
{{ errorMessage }}
|
||||
</div>
|
||||
</form>
|
||||
<legal/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -77,8 +78,12 @@
|
|||
import {HTTP} from '../../http-common'
|
||||
import message from '../../message'
|
||||
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
||||
import legal from '../../components/misc/legal'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
legal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
confirmedEmailSuccess: false,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
</div>
|
||||
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
||||
</div>
|
||||
<legal/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -41,8 +42,12 @@
|
|||
<script>
|
||||
import PasswordResetModel from '../../models/passwordReset'
|
||||
import PasswordResetService from '../../services/passwordReset'
|
||||
import Legal from '../../components/misc/legal'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Legal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
passwordResetService: PasswordResetService,
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
{{ errorMessage }}
|
||||
</div>
|
||||
</form>
|
||||
<legal/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -49,8 +50,12 @@
|
|||
import router from '../../router'
|
||||
import {mapState} from 'vuex'
|
||||
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
||||
import Legal from '../../components/misc/legal'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Legal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
credentials: {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
</div>
|
||||
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
||||
</div>
|
||||
<legal/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -33,8 +34,12 @@
|
|||
<script>
|
||||
import PasswordResetModel from '../../models/passwordReset'
|
||||
import PasswordResetService from '../../services/passwordReset'
|
||||
import Legal from '../../components/misc/legal'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Legal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
passwordResetService: PasswordResetService,
|
||||
|
|
Loading…
Reference in a new issue