added chat message timestamp tooltips (title attr)
This commit is contained in:
@ -20,6 +20,7 @@
|
|||||||
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
|
"dayjs": "^1.11.11",
|
||||||
"emoji-mart": "^5.6.0",
|
"emoji-mart": "^5.6.0",
|
||||||
"flag-icons": "^7.2.1",
|
"flag-icons": "^7.2.1",
|
||||||
"hls.js": "^1.5.8",
|
"hls.js": "^1.5.8",
|
||||||
|
@ -3,6 +3,7 @@ import { EventKind, NostrLink, TaggedNostrEvent } from "@snort/system";
|
|||||||
import React, { Suspense, lazy, useContext, useMemo, useRef, useState } from "react";
|
import React, { Suspense, lazy, useContext, useMemo, useRef, useState } from "react";
|
||||||
import { useHover, useOnClickOutside } from "usehooks-ts";
|
import { useHover, useOnClickOutside } from "usehooks-ts";
|
||||||
import { dedupe } from "@snort/shared";
|
import { dedupe } from "@snort/shared";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const EmojiPicker = lazy(() => import("../emoji-picker"));
|
const EmojiPicker = lazy(() => import("../emoji-picker"));
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
@ -139,7 +140,9 @@ export function ChatMessage({
|
|||||||
}
|
}
|
||||||
pubkey={ev.pubkey}
|
pubkey={ev.pubkey}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
|
<span title={dayjs(ev.created_at * 1000).format('MMM D, h:mm A')}>
|
||||||
<Text tags={ev.tags} content={ev.content} eventComponent={CollapsibleEvent} className="inline" />
|
<Text tags={ev.tags} content={ev.content} eventComponent={CollapsibleEvent} className="inline" />
|
||||||
|
</span>
|
||||||
{(hasReactions || hasZaps) && (
|
{(hasReactions || hasZaps) && (
|
||||||
<div className="flex gap-1 mt-1">
|
<div className="flex gap-1 mt-1">
|
||||||
{hasZaps && (
|
{hasZaps && (
|
||||||
|
@ -4080,6 +4080,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"dayjs@npm:^1.11.11":
|
||||||
|
version: 1.11.11
|
||||||
|
resolution: "dayjs@npm:1.11.11"
|
||||||
|
checksum: 10c0/0131d10516b9945f05a57e13f4af49a6814de5573a494824e103131a3bbe4cc470b1aefe8e17e51f9a478a22cd116084be1ee5725cedb66ec4c3f9091202dc4b
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4":
|
"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4":
|
||||||
version: 4.3.4
|
version: 4.3.4
|
||||||
resolution: "debug@npm:4.3.4"
|
resolution: "debug@npm:4.3.4"
|
||||||
@ -7677,6 +7684,7 @@ __metadata:
|
|||||||
babel-plugin-formatjs: "npm:^10.5.16"
|
babel-plugin-formatjs: "npm:^10.5.16"
|
||||||
buffer: "npm:^6.0.3"
|
buffer: "npm:^6.0.3"
|
||||||
classnames: "npm:^2.5.1"
|
classnames: "npm:^2.5.1"
|
||||||
|
dayjs: "npm:^1.11.11"
|
||||||
emoji-mart: "npm:^5.6.0"
|
emoji-mart: "npm:^5.6.0"
|
||||||
eslint: "npm:^8.56.0"
|
eslint: "npm:^8.56.0"
|
||||||
flag-icons: "npm:^7.2.1"
|
flag-icons: "npm:^7.2.1"
|
||||||
|
Reference in New Issue
Block a user