diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-07-14 15:27:52 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-14 15:27:52 +0900 |
| commit | 3c032dd5b917c97bf8fb1b87a69f36d56537f493 (patch) | |
| tree | dacd9e664ed11cc77a351a81d48c52c6f7116c61 /packages/frontend/src/components/MkNote.vue | |
| parent | enhance(frontend): サーバー情報・お問い合わせページを改修 ... (diff) | |
| download | sharkey-3c032dd5b917c97bf8fb1b87a69f36d56537f493.tar.gz sharkey-3c032dd5b917c97bf8fb1b87a69f36d56537f493.tar.bz2 sharkey-3c032dd5b917c97bf8fb1b87a69f36d56537f493.zip | |
enhance: 非ログイン時には別サーバーに遷移できるように (#13089)
* enhance: 非ログイン時にはMisskey Hub経由で別サーバーに遷移できるように
* fix
* サーバーサイド照会を削除
* クライアント側の照会動作
* hubを経由せずにリモートで続行できるように
* fix と pleaseLogin誘導箇所の追加
* fix
* fix
* Update CHANGELOG.md
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 420ff2c651..c518c7dd41 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -196,6 +196,7 @@ import { MenuItem } from '@/types/menu.js'; import MkRippleEffect from '@/components/MkRippleEffect.vue'; import { showMovedDialog } from '@/scripts/show-moved-dialog.js'; import { shouldCollapsed } from '@/scripts/collapsed.js'; +import { host } from '@/config.js'; import { isEnabledUrlPreview } from '@/instance.js'; import { type Keymap } from '@/scripts/hotkey.js'; import { focusPrev, focusNext } from '@/scripts/focus.js'; @@ -278,6 +279,11 @@ const renoteCollapsed = ref( ), ); +const pleaseLoginContext = { + type: 'lookup', + path: `https://${host}/notes/${appearNote.value.id}`, +} as const; + /* Overload FunctionにLintが対応していないのでコメントアウト function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: true): boolean; function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: false): boolean | 'sensitiveMute'; @@ -411,7 +417,7 @@ if (!props.mock) { } function renote(viaKeyboard = false) { - pleaseLogin(); + pleaseLogin(undefined, pleaseLoginContext); showMovedDialog(); const { menu } = getRenoteMenu({ note: note.value, renoteButton, mock: props.mock }); @@ -421,7 +427,7 @@ function renote(viaKeyboard = false) { } function reply(): void { - pleaseLogin(); + pleaseLogin(undefined, pleaseLoginContext); if (props.mock) { return; } @@ -434,7 +440,7 @@ function reply(): void { } function react(): void { - pleaseLogin(); + pleaseLogin(undefined, pleaseLoginContext); showMovedDialog(); if (appearNote.value.reactionAcceptance === 'likeOnly') { sound.playMisskeySfx('reaction'); @@ -565,7 +571,7 @@ function showRenoteMenu(): void { } if (isMyRenote) { - pleaseLogin(); + pleaseLogin(undefined, pleaseLoginContext); os.popupMenu([ getCopyNoteLinkMenu(note.value, i18n.ts.copyLinkRenote), { type: 'divider' }, |