mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Show relative time on large post too
This commit is contained in:
parent
058cf05805
commit
f10d5457ae
1 changed files with 13 additions and 0 deletions
|
@ -2267,6 +2267,19 @@ function Status({
|
||||||
/> */}
|
/> */}
|
||||||
<span>{_(visibilityText[visibility])}</span> •{' '}
|
<span>{_(visibilityText[visibility])}</span> •{' '}
|
||||||
<a href={url} target="_blank" rel="noopener noreferrer">
|
<a href={url} target="_blank" rel="noopener noreferrer">
|
||||||
|
{
|
||||||
|
// within a day
|
||||||
|
new Date().getTime() - createdAtDate.getTime() <
|
||||||
|
86400000 && (
|
||||||
|
<>
|
||||||
|
<RelativeTime
|
||||||
|
datetime={createdAtDate}
|
||||||
|
format="micro"
|
||||||
|
/>{' '}
|
||||||
|
‒{' '}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
<time
|
<time
|
||||||
class="created"
|
class="created"
|
||||||
datetime={createdAtDate.toISOString()}
|
datetime={createdAtDate.toISOString()}
|
||||||
|
|
Loading…
Reference in a new issue