From 24734d408700a72d45c3ff4a679606cab3ec544f Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 2 Mar 2026 16:05:12 -0500 Subject: split url into webUrl and localUrl (like mastodon) --- packages/frontend/src/utility/get-user-menu.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/frontend/src/utility/get-user-menu.ts') diff --git a/packages/frontend/src/utility/get-user-menu.ts b/packages/frontend/src/utility/get-user-menu.ts index fde390cece..e1a746b579 100644 --- a/packages/frontend/src/utility/get-user-menu.ts +++ b/packages/frontend/src/utility/get-user-menu.ts @@ -6,7 +6,7 @@ import { toUnicode } from 'punycode.js'; import { defineAsyncComponent, ref, watch } from 'vue'; import * as Misskey from 'misskey-js'; -import { host, url } from '@@/js/config.js'; +import { localHost, webUrl } from '@@/js/config.js'; import type { Router } from '@/router.js'; import type { MenuItem } from '@/types/menu.js'; import { i18n } from '@/i18n.js'; @@ -164,7 +164,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router icon: 'ti ti-at', text: i18n.ts.copyUsername, action: () => { - copyToClipboard(`@${user.username}@${user.host ?? host}`); + copyToClipboard(`@${user.username}@${user.host ?? localHost}`); }, }); @@ -173,7 +173,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router text: i18n.ts.copyProfileUrl, action: () => { const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${toUnicode(user.host)}`; - copyToClipboard(`${url}/${canonical}`); + copyToClipboard(`${webUrl}/${canonical}`); }, }); @@ -181,7 +181,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router icon: 'ti ti-rss', text: i18n.ts.copyRSS, action: () => { - copyToClipboard(`${user.host ?? host}/@${user.username}.atom`); + copyToClipboard(`${user.host ?? localHost}/@${user.username}.atom`); }, }); -- cgit v1.2.3-freya