✨ Site > Add projects selection
This commit is contained in:
@@ -23,6 +23,11 @@ export default
|
||||
projects()
|
||||
{
|
||||
return this.$store.state.projects
|
||||
},
|
||||
|
||||
project()
|
||||
{
|
||||
return this.$store.state.currentProject
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
{{ counter }}
|
||||
<connexion></connexion>
|
||||
<projects-hub></projects-hub>
|
||||
<div v-if="project">
|
||||
{{ project.name }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,5 +13,13 @@ export default
|
||||
created()
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
methods:
|
||||
{
|
||||
onProjectClick(projectSlug)
|
||||
{
|
||||
this.$store.commit('setCurrentProject', projectSlug)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<a :href="project.slug" v-for="project in projects">
|
||||
<a href="#" v-for="project in projects" @click.prevent="onProjectClick(project.slug)">
|
||||
{{ project.name }}
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user