Skip to content
Snippets Groups Projects
Commit ee5b4173 authored by syuilo's avatar syuilo
Browse files

tweak

parent 2f48d109
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,7 @@ import { useTooltip } from '@/scripts/use-tooltip';
import { claimAchievement } from '@/scripts/achievements';
import { getNoteSummary } from '@/scripts/get-note-summary';
import { shownNoteIds } from '@/os';
import { MenuItem } from '@/types/menu';
const props = defineProps<{
note: misskey.entities.Note;
......@@ -248,7 +249,7 @@ useTooltip(renoteButton, async (showing) => {
function renote(viaKeyboard = false) {
pleaseLogin();
let items = [];
let items = [] as MenuItem[];
if (appearNote.channel) {
items = items.concat([{
......
......@@ -160,6 +160,7 @@ import { useNoteCapture } from '@/scripts/use-note-capture';
import { deepClone } from '@/scripts/clone';
import { useTooltip } from '@/scripts/use-tooltip';
import { claimAchievement } from '@/scripts/achievements';
import { MenuItem } from '@/types/menu';
const props = defineProps<{
note: misskey.entities.Note;
......@@ -241,7 +242,32 @@ useTooltip(renoteButton, async (showing) => {
function renote(viaKeyboard = false) {
pleaseLogin();
os.popupMenu([{
let items = [] as MenuItem[];
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: () => {
......@@ -257,7 +283,9 @@ function renote(viaKeyboard = false) {
renote: appearNote,
});
},
}], renoteButton.value, {
}]);
os.popupMenu(items, renoteButton.value, {
viaKeyboard,
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment