Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jan 10, 2025
1 parent f5cd6d9 commit d4bc571
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/index/src/pages/player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default function PlayerPage({ id }: any) {

if (!_.err) {
_.data && setState(_.data)
_.data.IsLiked == 2 && setIsLiked(true)

// axios.get(`/post/${id}/videos`)

Expand Down
37 changes: 29 additions & 8 deletions packages/index/src/pages/post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import copyTextToClipboard from 'copy-text-to-clipboard'
import { getTimeDistance } from '@web/shared/utils/date'
import { Markdown } from '@web/shared/components/markdown'
import { axios } from '@web/shared/constants'
import Comment from '../../components/comment'
import { Postkeleton } from '../../skeleton/CommentSkeleton'
import { Tags } from '../../components/tag/Tag'

Expand All @@ -16,7 +15,7 @@ const PostPage: React.FC = ({ id }: any) => {
const [state, setState] = useState<R.Post>({} as R.Post)
const [isLiked, setIsLiked] = useState<boolean>(false)
const [isCollected, setIsCollected] = useState<boolean>(false)
const [isFocus, setIsFocus] = useState<boolean>(false)
const [isFocus] = useState<boolean>(false)

const isMobile = useMemo(() => window.innerWidth < 991, [])

Expand Down Expand Up @@ -163,7 +162,11 @@ const PostPage: React.FC = ({ id }: any) => {
'--o': isMobile && isFocus
})}
>
<div className={classNames('post-side-action', { '--l': isLiked })} role="button" onClick={likeHandler}>
<div
className={classNames('post-side-action', { '--l': isLiked })}
role="button"
onClick={likeHandler}
>
<div className="side-action-icon">
<svg
className="side-action__icon"
Expand Down Expand Up @@ -222,7 +225,9 @@ const PostPage: React.FC = ({ id }: any) => {
></path>
</svg>
</div>
<div className="side-action__text">{isLiked ? `获衞 ${LikesCount}` : `η‚Ήθ΅ž ${LikesCount || ''}`}</div>
<div className="side-action__text">
{isLiked ? `获衞 ${LikesCount}` : `η‚Ήθ΅ž ${LikesCount || ''}`}
</div>
</div>
<div
className={classNames('post-side-action', { '--l': isCollected })}
Expand Down Expand Up @@ -288,7 +293,13 @@ const PostPage: React.FC = ({ id }: any) => {
></path>
</svg>
<span>{CreatedAt ? getTimeDistance(CreatedAt) : '-'}</span>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
clipRule="evenodd"
Expand All @@ -297,7 +308,13 @@ const PostPage: React.FC = ({ id }: any) => {
></path>
</svg>
<span>{Hits || '-'}</span>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
clipRule="evenodd"
Expand All @@ -324,11 +341,15 @@ const PostPage: React.FC = ({ id }: any) => {
title: tag,
href: `/pv/tag?type=video&title=${tag}`
}))
.concat(IsOriginal == 2 ? { title: 'εŽŸεˆ›', href: `/pv/tag?type=video&is_original=2&title=εŽŸεˆ›` } : [])
.concat(
IsOriginal == 2
? { title: 'εŽŸεˆ›', href: `/pv/tag?type=video&is_original=2&title=εŽŸεˆ›` }
: []
)
: []
}
/>
<Comment id={id} onFocus={() => setIsFocus(true)} onBlur={() => setIsFocus(false)} />
{/* <Comment id={id} onFocus={() => setIsFocus(true)} onBlur={() => setIsFocus(false)} /> */}
</div>
</>
)
Expand Down

0 comments on commit d4bc571

Please sign in to comment.