Using human readable number for comment like count.

This commit is contained in:
Roland 2024-08-22 21:18:42 -06:00
parent d5ca3e7f02
commit a3e9952c4d
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 8 additions and 3 deletions

View file

@ -112,7 +112,7 @@ const VideoComment = ({comment, children}) => {
const dateElm = <div {...t}>{isoDatetimeToString(timestamp * 1000)}</div>;
const likesElm = like_count && <div {...t}>
<Icon name='thumbs up'/>{comment['like_count']}
<Icon name='thumbs up'/>{humanNumber(comment['like_count'])}
</div>;
return <Comment>

View file

@ -12,7 +12,8 @@ import {
FileIcon,
findPosterPath,
humanFileSize,
humanNumber, isoDatetimeToAgoPopup,
humanNumber,
isoDatetimeToAgoPopup,
isoDatetimeToString,
mimetypeColor,
PageContainer,
@ -297,6 +298,7 @@ export function VideosRoute(props) {
<Route path='channel/new' exact element={<ChannelNewPage/>}/>
<Route path='channel/:channelId/edit' exact element={<ChannelEditPage/>}/>
<Route path='channel/:channelId/video' exact element={<VideosPage/>}/>
<Route path='/video/:videoSlug' exact element={<VideosPage/>}/>
</Routes>
</PageContainer>
}
@ -317,7 +319,10 @@ export function VideoCard({file}) {
video_url = `/videos/channel/${channel.id}/video/${video.id}`;
} else if (file.files.length > 1) {
// No Channel, but the video has multiple files (subtitles, etc.). Use the full VideoPage.
video_url = `/videos/video/${video.id}`
video_url = `/videos/video/${video.id}`;
}
if (file.slug) {
video_url = `/videos/video/${file.slug}`;
}
let poster = <CardPoster to={video_url} file={file}/>;