commit
1e3a4e35c1
|
@ -4,6 +4,7 @@
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
"local": "Local",
|
"local": "Local",
|
||||||
"public": "Public",
|
"public": "Public",
|
||||||
|
"favourites": "Favourites",
|
||||||
"bookmarks": "Bookmarks",
|
"bookmarks": "Bookmarks",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"status": {
|
"status": {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import generator, { Entity } from 'megalodon'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useHotkeys } from 'react-hotkeys-hook'
|
import { useHotkeys } from 'react-hotkeys-hook'
|
||||||
import { FaBell, FaBookmark, FaGlobe, FaHouse, FaList, FaUsers } from 'react-icons/fa6'
|
import { FaBell, FaBookmark, FaGlobe, FaHouse, FaList, FaStar, FaUsers } from 'react-icons/fa6'
|
||||||
import { useIntl } from 'react-intl'
|
import { useIntl } from 'react-intl'
|
||||||
import Jump from '../Jump'
|
import Jump from '../Jump'
|
||||||
import { useUnreads } from '@/provider/unreads'
|
import { useUnreads } from '@/provider/unreads'
|
||||||
|
@ -77,6 +77,12 @@ export default function Layout({ children }: LayoutProps) {
|
||||||
icon: <FaGlobe />,
|
icon: <FaGlobe />,
|
||||||
path: `/accounts/${router.query.id}/public`
|
path: `/accounts/${router.query.id}/public`
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'favourites',
|
||||||
|
title: formatMessage({ id: 'timeline.favourites' }),
|
||||||
|
icon: <FaStar />,
|
||||||
|
path: `/accounts/${router.query.id}/favourites`
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'bookmarks',
|
id: 'bookmarks',
|
||||||
title: formatMessage({ id: 'timeline.bookmarks' }),
|
title: formatMessage({ id: 'timeline.bookmarks' }),
|
||||||
|
|
|
@ -145,6 +145,11 @@ export default function Timeline(props: Props) {
|
||||||
const res = await client.getPublicTimeline(options)
|
const res = await client.getPublicTimeline(options)
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
case 'favourites': {
|
||||||
|
const res = await client.getFavourites(options)
|
||||||
|
// TODO: handle next_id in link header to get more posts
|
||||||
|
return res.data
|
||||||
|
}
|
||||||
case 'bookmarks': {
|
case 'bookmarks': {
|
||||||
const res = await client.getBookmarks(options)
|
const res = await client.getBookmarks(options)
|
||||||
return res.data
|
return res.data
|
||||||
|
|
Loading…
Reference in New Issue