From 15ce89a88dfede0941e7a5015dec957a0de5e101 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 6 Jan 2019 17:45:14 +0900 Subject: [PATCH] Resolve #3078 (#3838) --- locales/ja-JP.yml | 1 + src/client/app/common/views/components/note-menu.vue | 8 ++++++++ src/client/app/init.ts | 2 ++ 3 files changed, 11 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 8974976e15..0717b104ba 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -367,6 +367,7 @@ common/views/components/nav.vue: common/views/components/note-menu.vue: mention: "メンション" detail: "詳細" + copy-content: "内容をコピー" copy-link: "リンクをコピー" favorite: "お気に入り" unfavorite: "お気に入り解除" diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index 3f2ca50702..f7223b962c 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -29,6 +29,10 @@ export default Vue.extend({ icon: 'info-circle', text: this.$t('detail'), action: this.detail + }], [{ + icon: 'align-left', + text: this.$t('copy-content'), + action: this.copyContent }], [{ icon: 'link', text: this.$t('copy-link'), @@ -81,6 +85,10 @@ export default Vue.extend({ this.$router.push(`/notes/${this.note.id}`); }, + copyContent() { + copyToClipboard(this.note.text); + }, + copyLink() { copyToClipboard(`${url}/notes/${this.note.id}`); }, diff --git a/src/client/app/init.ts b/src/client/app/init.ts index c9d6fa4737..cbd49b3690 100644 --- a/src/client/app/init.ts +++ b/src/client/app/init.ts @@ -124,6 +124,7 @@ import { faMapMarker, faRobot, faHourglassHalf, + faAlignLeft } from '@fortawesome/free-solid-svg-icons'; import { @@ -255,6 +256,7 @@ library.add( faMapMarker, faRobot, faHourglassHalf, + faAlignLeft, farBell, farEnvelope,