merge develop, fix conflicts, fix logged out bug

This commit is contained in:
shpuld 2018-12-29 16:25:45 +02:00
commit 16c7bd0199
19 changed files with 61 additions and 65 deletions

View file

@ -23,7 +23,7 @@ const chatPanel = {
this.collapsed = !this.collapsed
},
userProfileLink (user) {
return generateProfileLink(user.id, user.username)
return generateProfileLink(user.id, user.username, 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

@ -20,7 +20,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

@ -8,7 +8,7 @@
@touchmove="touchMove"
>
<div class="side-drawer-heading" @click="toggleDrawer">
<user-card-content :user="currentUser" :switcher="false" :hideBio="true">
<user-card-content :user="currentUser" :switcher="false" :hideBio="true" v-if="currentUser">
</user-card-content>
</div>
<ul>

View file

@ -290,7 +290,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: {