feat: can edit the note after copying it

This commit is contained in:
NoriDev 2023-02-08 19:30:38 +09:00
parent fa2b900ff3
commit 399863d806
5 changed files with 23 additions and 0 deletions

View file

@ -25,6 +25,7 @@
- 클라이언트: UI 애니메이션 줄이기 옵션이 활성화된 경우 새 노트 알림의 애니메이션을 비활성화함
- 클라이언트: 노트를 작성할 때, 단축키로 공개 범위를 전환할 수 있음
- 클라이언트: 계정 전환 모달에 새로고침 버튼 추가
- 클라이언트: 작성한 노트를 복사 후 편집할 수 있는 기능 추가
### Bugfixes
- 클라이언트: (friendly) 타임라인이 아닌 페이지에서 헤더에 블러가 적용되는 문제

View file

@ -55,6 +55,8 @@ copyLink: "Copy link"
delete: "Delete"
deleteAndEdit: "Delete and edit"
deleteAndEditConfirm: "Are you sure you want to delete this note and edit it? You will lose all reactions, renotes and replies to it."
copyAndEdit: "Copy and edit"
copyAndEditConfirm: "Are you sure you want to copy this note and edit it? The media included in the notes are also copied."
addToList: "Add to list"
sendMessage: "Send a message"
copyRSS: "Copy RSS"

View file

@ -55,6 +55,8 @@ copyLink: "リンクをコピー"
delete: "削除"
deleteAndEdit: "削除して編集"
deleteAndEditConfirm: "このートを削除してもう一度編集しますかこのートへのリアクション、Renote、返信も全て削除されます。"
copyAndEdit: "コピーして編集"
copyAndEditConfirm: "このノートをコピーして編集しましょうか?ノートに含まれているメディアも一緒にコピーされます。"
addToList: "リストに追加"
sendMessage: "メッセージを送信"
copyRSS: "RSSをコピー"

View file

@ -55,6 +55,8 @@ copyLink: "링크 복사"
delete: "삭제"
deleteAndEdit: "삭제 후 편집"
deleteAndEditConfirm: "이 노트를 삭제한 뒤 다시 편집할까요? 이 노트에 달린 리액션, 리노트, 그리고 답글이 모두 삭제돼요!"
copyAndEdit: "복사 후 편집"
copyAndEditConfirm: "이 노트를 복사하고 편집할까요? 노트에 포함된 미디어도 같이 복사돼요!"
addToList: "리스트에 추가"
sendMessage: "메시지 보내기"
copyRSS: "RSS 복사"

View file

@ -65,6 +65,17 @@ export function getNoteMenu(props: {
});
}
function copyEdit(): void {
os.confirm({
type: 'info',
text: i18n.ts.copyAndEditConfirm,
}).then(({ canceled }) => {
if (canceled) return;
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel });
});
}
function toggleFavorite(favorite: boolean): void {
claimAchievement('noteFavorited1');
os.apiWithDialog(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
@ -245,6 +256,11 @@ export function getNoteMenu(props: {
window.open(appearNote.url || appearNote.uri, '_blank');
},
} : undefined,
(appearNote.userId === $i.id) ? {
icon: 'ti ti-edit',
text: i18n.ts.copyAndEdit,
action: copyEdit,
} : undefined,
{
icon: 'ti ti-share',
text: i18n.ts.share,