chore: simplify vuex state
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
f26feafee5
commit
8d1d80dec8
|
@ -35,6 +35,9 @@ export default {
|
|||
},
|
||||
},
|
||||
}),
|
||||
getters: {
|
||||
migratorsEnabled: state => state.availableMigrators !== null && state.availableMigrators.length > 0,
|
||||
},
|
||||
mutations: {
|
||||
[CONFIG](state, config) {
|
||||
state.version = config.version
|
||||
|
|
|
@ -63,11 +63,12 @@ export default {
|
|||
mounted() {
|
||||
this.setTitle(this.$t('user.settings.title'))
|
||||
},
|
||||
computed: mapState({
|
||||
totpEnabled: state => state.config.totpEnabled,
|
||||
migratorsEnabled: state => state.config.availableMigrators !== null && state.config.availableMigrators.length > 0,
|
||||
caldavEnabled: state => state.config.caldavEnabled,
|
||||
}),
|
||||
computed: {
|
||||
...mapState('config', ['totpEnabled', 'caldavEnabled']),
|
||||
migratorsEnabled() {
|
||||
return this.$store.getters['config/migratorsEnabled']
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Reference in New Issue