add 0004-more-copy-buttons patch
This commit is contained in:
parent
cdd37dcf28
commit
8dcd9cf3c9
2 changed files with 75 additions and 0 deletions
74
akkoma-fe/0004-more-copy-buttons.patch
Normal file
74
akkoma-fe/0004-more-copy-buttons.patch
Normal file
|
@ -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"
|
||||||
|
/><span>{{ $t("status.external_source") }}</span>
|
||||||
|
</a>
|
||||||
|
+ <button
|
||||||
|
+ v-if="!status.is_local"
|
||||||
|
+ class="button-default dropdown-item dropdown-item-icon"
|
||||||
|
+ @click.prevent="copyLinkRemote"
|
||||||
|
+ @click="close"
|
||||||
|
+ >
|
||||||
|
+ <FAIcon
|
||||||
|
+ fixed-width
|
||||||
|
+ icon="share-alt"
|
||||||
|
+ /><span>{{ $t("status.copy_remote_url") }}</span>
|
||||||
|
+ </button>
|
||||||
|
<button
|
||||||
|
class="button-default dropdown-item dropdown-item-icon"
|
||||||
|
@click.prevent="reportStatus"
|
||||||
|
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
|
||||||
|
index 802a60b3..e88ffad9 100644
|
||||||
|
--- a/src/components/media_modal/media_modal.vue
|
||||||
|
+++ b/src/components/media_modal/media_modal.vue
|
||||||
|
@@ -94,6 +94,11 @@
|
||||||
|
>
|
||||||
|
{{ description }}
|
||||||
|
</span>
|
||||||
|
+ <span
|
||||||
|
+ class="link-to-media"
|
||||||
|
+ >
|
||||||
|
+ <a :href="currentMedia.url">{{ $t('media_modal.link_to_media') }}</a>
|
||||||
|
+ </span>
|
||||||
|
<span
|
||||||
|
class="counter"
|
||||||
|
>
|
||||||
|
diff --git a/src/i18n/en.json b/src/i18n/en.json
|
||||||
|
index 53c2ad43..91887d5e 100644
|
||||||
|
--- a/src/i18n/en.json
|
||||||
|
+++ b/src/i18n/en.json
|
||||||
|
@@ -268,6 +268,7 @@
|
||||||
|
"media_modal": {
|
||||||
|
"counter": "{current} / {total}",
|
||||||
|
"hide": "Close media viewer",
|
||||||
|
+ "link_to_media": "Link to Media",
|
||||||
|
"next": "Next",
|
||||||
|
"previous": "Previous"
|
||||||
|
},
|
||||||
|
@@ -962,6 +963,7 @@
|
||||||
|
"bookmark": "Bookmark",
|
||||||
|
"collapse_attachments": "Collapse attachments",
|
||||||
|
"copy_link": "Copy link to post",
|
||||||
|
+ "copy_remote_url": "Copy remote URL",
|
||||||
|
"delete": "Delete post",
|
||||||
|
"delete_confirm": "Do you really want to delete this post?",
|
||||||
|
"delete_confirm_accept_button": "Yes, delete it",
|
|
@ -74,6 +74,7 @@
|
||||||
./akkoma-fe/0001-confirm-favorite.patch
|
./akkoma-fe/0001-confirm-favorite.patch
|
||||||
./akkoma-fe/0002-move-notifications.patch
|
./akkoma-fe/0002-move-notifications.patch
|
||||||
./akkoma-fe/0003-en_3pp.patch
|
./akkoma-fe/0003-en_3pp.patch
|
||||||
|
./akkoma-fe/0004-more-copy-buttons.patch
|
||||||
];
|
];
|
||||||
patchFlags = "-p1 -F5";
|
patchFlags = "-p1 -F5";
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue