diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-02 17:39:38 -0500 |
| commit | 284b87dae85a356dd543a03f81d12031b11f7554 (patch) | |
| tree | 5df602a3d98fbf9a8f457fab3d749707bfd89cde /packages/frontend/src/utility/get-note-menu.ts | |
| parent | merge: Release/2025.4.5 (!1258) (diff) | |
| download | sharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.gz sharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.bz2 sharkey-284b87dae85a356dd543a03f81d12031b11f7554.zip | |
split url into webUrl and localUrl (like mastodon)
Diffstat (limited to 'packages/frontend/src/utility/get-note-menu.ts')
| -rw-r--r-- | packages/frontend/src/utility/get-note-menu.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/utility/get-note-menu.ts b/packages/frontend/src/utility/get-note-menu.ts index 056480a7ef..0096ed68da 100644 --- a/packages/frontend/src/utility/get-note-menu.ts +++ b/packages/frontend/src/utility/get-note-menu.ts @@ -5,7 +5,7 @@ import { defineAsyncComponent } from 'vue'; import * as Misskey from 'misskey-js'; -import { url } from '@@/js/config.js'; +import { webUrl } from '@@/js/config.js'; import { claimAchievement } from './achievements.js'; import type { Ref, ShallowRef } from 'vue'; import type { MenuItem } from '@/types/menu.js'; @@ -137,7 +137,7 @@ export function getAbuseNoteMenu(note: Misskey.entities.Note, text: string): Men icon: 'ti ti-exclamation-circle', text, action: (): void => { - const localUrl = `${url}/notes/${note.id}`; + const localUrl = `${webUrl}/notes/${note.id}`; let noteInfo = ''; if (note.url ?? note.uri != null) noteInfo = `Note: ${note.url ?? note.uri}\n`; noteInfo += `Local Note: ${localUrl}\n`; @@ -156,7 +156,7 @@ export function getCopyNoteLinkMenu(note: Misskey.entities.Note, text: string): icon: 'ti ti-link', text, action: (): void => { - copyToClipboard(`${url}/notes/${note.id}`); + copyToClipboard(`${webUrl}/notes/${note.id}`); }, }; } @@ -282,7 +282,7 @@ export function getNoteMenu(props: { navigator.share({ title: i18n.tsx.noteOf({ user: appearNote.user.name ?? appearNote.user.username }), text: appearNote.text ?? '', - url: `${url}/notes/${appearNote.id}`, + url: `${webUrl}/notes/${appearNote.id}`, }); } |