diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 5c645ad32f5..1796b79239e 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -7,10 +7,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import React, { JSX, useMemo, useState } from "react"; +import React, { JSX, useMemo, useRef, useState } from "react"; import { Room, RoomMember, MatrixEvent, User } from "matrix-js-sdk/src/matrix"; import { Checkbox, Button } from "@vector-im/compound-web"; import LinkIcon from "@vector-im/compound-design-tokens/assets/web/icons/link"; +import CheckIcon from "@vector-im/compound-design-tokens/assets/web/icons/check"; import { _t } from "../../../languageHandler"; import QRCode from "../elements/QRCode"; @@ -102,6 +103,9 @@ export function ShareDialog({ target, customTitle, onFinished, permalinkCreator const showQrCode = useSettingValue(UIFeature.ShareQRCode); const showSocials = useSettingValue(UIFeature.ShareSocial); + const timeoutIdRef = useRef(); + const [isCopied, setIsCopied] = useState(false); + const [linkToSpecificEvent, setLinkToSpecificEvent] = useState(target instanceof MatrixEvent); const { title, url, checkboxLabel } = useTargetValues(target, linkToSpecificEvent, permalinkCreator); const newTitle = customTitle ?? title; @@ -129,13 +133,15 @@ export function ShareDialog({ target, customTitle, onFinished, permalinkCreator )} {showSocials && } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 1ecdc204b8a..f467bbc7140 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2952,6 +2952,7 @@ "warning": "WARNING: " }, "share": { + "link_copied": "Link copied", "permalink_message": "Link to selected message", "permalink_most_recent": "Link to most recent message", "share_call": "Conference invite link",