diff --git a/locales/en-US.yml b/locales/en-US.yml index 7f30959c1..28751cb7e 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -55,6 +55,7 @@ addToAntenna: "Add to antenna" sendMessage: "Send a message" copyRSS: "Copy RSS" copyUsername: "Copy username" +openRemoteProfile: "Open remote profile" copyUserId: "Copy user ID" copyNoteId: "Copy note ID" copyFileId: "Copy file ID" diff --git a/locales/index.d.ts b/locales/index.d.ts index 8356046a6..97fdd0f25 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -58,6 +58,7 @@ export interface Locale { "sendMessage": string; "copyRSS": string; "copyUsername": string; + "openRemoteProfile": string; "copyUserId": string; "copyNoteId": string; "copyFileId": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 25ee9b188..16d8d3169 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -55,6 +55,7 @@ addToAntenna: "アンテナに追加" sendMessage: "メッセージを送信" copyRSS: "RSSをコピー" copyUsername: "ユーザー名をコピー" +openRemoteProfile: "リモートプロファイルを開く" copyUserId: "ユーザーIDをコピー" copyNoteId: "ノートIDをコピー" copyFileId: "ファイルIDをコピー" diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index c8942314b..41d0df1b7 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -176,7 +176,13 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${toUnicode(user.host)}`; copyToClipboard(`${url}/${canonical}`); }, - }, { + }, ...(user.host ? [{ + icon: 'ph-share ph-bold ph-lg', + text: i18n.ts.openRemoteProfile, + action: () => { + open(`${user.uri}`, '_blank'); + }, + }] : []), { icon: 'ph-envelope ph-bold ph-lg', text: i18n.ts.sendMessage, action: () => {