@@ -3,7 +3,6 @@ import type { CommentModel } from '@mx-space/api-client'
3
3
4
4
import { CollectionRefTypes } from '@mx-space/api-client'
5
5
6
- import { MotionButtonBase } from '~/components/ui/button'
7
6
import { RelativeTime } from '~/components/ui/relative-time'
8
7
import { EllipsisHorizontalTextWithTooltip } from '~/components/ui/typography'
9
8
import { clsxm } from '~/lib/helper'
@@ -34,25 +33,28 @@ export const CommentContentCell: Component<{ comment: CommentModel }> = (
34
33
if ( refType === CollectionRefTypes . Recently )
35
34
return `${ ref . text . slice ( 0 , 20 ) } ...`
36
35
return (
37
- < MotionButtonBase
38
- className = "inline-flex grow"
39
- onClick = { async ( ) => {
40
- const url = await apiClient . proxy . helper ( 'url-builder' ) ( ref . id ) . get < {
41
- data : string
42
- } > ( )
43
- window . open ( url ?. data , '_blank' )
44
- } }
45
- >
46
- < EllipsisHorizontalTextWithTooltip wrapperClassName = "text-left text-accent inline-block !w-0 flex-grow" >
47
- { ref . title }
48
- </ EllipsisHorizontalTextWithTooltip >
49
- </ MotionButtonBase >
36
+ < div className = "flex w-0 grow items-center" >
37
+ < a
38
+ href = { `${ apiClient . proxy
39
+ . helper ( 'url-builder' ) ( ref . id )
40
+ . toString ( true ) } ?redirect=true`}
41
+ className = "inline-flex overflow-hidden"
42
+ target = "_blank"
43
+ rel = "noreferrer"
44
+ >
45
+ < EllipsisHorizontalTextWithTooltip wrapperClassName = "text-left text-accent inline-block flex-shrink" >
46
+ { ref . title }
47
+ </ EllipsisHorizontalTextWithTooltip >
48
+ </ a >
49
+ < div className = "ml-2" > { isWhispers && '悄悄说' } </ div >
50
+ < div className = "grow" />
51
+ </ div >
50
52
)
51
- } , [ ref , refType ] )
53
+ } , [ isWhispers , ref , refType ] )
52
54
return (
53
55
< div className = { clsxm ( 'flex flex-col gap-2 py-2 text-sm' , className ) } >
54
56
< div className = "flex gap-2 whitespace-nowrap text-sm" >
55
- < RelativeTime date = { created } /> 于 { TitleEl } { isWhispers && '悄悄说' }
57
+ < RelativeTime date = { created } /> 于 { TitleEl }
56
58
</ div >
57
59
58
60
< p className = "break-words" > { text } </ p >
0 commit comments