diff --git a/package-lock.json b/package-lock.json
index bdddd93..5caa691 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "lindsvg-pwa",
- "version": "2.4.1",
+ "version": "2.4.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "lindsvg-pwa",
- "version": "2.4.1",
+ "version": "2.4.2",
"dependencies": {
"@vueuse/core": "^10.9.0",
"lindsvg": "^1.5.0",
diff --git a/package.json b/package.json
index 669b374..9003dd6 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "lindsvg-pwa",
"private": true,
- "version": "2.4.1",
+ "version": "2.4.2",
"type": "module",
"scripts": {
"lint": "eslint \"src/**/*.{mjs,vue}\"",
diff --git a/src/assets/icons.svg b/src/assets/icons.svg
index bb729a4..d94fbf3 100644
--- a/src/assets/icons.svg
+++ b/src/assets/icons.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/components/PanelCollections.vue b/src/components/PanelCollections.vue
index 7ffb309..9d9bdb0 100644
--- a/src/components/PanelCollections.vue
+++ b/src/components/PanelCollections.vue
@@ -52,11 +52,17 @@ function deleteLSystem(lid) {
collectionsStore.deleteLSystem(lid);
}
-function copyPermalink(cid, lid) {
+async function copyPermalink(target, cid, lid) {
let url = new URL(location.origin + location.pathname);
url.searchParams.set("cid", cid);
url.searchParams.set("lid", lid);
- navigator.clipboard.writeText(url.toString());
+ await navigator.clipboard.writeText(url.toString());
+ target.classList.remove(interfaceStyles.iconButtonLink);
+ target.classList.add(interfaceStyles.iconButtonCheck);
+ setTimeout(() => {
+ target.classList.remove(interfaceStyles.iconButtonCheck);
+ target.classList.add(interfaceStyles.iconButtonLink);
+ }, 2000);
}
@@ -122,7 +128,7 @@ function copyPermalink(cid, lid) {
tabindex="-1"
:class="[$style.permalinkButton, interfaceStyles.iconButton, interfaceStyles.iconButtonLink]"
title="Copy L-system permalink"
- @click="copyPermalink(cid, lid)"
+ @click="({target}) => copyPermalink(target, cid, lid)"
/>