From d31ae7c9c2de894873f0e1707d9ba9017c0329bd Mon Sep 17 00:00:00 2001 From: NoriDev Date: Mon, 18 Dec 2023 21:52:15 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=EB=82=B4=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=EC=97=90=EC=84=9C=20=EA=B0=84=ED=97=90=EC=A0=81?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=97=A4=EB=8D=94=EC=97=90=20MkFollowButt?= =?UTF-8?q?on=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EA=B0=80=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=EB=90=A0=20=EC=88=98=20=EC=9E=88=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + packages/frontend/src/components/MkFollowButton.vue | 5 ----- packages/frontend/src/components/global/CPPageHeader.vue | 8 +------- packages/frontend/src/components/global/MkPageHeader.vue | 8 +------- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index df43246fdb..8265cc3532 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -70,6 +70,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE - Fix: '모든 미디어 노트 간략화하기' 옵션을 활성화하면 미디어가 없는 노트가 잘려서 표시될 수 있음 - Fix: 모바일 환경에서 헤더 타이틀 부분을 터치할 때 영역이 강조되어 표시될 수 있음 - Fix: 서브 노트에서 액션 버튼의 클릭 가능 영역이 매우 작게 설정될 수 있음 +- Fix: 내 프로필에서 간헐적으로 헤더에 MkFollowButton 컴포넌트가 표시될 수 있음 ### Server - Enhance: (dev) 개발 모드에서 locale 및 유형 정의가 자동으로 재생성됨 (misskey-dev/misskey#12481) diff --git a/packages/frontend/src/components/MkFollowButton.vue b/packages/frontend/src/components/MkFollowButton.vue index 4865204985..80637867cf 100644 --- a/packages/frontend/src/components/MkFollowButton.vue +++ b/packages/frontend/src/components/MkFollowButton.vue @@ -53,12 +53,10 @@ import { i18n } from '@/i18n.js'; import { claimAchievement } from '@/scripts/achievements.js'; import { $i } from '@/account.js'; import { userName } from '@/filters/user.js'; -import { globalEvents } from '@/events.js'; import { vibrate } from '@/scripts/vibrate.js'; import { defaultStore } from '@/store.js'; import { useRouter } from '@/router.js'; -const showFollowButton = ref(false); const router = useRouter(); const props = withDefaults(defineProps<{ @@ -162,9 +160,6 @@ function editProfile() { onMounted(() => { connection.on('follow', onFollowChange); connection.on('unfollow', onFollowChange); - - showFollowButton.value = $i != null && $i.id !== props.user.id; - globalEvents.emit('showFollowButton', showFollowButton); }); onBeforeUnmount(() => { diff --git a/packages/frontend/src/components/global/CPPageHeader.vue b/packages/frontend/src/components/global/CPPageHeader.vue index 540ffe1666..ef95a74525 100644 --- a/packages/frontend/src/components/global/CPPageHeader.vue +++ b/packages/frontend/src/components/global/CPPageHeader.vue @@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -73,8 +73,6 @@ import { defaultStore } from '@/store.js'; import { PageHeaderItem } from '@/types/page-header.js'; import MkFollowButton from '@/components/MkFollowButton.vue'; -const showFollowButton = ref(false); - const isFriendly = ref(miLocalStorage.getItem('ui') === 'friendly'); const canBack = ref(['index', 'explore', 'my-notifications', 'messaging'].includes(mainRouter.currentRoute.value.name)); @@ -218,10 +216,6 @@ onMounted(() => { calcBg(); globalEvents.on('themeChanged', calcBg); - - globalEvents.on('showFollowButton', (showFollowButton_receive) => { - showFollowButton.value = showFollowButton_receive; - }); }); onUnmounted(() => { diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index 579735a3a3..d4512aa7c8 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -55,7 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -81,8 +81,6 @@ import { defaultStore } from '@/store.js'; import { PageHeaderItem } from '@/types/page-header.js'; import MkFollowButton from '@/components/MkFollowButton.vue'; -const showFollowButton = ref(false); - const isFriendly = ref(miLocalStorage.getItem('ui') === 'friendly'); const canBack = ref(['index', 'explore', 'my-notifications', 'messaging'].includes(mainRouter.currentRoute.value.name)); @@ -170,10 +168,6 @@ onMounted(() => { calcBg(); globalEvents.on('themeChanged', calcBg); - - globalEvents.on('showFollowButton', (showFollowButton_receive) => { - showFollowButton.value = showFollowButton_receive; - }); }); onUnmounted(() => {