Show full date and time in post timestamp tooltip
This commit is contained in:
parent
f9b17605aa
commit
d6efbd467f
3 changed files with 12 additions and 3 deletions
|
@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Show full date and time in post timestamp tooltip.
|
||||
|
||||
## [1.10.0] - 2023-01-18
|
||||
|
||||
### Added
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="post" :class="{ 'highlighted': highlighted }" :data-post-id="post.id" :id="post.id">
|
||||
<div class="post" :class="{ highlighted: highlighted }" :data-post-id="post.id" :id="post.id">
|
||||
<div class="post-header">
|
||||
<a
|
||||
class="floating-avatar"
|
||||
|
@ -40,7 +40,7 @@
|
|||
<a
|
||||
class="timestamp"
|
||||
:href="post.uri"
|
||||
:title="formatDate(post.created_at)"
|
||||
:title="formatDateTime(post.created_at)"
|
||||
@click="openPost($event, post.id)"
|
||||
>
|
||||
{{ humanizeDate(post.created_at) }}
|
||||
|
@ -266,7 +266,7 @@ import { useInstanceInfo } from "@/store/instance"
|
|||
import { useCurrentUser } from "@/store/user"
|
||||
import { CRYPTOCURRENCIES } from "@/utils/cryptocurrencies"
|
||||
import { getWallet } from "@/utils/ethereum"
|
||||
import { formatDate, humanizeDate } from "@/utils/dates"
|
||||
import { formatDateTime, humanizeDate } from "@/utils/dates"
|
||||
|
||||
interface PaymentOption {
|
||||
code: string;
|
||||
|
|
|
@ -24,3 +24,8 @@ export function formatDate(isoDate: string): string {
|
|||
const date = DateTime.fromISO(isoDate)
|
||||
return date.toLocaleString()
|
||||
}
|
||||
|
||||
export function formatDateTime(isoDate: string): string {
|
||||
const date = DateTime.fromISO(isoDate)
|
||||
return date.toLocaleString(DateTime.DATETIME_FULL)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue