aboutsummaryrefslogtreecommitdiff
path: root/src/components/lists_menu
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/lists_menu')
-rw-r--r--src/components/lists_menu/lists_menu_content.js29
-rw-r--r--src/components/lists_menu/lists_menu_content.vue17
2 files changed, 15 insertions, 31 deletions
diff --git a/src/components/lists_menu/lists_menu_content.js b/src/components/lists_menu/lists_menu_content.js
index 37e7868c..97b32210 100644
--- a/src/components/lists_menu/lists_menu_content.js
+++ b/src/components/lists_menu/lists_menu_content.js
@@ -1,28 +1,17 @@
import { mapState } from 'vuex'
-import { library } from '@fortawesome/fontawesome-svg-core'
-import {
- faUsers,
- faGlobe,
- faBookmark,
- faEnvelope,
- faHome
-} from '@fortawesome/free-solid-svg-icons'
+import NavigationEntry from 'src/components/navigation/navigation_entry.vue'
+import { getListEntries } from 'src/components/navigation/filter.js'
-library.add(
- faUsers,
- faGlobe,
- faBookmark,
- faEnvelope,
- faHome
-)
-
-const ListsMenuContent = {
- created () {
- this.$store.dispatch('startFetchingLists')
+export const ListsMenuContent = {
+ props: [
+ 'showPin'
+ ],
+ components: {
+ NavigationEntry
},
computed: {
...mapState({
- lists: state => state.lists.allLists,
+ lists: getListEntries,
currentUser: state => state.users.currentUser,
privateMode: state => state.instance.private,
federating: state => state.instance.federating
diff --git a/src/components/lists_menu/lists_menu_content.vue b/src/components/lists_menu/lists_menu_content.vue
index e910d6eb..f93e80c9 100644
--- a/src/components/lists_menu/lists_menu_content.vue
+++ b/src/components/lists_menu/lists_menu_content.vue
@@ -1,16 +1,11 @@
<template>
<ul>
- <li
- v-for="list in lists.slice().reverse()"
- :key="list.id"
- >
- <router-link
- class="menu-item"
- :to="{ name: 'lists-timeline', params: { id: list.id } }"
- >
- {{ list.title }}
- </router-link>
- </li>
+ <NavigationEntry
+ v-for="item in lists"
+ :key="item.name"
+ :show-pin="showPin"
+ :item="item"
+ />
</ul>
</template>