feat: note edit
This commit is contained in:
parent
a388e25f3e
commit
c106db89e1
16 changed files with 162 additions and 3 deletions
|
@ -172,6 +172,10 @@ export function getNoteMenu(props: {
|
|||
});
|
||||
}
|
||||
|
||||
function edit(): void {
|
||||
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel, updateMode: true });
|
||||
}
|
||||
|
||||
function toggleFavorite(favorite: boolean): void {
|
||||
claimAchievement('noteFavorited1');
|
||||
os.apiWithDialog(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
|
||||
|
@ -352,6 +356,11 @@ export function getNoteMenu(props: {
|
|||
),
|
||||
...(appearNote.userId === $i.id || $i.isModerator || $i.isAdmin ? [
|
||||
null,
|
||||
appearNote.userId === $i.id && $i.policies.canEditNote ? {
|
||||
icon: 'ti ti-edit',
|
||||
text: i18n.ts.edit,
|
||||
action: edit,
|
||||
} : undefined,
|
||||
appearNote.userId === $i.id ? {
|
||||
icon: 'ti ti-edit',
|
||||
text: i18n.ts.deleteAndEdit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue