diff options
| author | Sean King <seanking2919@protonmail.com> | 2022-08-22 19:08:58 -0600 |
|---|---|---|
| committer | Sean King <seanking2919@protonmail.com> | 2022-08-22 19:08:58 -0600 |
| commit | ee58e3868c2d58b889d8a32c1b6dfd3732df7584 (patch) | |
| tree | da8f8783734740df18cb5c1082d4756bfcf47489 /src/components/nav_panel | |
| parent | 325930eecb4943bb50344159646a7c62b4bf10b3 (diff) | |
| parent | cb6b96b9ba4e71310e823aecc4bb8c22d370397a (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into add/edit-status
Diffstat (limited to 'src/components/nav_panel')
| -rw-r--r-- | src/components/nav_panel/nav_panel.js | 19 | ||||
| -rw-r--r-- | src/components/nav_panel/nav_panel.vue | 45 |
2 files changed, 60 insertions, 4 deletions
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index 37bcb409..abeff6bf 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,4 +1,5 @@ import TimelineMenuContent from '../timeline_menu/timeline_menu_content.vue' +import ListsMenuContent from '../lists_menu/lists_menu_content.vue' import { mapState, mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' @@ -12,7 +13,8 @@ import { faComments, faBell, faInfoCircle, - faStream + faStream, + faList } from '@fortawesome/free-solid-svg-icons' library.add( @@ -25,7 +27,8 @@ library.add( faComments, faBell, faInfoCircle, - faStream + faStream, + faList ) const NavPanel = { @@ -35,19 +38,27 @@ const NavPanel = { } }, components: { - TimelineMenuContent + TimelineMenuContent, + ListsMenuContent }, data () { return { - showTimelines: false + showTimelines: false, + showLists: false } }, methods: { toggleTimelines () { this.showTimelines = !this.showTimelines + }, + toggleLists () { + this.showLists = !this.showLists } }, computed: { + listsNavigation () { + return this.$store.getters.mergedConfig.listsNavigation + }, ...mapState({ currentUser: state => state.users.currentUser, followRequestCount: state => state.api.followRequests.length, diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index 3fd27d89..9322e233 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -25,6 +25,51 @@ <TimelineMenuContent class="timelines" /> </div> </li> + <li v-if="currentUser && listsNavigation"> + <button + class="button-unstyled menu-item" + @click="toggleLists" + > + <router-link + :to="{ name: 'lists' }" + @click.stop + > + <FAIcon + fixed-width + class="fa-scale-110" + icon="list" + />{{ $t("nav.lists") }} + </router-link> + <FAIcon + class="timelines-chevron" + fixed-width + :icon="showLists ? 'chevron-up' : 'chevron-down'" + /> + </button> + <div + v-show="showLists" + class="timelines-background" + > + <ListsMenuContent class="timelines" /> + </div> + </li> + <li v-if="currentUser && !listsNavigation"> + <router-link + :to="{ name: 'lists' }" + @click.stop + > + <button + class="button-unstyled menu-item" + @click="toggleLists" + > + <FAIcon + fixed-width + class="fa-scale-110" + icon="list" + />{{ $t("nav.lists") }} + </button> + </router-link> + </li> <li v-if="currentUser"> <router-link class="menu-item" |
