From 2da55f70a71569d766044f255ff273184e739efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A6=E3=81=83?= =?UTF-8?q?=E3=83=BC?= <56515516+mattyatea@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:14:48 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AE=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=82=92=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20(#12172)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feat: リモートユーザーの更新をできるように Signed-off-by: mattyatea * Update packages/frontend/src/scripts/get-user-menu.ts Co-authored-by: syuilo * Update packages/frontend/src/scripts/get-user-menu.ts Co-authored-by: syuilo --------- Signed-off-by: mattyatea Co-authored-by: syuilo --- packages/frontend/src/scripts/get-user-menu.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index be514be5b..f62f73756 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -114,6 +114,12 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router return !confirm.canceled; } + async function userInfoUpdate() { + os.apiWithDialog('federation/update-remote-user', { + userId: user.id, + }); + } + async function invalidateFollow() { if (!await getConfirmed(i18n.ts.breakFollowConfirm)) return; @@ -330,6 +336,14 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router }]); } + if (user.host !== null) { + menu = menu.concat([null, { + icon: 'ti ti-refresh', + text: i18n.ts.updateRemoteUser, + action: userInfoUpdate, + }]); + } + if (defaultStore.state.devMode) { menu = menu.concat([null, { icon: 'ti ti-id',