Back did not work on flat details page sometimes

Closes issue #13.
This commit is contained in:
Lucas Verney 2017-04-26 18:51:13 +02:00
parent 5f47b0ff65
commit 533638e16d
2 changed files with 3 additions and 10 deletions

View File

@ -10,6 +10,7 @@ Vue.use(VueRouter)
export default new VueRouter({
routes: [
{ path: '/', component: Home, name: 'home' },
{ path: '/new', redirect: '/' },
{ path: '/followed', component: Status, name: 'followed' },
{ path: '/ignored', component: Status, name: 'ignored' },
{ path: '/user_deleted', component: Status, name: 'user_deleted' },

View File

@ -3,9 +3,9 @@
<div class="grid" v-if="flat && timeToPlaces">
<div class="left-panel">
<h2>
<a v-on:click="goBack" class="link">
<router-link :to="'/' + flat.status">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
</router-link>
({{ flat.status ? capitalize(flat.status) : '' }}) {{ flat.title }} [{{ flat.id.split("@")[1] }}]
</h2>
<div class="grid">
@ -211,10 +211,6 @@ export default {
this.$store.dispatch('getAllTimeToPlaces')
},
goBack () {
return this.$router.go(-1)
},
updateFlatStatus (status) {
this.$store.dispatch('updateFlatStatus', { flatId: this.$route.params.id, newStatus: status })
},
@ -253,10 +249,6 @@ nav ul {
padding-left: 1em;
}
.link {
cursor: pointer;
}
.right-panel li {
margin-bottom: 1em;
margin-top: 1em;