74 lines
2.7 KiB
Diff
74 lines
2.7 KiB
Diff
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",
|