diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 797bcda320..a2b3a27195 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -25,6 +25,7 @@ - 클라이언트: UI 애니메이션 줄이기 옵션이 활성화된 경우 새 노트 알림의 애니메이션을 비활성화함 - 클라이언트: 노트를 작성할 때, 단축키로 공개 범위를 전환할 수 있음 - 클라이언트: 계정 전환 모달에 새로고침 버튼 추가 +- 클라이언트: 작성한 노트를 복사 후 편집할 수 있는 기능 추가 ### Bugfixes - 클라이언트: (friendly) 타임라인이 아닌 페이지에서 헤더에 블러가 적용되는 문제 diff --git a/locales/en-US.yml b/locales/en-US.yml index 3ce23831c3..aaade8e6e1 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -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" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index a5d7964357..e7d939603d 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -55,6 +55,8 @@ copyLink: "リンクをコピー" delete: "削除" deleteAndEdit: "削除して編集" deleteAndEditConfirm: "このノートを削除してもう一度編集しますか?このノートへのリアクション、Renote、返信も全て削除されます。" +copyAndEdit: "コピーして編集" +copyAndEditConfirm: "このノートをコピーして編集しましょうか?ノートに含まれているメディアも一緒にコピーされます。" addToList: "リストに追加" sendMessage: "メッセージを送信" copyRSS: "RSSをコピー" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index bb0800b518..05e98b6805 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -55,6 +55,8 @@ copyLink: "링크 복사" delete: "삭제" deleteAndEdit: "삭제 후 편집" deleteAndEditConfirm: "이 노트를 삭제한 뒤 다시 편집할까요? 이 노트에 달린 리액션, 리노트, 그리고 답글이 모두 삭제돼요!" +copyAndEdit: "복사 후 편집" +copyAndEditConfirm: "이 노트를 복사하고 편집할까요? 노트에 포함된 미디어도 같이 복사돼요!" addToList: "리스트에 추가" sendMessage: "메시지 보내기" copyRSS: "RSS 복사" diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index b5d2251d28..26ead5c7c5 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -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,