From 8dcd9cf3c9a50683ec7cb1ad4144c7e2210464d1 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 24 Apr 2024 22:42:03 -0400 Subject: [PATCH] add 0004-more-copy-buttons patch --- akkoma-fe/0004-more-copy-buttons.patch | 74 ++++++++++++++++++++++++++ flake.nix | 1 + 2 files changed, 75 insertions(+) create mode 100644 akkoma-fe/0004-more-copy-buttons.patch diff --git a/akkoma-fe/0004-more-copy-buttons.patch b/akkoma-fe/0004-more-copy-buttons.patch new file mode 100644 index 0000000..7856148 --- /dev/null +++ b/akkoma-fe/0004-more-copy-buttons.patch @@ -0,0 +1,74 @@ +diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js +index b38876b8..f15eb849 100644 +--- a/src/components/extra_buttons/extra_buttons.js ++++ b/src/components/extra_buttons/extra_buttons.js +@@ -95,6 +95,11 @@ const ExtraButtons = { + .then(() => this.$emit('onSuccess')) + .catch(err => this.$emit('onError', err.error.error)) + }, ++ copyLinkRemote () { ++ navigator.clipboard.writeText(this.status.external_url) ++ .then(() => this.$emit('onSuccess')) ++ .catch(err => this.$emit('onError', err.error.error)) ++ }, + bookmarkStatus () { + this.$store.dispatch('bookmark', { id: this.status.id }) + .then(() => this.$emit('onSuccess')) +diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue +index 9da2ad8c..d7925830 100644 +--- a/src/components/extra_buttons/extra_buttons.vue ++++ b/src/components/extra_buttons/extra_buttons.vue +@@ -139,6 +139,17 @@ + icon="external-link-alt" + />{{ $t("status.external_source") }} + ++ +