From 6a42874eaceb26c2f53ea5419f5839294cce3764 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Mon, 30 Sep 2024 12:06:00 -0400 Subject: [PATCH] add following-feed page --- packages/frontend/src/navbar.ts | 5 + .../frontend/src/pages/following-feed.vue | 108 ++++++++++++++++++ packages/frontend/src/pages/timeline.vue | 8 ++ packages/frontend/src/router/definition.ts | 4 + 4 files changed, 125 insertions(+) create mode 100644 packages/frontend/src/pages/following-feed.vue diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts index ccd7034968..2d67a29a24 100644 --- a/packages/frontend/src/navbar.ts +++ b/packages/frontend/src/navbar.ts @@ -68,6 +68,11 @@ export const navbarItemDef = reactive({ lookup(); }, }, + following: { + title: i18n.ts.following, + icon: 'ti ti-user-check', + to: '/following-feed', + }, lists: { title: i18n.ts.lists, icon: 'ti ti-list', diff --git a/packages/frontend/src/pages/following-feed.vue b/packages/frontend/src/pages/following-feed.vue new file mode 100644 index 0000000000..45c1f67d23 --- /dev/null +++ b/packages/frontend/src/pages/following-feed.vue @@ -0,0 +1,108 @@ + + + + + + + + + diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 20d8abccf6..7dc63a887a 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -55,9 +55,12 @@ import { MenuItem } from '@/types/menu.js'; import { miLocalStorage } from '@/local-storage.js'; import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js'; import type { BasicTimelineType } from '@/timelines.js'; +import { useRouter } from '@/router/supplier.js'; provide('shouldOmitHeaderTitle', true); +const router = useRouter(); + const tlComponent = shallowRef>(); const rootEl = shallowRef(); @@ -309,6 +312,11 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList icon: basicTimelineIconClass(tl), iconOnly: true, })), { + icon: 'ti ti-user-check', + title: i18n.ts.following, + iconOnly: true, + onClick: () => router.push('/following-feed'), +}, { icon: 'ti ti-list', title: i18n.ts.lists, iconOnly: true, diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts index 14110d1f9b..6ebaa95cdc 100644 --- a/packages/frontend/src/router/definition.ts +++ b/packages/frontend/src/router/definition.ts @@ -227,6 +227,10 @@ const routes: RouteDef[] = [{ path: '/explore', component: page(() => import('@/pages/explore.vue')), hash: 'initialTab', +}, { + path: '/following-feed', + component: page(() => import('@/pages/following-feed.vue')), + hash: 'initialTab', }, { path: '/search', component: page(() => import('@/pages/search.vue')),