summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-01-27 18:25:15 +0900
committerGitHub <noreply@github.com>2024-01-27 18:25:15 +0900
commit9753cce4aa602957c08c253dd728d0d43318eb15 (patch)
treec620f73676c0a2e715f3f9f75c37dbe3b53f8c52 /packages/frontend/src/scripts
parentrefactor(frontend/MediaPlayer): cssの重複を削除 (#13094) (diff)
downloadmisskey-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.ts9
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: () => {