From ce93f8e0418b44dbb9e358cf1b3865b302a5a8b6 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Fri, 26 Jan 2024 21:46:27 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=83=AA=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=AF=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=81=8B=E3=82=89?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/get-user-menu.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index d9a52c3741..0ad4e520cc 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: () => {