Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Grayjay.Desktop.Web/src/components/CommentView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const CommentView: Component<CommentViewProps> = (props) => {
<div style="display: flex; flex-direction: row; align-items: center;">
<div class={styles.authorName}>{props.comment?.author.name}</div>
<Show when={props.comment?.date}>
<div class={styles.metadata}>{toHumanNowDiffString(props.comment?.date)}</div>
<div class={styles.metadata} title={props.comment?.date}>{toHumanNowDiffString(props.comment?.date)}</div>
</Show>
</div>
<pre class={styles.text} innerHTML={message()} ondragstart={(ev)=>preventDragDrop(ev)} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PlaylistItemView: Component<PlaylistItemViewProps> = (props) => {
e.stopPropagation();
}}>{props.item?.author.name}</div>
<Show when={props.item}>
<div class={styles.metadata}><Show when={(props.item?.viewCount ?? 0) > 0}>{toHumanNumber(props.item?.viewCount)} • </Show>{toHumanNowDiffString(props.item?.dateTime)}</div>
<div class={styles.metadata} title={DateTime.fromSeconds(Number(props.item?.dateTime)).toISO()}><Show when={(props.item?.viewCount ?? 0) > 0}>{toHumanNumber(props.item?.viewCount)} • </Show>{toHumanNowDiffString(props.item?.dateTime)}</div>
</Show>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const RepliesOverlay: Component<RepliesOverlayProps> = (props) => {
<div style="display: flex; flex-direction: row; align-items: center;">
<div class={styles.authorName}>{props.comment?.author.name}</div>
<Show when={props.comment?.date}>
<div class={styles.metadata}>{toHumanNowDiffString(props.comment?.date)}</div>
<div class={styles.metadata} title={props.comment?.date}>{toHumanNowDiffString(props.comment?.date)}</div>
</Show>
</div>
<pre class={styles.text}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const LockedContentThumbnailView: Component<LockedContentProps> = (props) => {
}}>
<div class={styles.authorName} onClick={onClickAuthor}>{props.content?.author.name}</div>
<Show when={props.content}>
<div class={styles.metadata}>{toHumanNowDiffString(props.content?.dateTime)}</div>
<div class={styles.metadata} title={props.content?.dateTime}>{toHumanNowDiffString(props.content?.dateTime)}</div>
</Show>
</div>
<Show when={props.onSettings}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const NestedMediaThumbnailView: Component<NestedMediaProps> = (props) => {
}}>
<div class={styles.authorName} onClick={onClickAuthor}>{props.video?.author.name}</div>
<Show when={props.video}>
<div class={styles.metadata}>{toHumanNowDiffString(props.video?.dateTime)}</div>
<div class={styles.metadata} title={props.video?.dateTime}>{toHumanNowDiffString(props.video?.dateTime)}</div>
</Show>
</div>
<Show when={props.onSettings}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const PostThumbnailView: Component<PostProps> = (props) => {
}}>
<div class={styles.authorName} onClick={onClickAuthor}>{props.post?.author.name}</div>
<Show when={props.post}>
<div class={styles.metadata}>{toHumanNowDiffString(props.post?.dateTime)}</div>
<div class={styles.metadata} title={props.post?.dateTime}>{toHumanNowDiffString(props.post?.dateTime)}</div>
</Show>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ const VideoThumbnailView: Component<VideoProps> = (props) => {
}}>
<div class={styles.authorName} onClick={onClickAuthor}>{props.video?.author?.name ?? "Unknown"}</div>
<Show when={props.video}>
<div class={styles.metadata}><Show when={(props.video?.viewCount ?? 0) > 0}>{toHumanNumber(props.video?.viewCount)} views • </Show>{toHumanNowDiffString(props.video?.dateTime)}</div>
<div class={styles.metadata} title={DateTime.fromSeconds(Number(props.video?.dateTime)).toISO()}>
<Show when={(props.video?.viewCount ?? 0) > 0}>{toHumanNumber(props.video?.viewCount)} views • </Show>
{toHumanNowDiffString(props.video?.dateTime)}
</div>
</Show>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const PostDetailView: Component = () => {
{details$()?.post?.name}
</div>
<div class={styles.postMeta}>
<div class={styles.date}>
<div class={styles.date} title={details$()?.post?.dateTime}>
{toHumanNowDiffString(details$()?.post?.dateTime)}
</div>
<div class={styles.right} style={{"display": "inline-block"}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1211,8 +1211,8 @@ const VideoDetailView: Component<VideoDetailsProps> = (props) => {
<img src={bestThumbnail()?.url} style="border-radius: 3px; height: 112px; width: 200px; cursor: pointer;" referrerPolicy='no-referrer' />
<div style="display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; cursor: pointer; margin-left: 10px;">
<div class={styles.recommendationItemTitle}>{item()?.name}</div>
<div class={styles.recommendationItemAuthor} style="margin-top: 6px">{item()?.author?.name}</div>
<div class={styles.recommendationItemAuthor} style="margin-top: 6px"><Show when={(item()?.viewCount ?? 0) > 0}>{toHumanNumber(item()?.viewCount)} views • </Show>{toHumanNowDiffString(item()?.dateTime)}</div>
<div class={styles.recommendationItemAuthor} style="margin-top: 4px">{item()?.author?.name}</div>
<div class={styles.recommendationItemAuthor} style="margin-top: 4px" title={DateTime.fromSeconds(Number(item()?.dateTime)).toISO()}><Show when={(item()?.viewCount ?? 0) > 0}>{toHumanNumber(item()?.viewCount)} views • </Show>{toHumanNowDiffString(item()?.dateTime)}</div>
</div>
</div>
);
Expand Down Expand Up @@ -1364,7 +1364,7 @@ const VideoDetailView: Component<VideoDetailsProps> = (props) => {
<div class={styles.headerContainer}>
<div class={styles.containerTitle}>
<div class={styles.title} ondragstart={(ev)=>preventDragDrop(ev)}>{name$()}</div>
<div class={styles.metadata}>{metadata$()}</div>
<div class={styles.metadata} title={DateTime.fromSeconds(Number(dateTime$())).toISO()}>{metadata$()}</div>
</div>
<div class={styles.buttonList}>
<div style="margin: 7px;;">
Expand Down
3 changes: 1 addition & 2 deletions Grayjay.Desktop.Web/src/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ export function dateFromAny(value?: any, def?: DateTime): DateTime | undefined {

if(!isNaN(value)) {
//TODO: Alt solution
const wrongOffset = ((new Date()).getTimezoneOffset()/60);
return DateTime.fromSeconds(value).plus({hours: wrongOffset});
return DateTime.fromSeconds(value);
}
if(typeof value == "string")
return DateTime.fromISO(value);
Expand Down