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">
|
<router-link :to="{name: 'user.settings'}" class="dropdown-item">
|
||||||
Settings
|
Settings
|
||||||
</router-link>
|
</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">
|
<a @click="logout()" class="dropdown-item">
|
||||||
Logout
|
Logout
|
||||||
</a>
|
</a>
|
||||||
|
@ -404,6 +406,8 @@
|
||||||
},
|
},
|
||||||
currentList: CURRENT_LIST,
|
currentList: CURRENT_LIST,
|
||||||
background: 'background',
|
background: 'background',
|
||||||
|
imprintUrl: state => state.config.legal.imprintUrl,
|
||||||
|
privacyPolicyUrl: state => state.config.legal.privacyPolicyUrl,
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
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,
|
taskAttachmentsEnabled: true,
|
||||||
totpEnabled: true,
|
totpEnabled: true,
|
||||||
enabledBackgroundProviders: [],
|
enabledBackgroundProviders: [],
|
||||||
|
legal: {
|
||||||
|
imprintUrl: '',
|
||||||
|
privacyPolicyUrl: '',
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
mutations: {
|
mutations: {
|
||||||
[CONFIG](state, config) {
|
[CONFIG](state, config) {
|
||||||
|
@ -28,6 +32,8 @@ export default {
|
||||||
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
||||||
state.totpEnabled = config.totp_enabled
|
state.totpEnabled = config.totp_enabled
|
||||||
state.enabledBackgroundProviders = config.enabled_background_providers
|
state.enabledBackgroundProviders = config.enabled_background_providers
|
||||||
|
state.legal.imprintUrl = config.legal.imprint_url
|
||||||
|
state.legal.privacyPolicyUrl = config.legal.privacy_policy_url
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
@ -19,3 +19,4 @@
|
||||||
@import 'list-backgrounds';
|
@import 'list-backgrounds';
|
||||||
@import 'color-picker';
|
@import 'color-picker';
|
||||||
@import 'namespaces';
|
@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 }}
|
{{ errorMessage }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<legal/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -77,8 +78,12 @@
|
||||||
import {HTTP} from '../../http-common'
|
import {HTTP} from '../../http-common'
|
||||||
import message from '../../message'
|
import message from '../../message'
|
||||||
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
||||||
|
import legal from '../../components/misc/legal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
legal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
confirmedEmailSuccess: false,
|
confirmedEmailSuccess: false,
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
<legal/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -41,8 +42,12 @@
|
||||||
<script>
|
<script>
|
||||||
import PasswordResetModel from '../../models/passwordReset'
|
import PasswordResetModel from '../../models/passwordReset'
|
||||||
import PasswordResetService from '../../services/passwordReset'
|
import PasswordResetService from '../../services/passwordReset'
|
||||||
|
import Legal from '../../components/misc/legal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Legal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
passwordResetService: PasswordResetService,
|
passwordResetService: PasswordResetService,
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
{{ errorMessage }}
|
{{ errorMessage }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<legal/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -49,8 +50,12 @@
|
||||||
import router from '../../router'
|
import router from '../../router'
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
import {ERROR_MESSAGE, LOADING} from '../../store/mutation-types'
|
||||||
|
import Legal from '../../components/misc/legal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Legal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
credentials: {
|
credentials: {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
<router-link :to="{ name: 'user.login' }" class="button is-primary">Login</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
<legal/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -33,8 +34,12 @@
|
||||||
<script>
|
<script>
|
||||||
import PasswordResetModel from '../../models/passwordReset'
|
import PasswordResetModel from '../../models/passwordReset'
|
||||||
import PasswordResetService from '../../services/passwordReset'
|
import PasswordResetService from '../../services/passwordReset'
|
||||||
|
import Legal from '../../components/misc/legal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Legal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
passwordResetService: PasswordResetService,
|
passwordResetService: PasswordResetService,
|
||||||
|
|
Loading…
Reference in a new issue