enhance(client): ノートメニューからユーザーメニューを開けるように

Resolve #10019
This commit is contained in:
syuilo 2023-02-25 09:18:36 +09:00
parent 64be363adc
commit 5bea4feac8
2 changed files with 12 additions and 7 deletions

View file

@ -9,6 +9,7 @@ import copyToClipboard from '@/scripts/copy-to-clipboard';
import { url } from '@/config';
import { noteActions } from '@/store';
import { miLocalStorage } from '@/local-storage';
import { getUserMenu } from '@/scripts/get-user-menu';
export function getNoteMenu(props: {
note: misskey.entities.Note;
@ -284,6 +285,15 @@ export function getNoteMenu(props: {
text: i18n.ts.pin,
action: () => togglePin(true),
} : undefined,
appearNote.userId !== $i.id ? {
type: 'parent',
icon: 'ti ti-user',
text: i18n.ts.user,
children: async () => {
const user = await os.api('users/show', { userId: appearNote.userId });
return getUserMenu(user);
},
} : undefined,
/*
...($i.isModerator || $i.isAdmin ? [
null,