mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 17:03:09 +02:00
Feat: リモートユーザーの更新をできるように (#12172)
* Feat: リモートユーザーの更新をできるように Signed-off-by: mattyatea <mattyacocacora0@gmail.com> * Update packages/frontend/src/scripts/get-user-menu.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * Update packages/frontend/src/scripts/get-user-menu.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> --------- Signed-off-by: mattyatea <mattyacocacora0@gmail.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
0fc36d11d7
commit
2da55f70a7
1 changed files with 14 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue