Update Inspirations view: add Mes Favoris tab
This commit is contained in:
parent
ad70bbb40c
commit
6cb010c921
1 changed files with 11 additions and 15 deletions
|
|
@ -4,20 +4,8 @@
|
||||||
<Menu />
|
<Menu />
|
||||||
<main>
|
<main>
|
||||||
<h2 id="tabslist" class="sr-only">Inspirations</h2>
|
<h2 id="tabslist" class="sr-only">Inspirations</h2>
|
||||||
<!-- 2 Tabs:
|
|
||||||
label: "Les Inspirations", id: "inspirations", count: false
|
|
||||||
label: "Mes Favoris", id: "favorites", count: true
|
|
||||||
|
|
||||||
<template v-if="data">
|
|
||||||
<Tabs :projects="data.children" @update:currentTab="changeTab" />
|
|
||||||
<TabPanel :projects="data.children" :currentTab="currentTab" />
|
|
||||||
</template>
|
|
||||||
-->
|
|
||||||
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
|
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
|
||||||
|
|
||||||
<Selector />
|
<Selector />
|
||||||
|
|
||||||
<!-- TabPanel -->
|
|
||||||
<section class="inspiration">
|
<section class="inspiration">
|
||||||
<Header :inspiration="currentInspiration" />
|
<Header :inspiration="currentInspiration" />
|
||||||
<div class="grid masonry">
|
<div class="grid masonry">
|
||||||
|
|
@ -70,11 +58,19 @@ const currentTab = ref("all");
|
||||||
const tabs = computed(() => {
|
const tabs = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "Les inspirations",
|
label: "Les Inspirations",
|
||||||
id: "all",
|
id: "all",
|
||||||
count: currentInspiration.media.length,
|
icon: null,
|
||||||
isActive: true,
|
count: null,
|
||||||
|
isActive: currentTab.value === "all"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Mes Favoris",
|
||||||
|
id: "favorites",
|
||||||
|
icon: "favorite",
|
||||||
|
count: 6, // TODO: dynamiser (favorites.count)
|
||||||
|
isActive: currentTab.value === "favorites"
|
||||||
|
}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue