merge: upstream

This commit is contained in:
Marie 2024-02-03 20:19:44 +01:00
commit 11628e4b6a
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
285 changed files with 3413 additions and 1913 deletions

View file

@ -15,7 +15,7 @@ import { defaultStore, userActions } from '@/store.js';
import { $i, iAmModerator } from '@/account.js';
import { IRouter } from '@/nirax.js';
import { antennasCache, rolesCache, userListsCache } from '@/cache.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter = mainRouter) {
const meId = $i ? $i.id : null;
@ -170,20 +170,21 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter
action: () => {
copyToClipboard(`${user.host ?? host}/@${user.username}.atom`);
},
}, {
}, ...(user.host != null && user.url != null ? [{
icon: 'ph-share ph-bold ph-lg',
text: i18n.ts.showOnRemote,
action: () => {
if (user.url == null) return;
window.open(user.url, '_blank', 'noopener');
},
}] : []), {
icon: 'ph-share-network ph-bold ph-lg',
text: i18n.ts.copyProfileUrl,
action: () => {
const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${toUnicode(user.host)}`;
copyToClipboard(`${url}/${canonical}`);
},
}, ...(user.host ? [{
icon: 'ph-share ph-bold ph-lg',
text: i18n.ts.openRemoteProfile,
action: () => {
open(`${user.uri}`, '_blank');
},
}] : []), {
}, {
icon: 'ph-envelope ph-bold ph-lg',
text: i18n.ts.sendMessage,
action: () => {