diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-20 13:31:43 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-20 13:31:43 +0900 |
| commit | 4953842ff1c65fc850c856e11598e9901ff7c6e1 (patch) | |
| tree | f06129067250842ee44a975235a054cc27b3dc44 /src/client/app/common | |
| parent | :art: (diff) | |
| download | misskey-4953842ff1c65fc850c856e11598e9901ff7c6e1.tar.gz misskey-4953842ff1c65fc850c856e11598e9901ff7c6e1.tar.bz2 misskey-4953842ff1c65fc850c856e11598e9901ff7c6e1.zip | |
:v:
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/views/components/note-menu.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index 877d2c16bb..3e4be425d9 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -2,6 +2,7 @@ <div class="mk-note-menu"> <div class="backdrop" ref="backdrop" @click="close"></div> <div class="popover" :class="{ compact }" ref="popover"> + <button @click="favorite">%i18n:@favorite%</button> <button v-if="note.userId == os.i.id" @click="pin">%i18n:@pin%</button> <a v-if="note.uri" :href="note.uri" target="_blank">%i18n:@remote%</a> </div> @@ -58,6 +59,14 @@ export default Vue.extend({ }); }, + favorite() { + (this as any).api('notes/favorites/create', { + noteId: this.note.id + }).then(() => { + this.$destroy(); + }); + }, + close() { (this.$refs.backdrop as any).style.pointerEvents = 'none'; anime({ @@ -142,6 +151,7 @@ $border-color = rgba(27, 31, 35, 0.15) > a display block padding 8px 16px + width 100% &:hover color $theme-color-foreground |