🐛 Site > Fix reseting project

This commit is contained in:
brunosimon
2017-08-15 00:04:16 +02:00
parent 3aacc7fcc1
commit 4cad89ae9d
14 changed files with 24 additions and 19 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
Discussions
</header>
<div class="messages">
<div class="message" v-for="message of messages" :key="message.id">
<div class="message" v-for="message of messages" :key="message.date">
<div class="date">
{{ message.time }}
</div>
+1 -1
View File
@@ -17,7 +17,7 @@ export default
{
project()
{
return this.$store.state.projects.all
return this.$store.state.projects.current
},
file()
+1 -1
View File
@@ -1,6 +1,6 @@
export default
{
name: 'projects-hub',
name: 'projects',
computed:
{
+1 -1
View File
@@ -1,5 +1,5 @@
<div>
<a href="#" v-for="project in projects" @click.prevent="onProjectClick(project.slug)">
<a href="#" v-for="project in projects" :key="project.slug" @click.prevent="onProjectClick(project.slug)">
{{ project.name }}
</a>
</div>
+2 -2
View File
@@ -15,7 +15,7 @@ export default {
if(state.current)
{
// Current project has been removed
if(typeof state.all[data] === 'undefined')
if(typeof state.all[state.current.slug] === 'undefined')
{
state.current = null
}
@@ -46,6 +46,6 @@ export default {
{
state.current = state.all[data]
}
},
}
}
}