Skip to content

Commit

Permalink
enhance(frontend): 노트 메뉴에 '새 탭에서 열기' 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed May 19, 2024
1 parent 03d04a1 commit 8c298fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE
- Change: '타임라인에 다른 사람에게 보내는 답글을 포함'의 기본값을 비활성으로 설정

### Client
- Enhance: 노트 메뉴에 '새 탭에서 열기' 추가
- Fix: (Friendly) 타임라인 헤더와 알림 영역의 헤더 타이틀이 잘못 표시될 수 있음 (kokonect-link/cherrypick#461)
- Fix: (Friendly) 윈도우 크기를 조정하면 타임라인 탭의 하이라이트가 잘못된 위치에 표시될 수 있음 (kokonect-link/cherrypick#415)
- Fix: (Friendly) 일부 페이지에서 알림 영역의 디자인이 잘못 표시될 수 있음
Expand Down
8 changes: 8 additions & 0 deletions packages/frontend/src/scripts/get-note-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ export function getNoteMenu(props: {
os.toast(i18n.ts.copiedLink, 'copied');
}

function openInNewTab(): void {
window.open(`${url}/notes/${appearNote.id}`, '_blank', 'noopener');
}

function togglePin(pin: boolean): void {
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
noteId: appearNote.id,
Expand Down Expand Up @@ -386,6 +390,10 @@ export function getNoteMenu(props: {
icon: 'ti ti-copy',
text: i18n.ts.copyContent,
action: copyContent,
}, {
icon: 'ti ti-external-link',
text: i18n.ts.openInNewTab,
action: openInNewTab,
},
$i && $i.policies.canUseTranslator && instance.translatorAvailable ? {
icon: 'ti ti-language-hiragana',
Expand Down

0 comments on commit 8c298fd

Please sign in to comment.