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]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Show full date and time in post timestamp tooltip.
|
||||||
|
|
||||||
## [1.10.0] - 2023-01-18
|
## [1.10.0] - 2023-01-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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">
|
<div class="post-header">
|
||||||
<a
|
<a
|
||||||
class="floating-avatar"
|
class="floating-avatar"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<a
|
<a
|
||||||
class="timestamp"
|
class="timestamp"
|
||||||
:href="post.uri"
|
:href="post.uri"
|
||||||
:title="formatDate(post.created_at)"
|
:title="formatDateTime(post.created_at)"
|
||||||
@click="openPost($event, post.id)"
|
@click="openPost($event, post.id)"
|
||||||
>
|
>
|
||||||
{{ humanizeDate(post.created_at) }}
|
{{ humanizeDate(post.created_at) }}
|
||||||
|
@ -266,7 +266,7 @@ import { useInstanceInfo } from "@/store/instance"
|
||||||
import { useCurrentUser } from "@/store/user"
|
import { useCurrentUser } from "@/store/user"
|
||||||
import { CRYPTOCURRENCIES } from "@/utils/cryptocurrencies"
|
import { CRYPTOCURRENCIES } from "@/utils/cryptocurrencies"
|
||||||
import { getWallet } from "@/utils/ethereum"
|
import { getWallet } from "@/utils/ethereum"
|
||||||
import { formatDate, humanizeDate } from "@/utils/dates"
|
import { formatDateTime, humanizeDate } from "@/utils/dates"
|
||||||
|
|
||||||
interface PaymentOption {
|
interface PaymentOption {
|
||||||
code: string;
|
code: string;
|
||||||
|
|
|
@ -24,3 +24,8 @@ export function formatDate(isoDate: string): string {
|
||||||
const date = DateTime.fromISO(isoDate)
|
const date = DateTime.fromISO(isoDate)
|
||||||
return date.toLocaleString()
|
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