diff options
| author | Ilja <ilja@ilja.space> | 2022-09-24 15:56:27 +0200 |
|---|---|---|
| committer | Ilja <ilja@ilja.space> | 2022-09-24 15:56:27 +0200 |
| commit | 5541d0ec298a9350c151c777886ec70c36856e2d (patch) | |
| tree | cc5104599805a307070b51c4bcd2b38c2985d93e /src/components/timeline_menu/timeline_menu.js | |
| parent | 650d195f44610b453f1a297499fd103b19e0a855 (diff) | |
| parent | 03b61f0a9cb09a47d2d9bc89c0a08c62b70c12e2 (diff) | |
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into fine_grained_moderation_privileges
Diffstat (limited to 'src/components/timeline_menu/timeline_menu.js')
| -rw-r--r-- | src/components/timeline_menu/timeline_menu.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index a11e7b7e..d74fbf4e 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -1,6 +1,8 @@ import Popover from '../popover/popover.vue' -import TimelineMenuContent from './timeline_menu_content.vue' +import NavigationEntry from 'src/components/navigation/navigation_entry.vue' +import { ListsMenuContent } from '../lists_menu/lists_menu_content.vue' import { library } from '@fortawesome/fontawesome-svg-core' +import { TIMELINES } from 'src/components/navigation/navigation.js' import { faChevronDown } from '@fortawesome/free-solid-svg-icons' @@ -22,11 +24,13 @@ export const timelineNames = () => { const TimelineMenu = { components: { Popover, - TimelineMenuContent + NavigationEntry, + ListsMenuContent }, data () { return { - isOpen: false + isOpen: false, + timelinesList: Object.entries(TIMELINES).map(([k, v]) => ({ ...v, name: k })) } }, created () { @@ -34,6 +38,12 @@ const TimelineMenu = { this.$store.dispatch('setLastTimeline', this.$route.name) } }, + computed: { + useListsMenu () { + const route = this.$route.name + return route === 'lists-timeline' + } + }, methods: { openMenu () { // $nextTick is too fast, animation won't play back but @@ -58,6 +68,9 @@ const TimelineMenu = { if (route === 'tag-timeline') { return '#' + this.$route.params.tag } + if (route === 'lists-timeline') { + return this.$store.getters.findListTitle(this.$route.params.id) + } const i18nkey = timelineNames()[this.$route.name] return i18nkey ? this.$t(i18nkey) : route } |
