summaryrefslogtreecommitdiff
path: root/src/client/components/note.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-11 12:42:48 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-04-11 12:42:48 +0900
commitc22ff4c5564b257365329ffce8a08618be553c28 (patch)
treef289c44906e33e684d3cedaeb51a6e62da08645d /src/client/components/note.vue
parentTweak UI (diff)
downloadsharkey-c22ff4c5564b257365329ffce8a08618be553c28.tar.gz
sharkey-c22ff4c5564b257365329ffce8a08618be553c28.tar.bz2
sharkey-c22ff4c5564b257365329ffce8a08618be553c28.zip
Resolve #7425
Diffstat (limited to 'src/client/components/note.vue')
-rw-r--r--src/client/components/note.vue15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index 870f8a839b..e51085307a 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -103,7 +103,7 @@
<script lang="ts">
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
-import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
+import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
import * as mfm from 'mfm-js';
import { sum } from '../../prelude/array';
@@ -600,6 +600,11 @@ export default defineComponent({
window.open(this.appearNote.url || this.appearNote.uri, '_blank');
}
} : undefined,
+ {
+ icon: faShareAlt,
+ text: this.$ts.share,
+ action: this.share
+ },
null,
statePromise.then(state => state.isFavorited ? {
icon: faStar,
@@ -825,6 +830,14 @@ export default defineComponent({
});
},
+ share() {
+ navigator.share({
+ title: this.$t('noteOf', { user: this.appearNote.user.name }),
+ text: this.appearNote.text,
+ url: `${url}/notes/${this.appearNote.id}`
+ });
+ },
+
focus() {
this.$el.focus();
},