diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-01-27 18:25:15 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-27 18:25:15 +0900 |
| commit | 9753cce4aa602957c08c253dd728d0d43318eb15 (patch) | |
| tree | c620f73676c0a2e715f3f9f75c37dbe3b53f8c52 /packages/frontend/src/scripts | |
| parent | refactor(frontend/MediaPlayer): cssの重複を削除 (#13094) (diff) | |
| download | misskey-9753cce4aa602957c08c253dd728d0d43318eb15.tar.gz misskey-9753cce4aa602957c08c253dd728d0d43318eb15.tar.bz2 misskey-9753cce4aa602957c08c253dd728d0d43318eb15.zip | |
enhance(frontend): リモートのユーザーはメニューから直接リモートで表示できるように (#13087)
* enhance(frontend): リモートのユーザーはメニューから直接リモートで表示できるように
* change changelog
* Apply suggestions from code review
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
---------
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/get-user-menu.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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: () => { |