summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-02-12 10:59:22 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-02-12 10:59:22 +0900
commit2f48d109ddfc6a9f1e038b973d7011ee11bb4b16 (patch)
tree40bb75d287d55b047458e95d6511889ef1394b93 /packages/frontend/src/components
parent:art: (diff)
downloadmisskey-2f48d109ddfc6a9f1e038b973d7011ee11bb4b16.tar.gz
misskey-2f48d109ddfc6a9f1e038b973d7011ee11bb4b16.tar.bz2
misskey-2f48d109ddfc6a9f1e038b973d7011ee11bb4b16.zip
enhance(client): make possible to in-channel renote/quote
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkNote.vue31
1 files changed, 29 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 1bad32c4ac..f50a42ebaf 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -247,7 +247,32 @@ useTooltip(renoteButton, async (showing) => {
function renote(viaKeyboard = false) {
pleaseLogin();
- os.popupMenu([{
+
+ let items = [];
+
+ if (appearNote.channel) {
+ items = items.concat([{
+ text: i18n.ts.inChannelRenote,
+ icon: 'ti ti-repeat',
+ action: () => {
+ os.api('notes/create', {
+ renoteId: appearNote.id,
+ channelId: appearNote.channelId,
+ });
+ },
+ }, {
+ text: i18n.ts.inChannelQuote,
+ icon: 'ti ti-quote',
+ action: () => {
+ os.post({
+ renote: appearNote,
+ channel: appearNote.channel,
+ });
+ },
+ }, null]);
+ }
+
+ items = items.concat([{
text: i18n.ts.renote,
icon: 'ti ti-repeat',
action: () => {
@@ -263,7 +288,9 @@ function renote(viaKeyboard = false) {
renote: appearNote,
});
},
- }], renoteButton.value, {
+ }]);
+
+ os.popupMenu(items, renoteButton.value, {
viaKeyboard,
});
}