diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-02 18:39:22 -0500 |
| commit | 24734d408700a72d45c3ff4a679606cab3ec544f (patch) | |
| tree | d0fee0bcf508f3c631f7c26724bb5cd94dfc88a0 /packages/frontend/src/utility/get-user-menu.ts | |
| parent | merge: Release/2025.4.5 (!1258) (diff) | |
| download | sharkey-stable.tar.gz sharkey-stable.tar.bz2 sharkey-stable.zip | |
split url into webUrl and localUrl (like mastodon)stable
Diffstat (limited to 'packages/frontend/src/utility/get-user-menu.ts')
| -rw-r--r-- | packages/frontend/src/utility/get-user-menu.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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`); }, }); |