2020-04-17 22:46:50 +02:00
|
|
|
<template>
|
2021-10-26 22:58:02 +02:00
|
|
|
<div class="content-widescreen">
|
|
|
|
<div class="user-settings">
|
|
|
|
<nav class="navigation">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.general'}">
|
|
|
|
{{ $t('user.settings.general.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.password-update'}">
|
|
|
|
{{ $t('user.settings.newPasswordTitle') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.email-update'}">
|
|
|
|
{{ $t('user.settings.updateEmailTitle') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.avatar'}">
|
|
|
|
{{ $t('user.settings.avatar.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li v-if="totpEnabled">
|
|
|
|
<router-link :to="{name: 'user.settings.totp'}">
|
|
|
|
{{ $t('user.settings.totp.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.data-export'}">
|
|
|
|
{{ $t('user.export.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li v-if="migratorsEnabled">
|
|
|
|
<router-link :to="{name: 'migrate.start'}">
|
|
|
|
{{ $t('migrate.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li v-if="caldavEnabled">
|
|
|
|
<router-link :to="{name: 'user.settings.caldav'}">
|
|
|
|
{{ $t('user.settings.caldav.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<router-link :to="{name: 'user.settings.deletion'}">
|
|
|
|
{{ $t('user.deletion.title') }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<section class="view">
|
|
|
|
<router-view/>
|
|
|
|
</section>
|
|
|
|
</div>
|
2020-04-17 22:46:50 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-05 22:35:52 +02:00
|
|
|
import {mapState} from 'vuex'
|
2020-05-29 18:49:50 +02:00
|
|
|
|
2020-09-05 22:35:52 +02:00
|
|
|
export default {
|
|
|
|
name: 'Settings',
|
|
|
|
mounted() {
|
2021-06-24 01:24:57 +02:00
|
|
|
this.setTitle(this.$t('user.settings.title'))
|
2020-09-05 22:35:52 +02:00
|
|
|
},
|
2021-01-15 20:56:51 +01:00
|
|
|
computed: {
|
2021-10-26 22:58:02 +02:00
|
|
|
...mapState('config', ['totpEnabled', 'caldavEnabled']),
|
|
|
|
migratorsEnabled() {
|
|
|
|
return this.$store.getters['config/migratorsEnabled']
|
2021-10-02 23:30:06 +02:00
|
|
|
},
|
2021-01-15 20:56:51 +01:00
|
|
|
},
|
2021-10-26 22:58:02 +02:00
|
|
|
}
|
|
|
|
</script>
|
2020-09-05 22:35:52 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.user-settings {
|
|
|
|
display: flex;
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
.navigation {
|
|
|
|
width: 25%;
|
|
|
|
padding-right: 1rem;
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
a {
|
|
|
|
display: block;
|
|
|
|
padding: .5rem;
|
|
|
|
color: $dark;
|
|
|
|
width: 100%;
|
|
|
|
border-left: 3px solid transparent;
|
2020-09-05 22:35:52 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
&:hover, &.router-link-active {
|
|
|
|
background: $white;
|
|
|
|
border-color: $primary;
|
2021-10-11 19:37:20 +02:00
|
|
|
}
|
2021-10-26 22:58:02 +02:00
|
|
|
}
|
|
|
|
}
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
.view {
|
|
|
|
width: 75%;
|
|
|
|
}
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
@media screen and (max-width: $tablet) {
|
|
|
|
flex-direction: column;
|
2021-01-30 21:45:54 +01:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
.navigation, .view {
|
|
|
|
width: 100%;
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2021-10-26 22:58:02 +02:00
|
|
|
.view {
|
|
|
|
padding-top: 1rem;
|
|
|
|
}
|
|
|
|
}
|
2020-09-05 22:35:52 +02:00
|
|
|
}
|
2021-10-26 22:58:02 +02:00
|
|
|
</style>
|