feat: pakuru

This commit is contained in:
2022-09-12 01:23:19 +09:00
parent 9f6e6ac3c8
commit c56f8fd953
2 changed files with 23 additions and 0 deletions

View File

@ -26,6 +26,22 @@ export function getNoteMenu(props: {
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
function pakuru(): void {
os.confirm({
type: 'question',
text: i18n.ts.pakuruConfirm,
}).then(({ canceled }) => {
if (canceled) return;
const postData = {
text: appearNote.text,
cw: appearNote.cw ? appearNote.cw || '' : undefined,
localOnly: appearNote.localOnly,
visibility: appearNote.visibility,
}
os.api('notes/create', postData, undefined);
});
}
function del(): void {
os.confirm({
type: 'warning',
@ -205,6 +221,11 @@ export function getNoteMenu(props: {
action: unclip,
}, null] : []
),
{
icon: 'fas fa-copy',
text: i18n.ts.pakuru,
action: pakuru,
},
{
icon: 'fas fa-copy',
text: i18n.ts.copyContent,