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 />
|
||||
<main>
|
||||
<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" />
|
||||
|
||||
<Selector />
|
||||
|
||||
<!-- TabPanel -->
|
||||
<section class="inspiration">
|
||||
<Header :inspiration="currentInspiration" />
|
||||
<div class="grid masonry">
|
||||
|
|
@ -70,11 +58,19 @@ const currentTab = ref("all");
|
|||
const tabs = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: "Les inspirations",
|
||||
label: "Les Inspirations",
|
||||
id: "all",
|
||||
count: currentInspiration.media.length,
|
||||
isActive: true,
|
||||
icon: null,
|
||||
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