diff --git a/frontend/components/modal/ModalSharePage.vue b/frontend/components/modal/ModalSharePage.vue
index f5d8a0816..4b73f353b 100644
--- a/frontend/components/modal/ModalSharePage.vue
+++ b/frontend/components/modal/ModalSharePage.vue
@@ -94,10 +94,59 @@
iconSize="1.5em"
/>
-
+
+
+
+
{
contentCopied.value = false;
}
};
+
+const copyToClipboardThenOpenURL = async (
+ name: string,
+ url: string,
+ redirectURL?: string
+) => {
+ try {
+ await navigator.clipboard.writeText(url);
+ signalContentCopied.value = true;
+ setTimeout(() => {
+ signalContentCopied.value = false;
+ if (redirectURL) {
+ window.open(redirectURL, "_blank");
+ }
+ }, 2000);
+ } catch (error) {
+ console.error(`Could not copy text: ${error}`);
+ signalContentCopied.value = false;
+ }
+};