Skip to content
Snippets Groups Projects
Unverified Commit b6a8080e authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Show the setup page if no accounts are configured

parent fbb14af2
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ export default {
created() {
const accounts = this.$store.getters.getAccounts()
if (this.$route.name === 'home' && accounts.length > 0) {
if (this.$route.name === 'home' && accounts.length > 1) {
// Show first account
let firstAccount = accounts[0]
// FIXME: this assumes that there's at least one folder
......@@ -49,6 +49,11 @@ export default {
folderId: firstFolder.id,
},
})
} else if (this.$route.name === 'home' && accounts.length === 1) {
// The only account we have is the unified one -> show the setup page
this.$router.replace({
name: 'setup',
})
} else if (this.$route.name === 'mailto') {
if (accounts.length === 0) {
console.error('cannot handle mailto:, no accounts configured')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment