diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-05 12:55:43 -0500 |
| commit | 587ab8500abb2d8b0a494dc05952c9919cc7f66f (patch) | |
| tree | 07f50e1153a029158baed106aa8367c9fa32cd7a /packages/frontend/src/utility/get-user-menu.ts | |
| parent | Merge pull request #17217 from misskey-dev/develop (diff) | |
| download | misskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.tar.gz misskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.tar.bz2 misskey-587ab8500abb2d8b0a494dc05952c9919cc7f66f.zip | |
split url into webUrl and localUrl (like mastodon)
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 9b2c53360c..fc77ec8e54 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'; @@ -171,7 +171,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}`); }, }); @@ -180,7 +180,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}`); }, }); @@ -188,7 +188,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`); }, }); |