summaryrefslogtreecommitdiff
path: root/src/client/components/note.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-08 17:36:23 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-08 17:36:23 +0900
commit2d74f0507b05bc422d09199171864fcc74bb3a47 (patch)
tree52328a46f5e5b3372db65ad95043330a1a8e81f9 /src/client/components/note.vue
parentwip (diff)
downloadsharkey-2d74f0507b05bc422d09199171864fcc74bb3a47.tar.gz
sharkey-2d74f0507b05bc422d09199171864fcc74bb3a47.tar.bz2
sharkey-2d74f0507b05bc422d09199171864fcc74bb3a47.zip
:art:
Diffstat (limited to 'src/client/components/note.vue')
-rw-r--r--src/client/components/note.vue25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index ebec56560a..74fdfa4153 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -83,7 +83,7 @@
<script lang="ts">
import Vue from 'vue';
-import { faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
+import { faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faTrashAlt, faQuoteRight } from '@fortawesome/free-solid-svg-icons';
import { parse } from '../../mfm/parse';
import { sum, unique } from '../../prelude/array';
import i18n from '../i18n';
@@ -97,7 +97,6 @@ import XPoll from './poll.vue';
import XUrlPreview from './url-preview.vue';
import MkNoteMenu from './note-menu.vue';
import MkReactionPicker from './reaction-picker.vue';
-import MkRenotePicker from './renote-picker.vue';
import pleaseLogin from '../scripts/please-login';
function focus(el, fn) {
@@ -379,10 +378,26 @@ export default Vue.extend({
renote() {
pleaseLogin(this.$root);
this.blur();
- this.$root.new(MkRenotePicker, {
+ this.$root.menu({
+ items: [{
+ text: this.$t('renote'),
+ icon: faRetweet,
+ action: () => {
+ (this as any).$root.api('notes/create', {
+ renoteId: this.appearNote.id
+ });
+ }
+ }, {
+ text: this.$t('quote'),
+ icon: faQuoteRight,
+ action: () => {
+ this.$root.post({
+ renote: this.appearNote,
+ });
+ }
+ }]
source: this.$refs.renoteButton,
- note: this.appearNote,
- }).$once('closed', this.focus);
+ }).then(this.focus);
},
renoteDirectly() {