diff --git a/package.json b/package.json index d96b7fd77c..034b38b1d4 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@milkdown/react": "7.3.6", "@milkdown/transformer": "7.3.6", "@milkdown/utils": "7.3.6", - "@mx-space/api-client": "1.9.0", + "@mx-space/api-client": "1.10.1", "@prosemirror-adapter/react": "0.2.6", "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-label": "2.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 679cf8f26d..6bd1a37688 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,8 +72,8 @@ dependencies: specifier: 7.3.6 version: 7.3.6(@milkdown/core@7.3.6)(@milkdown/ctx@7.3.6)(@milkdown/prose@7.3.6)(@milkdown/transformer@7.3.6) '@mx-space/api-client': - specifier: 1.9.0 - version: 1.9.0 + specifier: 1.10.1 + version: 1.10.1 '@prosemirror-adapter/react': specifier: 0.2.6 version: 0.2.6(react-dom@18.2.0)(react@18.2.0) @@ -2288,8 +2288,8 @@ packages: tslib: 2.6.2 dev: false - /@mx-space/api-client@1.9.0: - resolution: {integrity: sha512-mOzXUk5MOzba3eRC8xNyogWRazEuFYD1a2u6Em6Y3sjteokD64bCLzsXwkNYeB6/6wAhC8f84uH+6cmeQAh/Hg==} + /@mx-space/api-client@1.10.1: + resolution: {integrity: sha512-WBk//2GzxqhJG0Uwp9Lub+v+rPv8M49P71N6VZpPWi58DEuTMhse3HeL+tVRSL92+3ZDBU3PMTUm7rWb+E/S5w==} dev: false /@mx-space/webhook@0.3.0: diff --git a/src/components/modules/note/NoteTimeline.tsx b/src/components/modules/note/NoteTimeline.tsx index 284bdf4132..780c5752d8 100644 --- a/src/components/modules/note/NoteTimeline.tsx +++ b/src/components/modules/note/NoteTimeline.tsx @@ -32,6 +32,7 @@ const NoteTimelineImpl = () => { nid: note.nid, title: note.title, created: note.created, + hide: note.hide, } }) const noteNid = useCurrentNoteNid() @@ -56,6 +57,7 @@ const NoteTimelineImpl = () => { nid: note.nid, id: note.id, created: note.created, + hide: note.hide, }, ] : [] @@ -72,6 +74,7 @@ const NoteTimelineImpl = () => { active={isCurrent} title={item.title} nid={item.nid} + attachToken={item.hide} /> ) })} diff --git a/src/components/modules/note/NoteTimelineItem.tsx b/src/components/modules/note/NoteTimelineItem.tsx index 7a9e7e2176..95b6b093de 100644 --- a/src/components/modules/note/NoteTimelineItem.tsx +++ b/src/components/modules/note/NoteTimelineItem.tsx @@ -7,6 +7,7 @@ import { tv } from 'tailwind-variants' import type { Target, TargetAndTransition } from 'framer-motion' import { LeftToRightTransitionView } from '~/components/ui/transition' +import { getToken } from '~/lib/cookie' import { clsxm } from '~/lib/helper' import { routeBuilder, Routes } from '~/lib/route-builder' import { springScrollToTop } from '~/lib/scroller' @@ -30,11 +31,15 @@ export const NoteTimelineItem = memo<{ active: boolean title: string nid: number + attachToken: boolean layout?: boolean }>((props) => { - const { active, nid, title, layout } = props + const { active, nid, title, layout, attachToken } = props + const href = routeBuilder(Routes.Note, { + id: nid, + }) return ( {title}