mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update share memo buttons (#1498)
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import copy from "copy-to-clipboard";
|
||||
import dayjs from "dayjs";
|
||||
import { memo, useEffect, useRef, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
@ -12,7 +11,6 @@ import MemoContent from "./MemoContent";
|
||||
import MemoResources from "./MemoResources";
|
||||
import showShareMemo from "./ShareMemoDialog";
|
||||
import showPreviewImageDialog from "./PreviewImageDialog";
|
||||
import showEmbedMemoDialog from "./EmbedMemoDialog";
|
||||
import showChangeMemoCreatedTsDialog from "./ChangeMemoCreatedTsDialog";
|
||||
import "@/less/memo.less";
|
||||
|
||||
@ -58,15 +56,6 @@ const Memo: React.FC<Props> = (props: Props) => {
|
||||
navigate(`/m/${memo.id}`);
|
||||
};
|
||||
|
||||
const handleShowEmbedMemoDialog = () => {
|
||||
showEmbedMemoDialog(memo.id);
|
||||
};
|
||||
|
||||
const handleCopyLink = () => {
|
||||
copy(`${window.location.origin}/m/${memo.id}`);
|
||||
toast.success(t("message.succeed-copy-link"));
|
||||
};
|
||||
|
||||
const handleTogglePinMemoBtnClick = async () => {
|
||||
try {
|
||||
if (memo.pinned) {
|
||||
@ -253,15 +242,9 @@ const Memo: React.FC<Props> = (props: Props) => {
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<span className="btn" onClick={handleCopyLink}>
|
||||
{t("memo.copy-link")}
|
||||
</span>
|
||||
<span className="btn" onClick={handleViewMemoDetailPage}>
|
||||
{t("memo.view-detail")}
|
||||
</span>
|
||||
<span className="btn" onClick={handleShowEmbedMemoDialog}>
|
||||
{t("memo.embed")}
|
||||
</span>
|
||||
<span className="btn text-orange-500" onClick={handleArchiveMemoClick}>
|
||||
{t("common.archive")}
|
||||
</span>
|
||||
|
Reference in New Issue
Block a user