client: add button to unrenote

Changelog: Added
This commit is contained in:
Johann150 2022-12-15 17:52:19 +01:00
parent 16d091497a
commit 84d83d908a
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 18 additions and 0 deletions

View file

@ -96,6 +96,8 @@ unfollow: "Unfollow"
followRequestPending: "Follow request pending" followRequestPending: "Follow request pending"
renote: "Renote" renote: "Renote"
unrenote: "Take back renote" unrenote: "Take back renote"
unrenoteAll: "Take back all renotes"
unrenoteAllConfirm: "Are you sure that you want to take back all renotes of this note?"
quote: "Quote" quote: "Quote"
pinnedNote: "Pinned note" pinnedNote: "Pinned note"
you: "You" you: "You"

View file

@ -61,6 +61,22 @@ function renote(viaKeyboard = false): void {
visibility: props.note.visibility, visibility: props.note.visibility,
}); });
}, },
}, {
text: i18n.ts.unrenoteAll,
icon: 'fas fa-trash-alt',
danger: true,
action: () => {
os.confirm({
type: 'warning',
text: i18n.ts.unrenoteAllConfirm,
}).then(({ canceled }) => {
if (canceled) return;
os.api('notes/unrenote', {
noteId: props.note.id,
});
});
},
}, { }, {
text: i18n.ts.quote, text: i18n.ts.quote,
icon: 'fas fa-quote-right', icon: 'fas fa-quote-right',