Merge branch 'restore-routes' into 'develop'

Restore old routes, enable user route as fallback.

See merge request pleroma/pleroma-fe!440
This commit is contained in:
lambda 2018-12-29 13:27:59 +00:00
commit 1555a5fef3
18 changed files with 58 additions and 62 deletions

View file

@ -22,7 +22,7 @@ const chatPanel = {
this.collapsed = !this.collapsed
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
}
}
}

View file

@ -32,7 +32,7 @@ const LoginForm = {
.then((result) => {
this.$store.commit('setToken', result.access_token)
this.$store.dispatch('loginUser', result.access_token)
this.$router.push('/~/main/friends')
this.$router.push({name: 'friends'})
})
})
}

View file

@ -23,7 +23,7 @@ const Notification = {
this.userExpanded = !this.userExpanded
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
}
},
computed: {

View file

@ -11,7 +11,7 @@ const oac = {
}).then((result) => {
this.$store.commit('setToken', result.access_token)
this.$store.dispatch('loginUser', result.access_token)
this.$router.push('/~/main/friends')
this.$router.push({name: 'friends'})
})
}
}

View file

@ -28,7 +28,7 @@ const registration = {
},
created () {
if ((!this.registrationOpen && !this.token) || this.signedIn) {
this.$router.push('/~/main/all')
this.$router.push({name: 'root'})
}
this.setCaptcha()
@ -58,7 +58,7 @@ const registration = {
if (!this.$v.$invalid) {
try {
await this.signUp(this.user)
this.$router.push('/~/main/friends')
this.$router.push({name: 'friends'})
} catch (error) {
console.warn('Registration failed: ' + error)
}

View file

@ -291,7 +291,7 @@ const Status = {
this.showPreview = false
},
userProfileLink (id, name) {
return generateProfileLink(id, name)
return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames)
}
},
watch: {

View file

@ -33,7 +33,7 @@ const UserCard = {
this.$store.dispatch('removeFollowRequest', this.user)
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
}
}
}

View file

@ -180,7 +180,7 @@ export default {
}
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
}
}
}

View file

@ -257,7 +257,7 @@ const UserSettings = {
.then((res) => {
if (res.status === 'success') {
this.$store.dispatch('logout')
this.$router.push('/~/main/all')
this.$router.push({name: 'root'})
} else {
this.deleteAccountError = res.error
}

View file

@ -62,7 +62,7 @@ const WhoToFollowPanel = {
},
methods: {
userProfileLink (id, name) {
return generateProfileLink(id, name)
return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames)
}
},
watch: {