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/MkFollowButton.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/MkFollowButton.vue')
| -rw-r--r-- | packages/frontend/src/components/MkFollowButton.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkFollowButton.vue b/packages/frontend/src/components/MkFollowButton.vue index ea76950c0d..d8ac8024b4 100644 --- a/packages/frontend/src/components/MkFollowButton.vue +++ b/packages/frontend/src/components/MkFollowButton.vue @@ -42,6 +42,8 @@ import { misskeyApi } from '@/scripts/misskey-api.js'; import { useStream } from '@/stream.js'; import { i18n } from '@/i18n.js'; import { claimAchievement } from '@/scripts/achievements.js'; +import { pleaseLogin } from '@/scripts/please-login.js'; +import { host } from '@/config.js'; import { $i } from '@/account.js'; import { defaultStore } from '@/store.js'; @@ -63,7 +65,7 @@ const hasPendingFollowRequestFromYou = ref(props.user.hasPendingFollowRequestFro const wait = ref(false); const connection = useStream().useChannel('main'); -if (props.user.isFollowing == null) { +if (props.user.isFollowing == null && $i) { misskeyApi('users/show', { userId: props.user.id, }) @@ -78,6 +80,8 @@ function onFollowChange(user: Misskey.entities.UserDetailed) { } async function onClick() { + pleaseLogin(undefined, { type: 'web', path: `/@${props.user.username}@${props.user.host ?? host}` }); + wait.value = true; try { |