diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-09-01 09:42:25 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-09-01 09:42:25 +0900 |
| commit | 2a235151ed411b657ead0142d14da9a14e2f7105 (patch) | |
| tree | 44043129311fbf2c0ec139fc2c5fe0da783a6ba8 /src/client | |
| parent | Fix bug (diff) | |
| download | misskey-2a235151ed411b657ead0142d14da9a14e2f7105.tar.gz misskey-2a235151ed411b657ead0142d14da9a14e2f7105.tar.bz2 misskey-2a235151ed411b657ead0142d14da9a14e2f7105.zip | |
#2236 #2237
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/common/views/components/note-menu.vue | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index 27a49a6536..0b0609ac4e 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -6,17 +6,27 @@ <script lang="ts"> import Vue from 'vue'; +import { url } from '../../../config'; +import copyToClipboard from '../../../common/scripts/copy-to-clipboard'; export default Vue.extend({ props: ['note', 'source', 'compact'], computed: { items() { - const items = []; - items.push({ + const items = [{ + icon: '%fa:info-circle%', + text: '%i18n:@detail%', + action: this.detail + }, { + icon: '%fa:link%', + text: '%i18n:@copy-link%', + action: this.copyLink + }, null, { icon: '%fa:star%', text: '%i18n:@favorite%', action: this.favorite - }); + }]; + if (this.note.userId == this.$store.state.i.id) { items.push({ icon: '%fa:thumbtack%', @@ -42,6 +52,14 @@ export default Vue.extend({ } }, methods: { + detail() { + this.$router.push(`/notes/${ this.note.id }`); + }, + + copyLink() { + copyToClipboard(`${url}/notes/${ this.note.id }`); + }, + pin() { (this as any).api('i/pin', { noteId: this.note.id |