From 9753cce4aa602957c08c253dd728d0d43318eb15 Mon Sep 17 00:00:00 2001 From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 27 Jan 2024 18:25:15 +0900 Subject: enhance(frontend): リモートのユーザーはメニューから直接リモートで表示できるように (#13087) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(frontend): リモートのユーザーはメニューから直接リモートで表示できるように * change changelog * Apply suggestions from code review Co-authored-by: syuilo --------- Co-authored-by: syuilo --- packages/frontend/src/scripts/get-user-menu.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'packages/frontend/src/scripts') diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index d9a52c3741..e2bd3d3a93 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -170,7 +170,14 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter action: () => { copyToClipboard(`${user.host ?? host}/@${user.username}.atom`); }, - }, { + }, ...(user.host != null && user.url != null ? [{ + icon: 'ti ti-external-link', + text: i18n.ts.showOnRemote, + action: () => { + if (user.url == null) return; + window.open(user.url, '_blank', 'noopener'); + }, + }] : []), { icon: 'ti ti-share', text: i18n.ts.copyProfileUrl, action: () => { -- cgit v1.2.3-freya