feat: navigation

This commit is contained in:
DIYgod 2024-05-18 14:06:09 +08:00
parent ea44e783e2
commit 879efcadae
No known key found for this signature in database
3 changed files with 27 additions and 3 deletions

View File

@ -74,7 +74,18 @@ export function FeedColumn({
}
>
<div className="ml-5 mr-3 flex items-center justify-between">
<div className="font-bold text-xl flex items-center gap-1">
<div
className="font-bold text-xl flex items-center gap-1"
onClick={(e) => {
e.stopPropagation()
setActivedList?.({
level: levels.view,
id: active,
name: views[active].name,
view: active,
})
}}
>
<img src="./icon.svg" alt="logo" className="h-5 w-5" />
Follow
</div>

View File

@ -1,6 +1,6 @@
import { useSubscriptions } from "@renderer/lib/queries/subscriptions"
import { useState } from "react"
import { views } from "@renderer/lib/constants"
import { levels, views } from "@renderer/lib/constants"
import { ActivedList } from "@renderer/lib/types"
import { cn } from "@renderer/lib/utils"
import { FeedCategory } from "./category"
@ -27,7 +27,19 @@ export function FeedList({
<div
className={cn("flex items-center justify-between mb-2 px-2.5 py-1")}
>
<div className="font-bold">
<div
className="font-bold"
onClick={(e) => {
e.stopPropagation()
view !== undefined &&
setActivedList?.({
level: levels.view,
id: view,
name: views[view].name,
view,
})
}}
>
{view !== undefined && views[view].name}
</div>
<div className="text-sm text-zinc-500 ml-2 flex items-center gap-3">

View File

@ -24,6 +24,7 @@ export function Component() {
{
name: "Follow User",
value: "user",
disabled: true,
},
{
name: "RSS3",