feat: pakuru
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user