mirror of
https://github.com/usememos/memos.git
synced 2024-12-19 09:02:49 +03:00
fix: make creation time a link to the detail page (#1379)
This commit is contained in:
parent
7529296dd5
commit
8b20cb9fd2
@ -171,8 +171,11 @@ const Memo: React.FC<Props> = (props: Props) => {
|
|||||||
editorStore.setEditMemoWithId(memo.id);
|
editorStore.setEditMemoWithId(memo.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMemoCreatedTimeClick = () => {
|
const handleMemoCreatedTimeClick = (e: React.MouseEvent) => {
|
||||||
|
if (e.altKey) {
|
||||||
|
e.preventDefault();
|
||||||
showChangeMemoCreatedTsDialog(memo.id);
|
showChangeMemoCreatedTsDialog(memo.id);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMemoVisibilityClick = (visibility: Visibility) => {
|
const handleMemoVisibilityClick = (visibility: Visibility) => {
|
||||||
@ -189,9 +192,9 @@ const Memo: React.FC<Props> = (props: Props) => {
|
|||||||
{memo.pinned && <div className="corner-container"></div>}
|
{memo.pinned && <div className="corner-container"></div>}
|
||||||
<div className="memo-top-wrapper">
|
<div className="memo-top-wrapper">
|
||||||
<div className="status-text-container">
|
<div className="status-text-container">
|
||||||
<span className="time-text" onDoubleClick={handleMemoCreatedTimeClick}>
|
<Link className="time-text" to={`/m/${memo.id}`} onClick={handleMemoCreatedTimeClick}>
|
||||||
{createdTimeStr}
|
{createdTimeStr}
|
||||||
</span>
|
</Link>
|
||||||
{isVisitorMode && (
|
{isVisitorMode && (
|
||||||
<Link className="name-text" to={`/u/${memo.creatorId}`}>
|
<Link className="name-text" to={`/u/${memo.creatorId}`}>
|
||||||
@{memo.creatorName}
|
@{memo.creatorName}
|
||||||
|
Loading…
Reference in New Issue
Block a user