From 93b7d69c154779967c9bda900fed3e243c47384f Mon Sep 17 00:00:00 2001 From: Jarsen <31397967+Jarsen136@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:27:02 +0200 Subject: [PATCH 1/3] fix: Create profile when not connected --- components/profile/ProfileDetail.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/profile/ProfileDetail.vue b/components/profile/ProfileDetail.vue index e07591ef99..be368fb07a 100644 --- a/components/profile/ProfileDetail.vue +++ b/components/profile/ProfileDetail.vue @@ -472,7 +472,7 @@ const createProfileConfig: ButtonConfig = { variant: 'k-accent', } -const followConfig: ButtonConfig = { +const followConfig: ComputedRef = computed(() => ({ label: $i18n.t('profile.follow'), icon: 'plus', disabled: !accountId.value, @@ -487,13 +487,13 @@ const followConfig: ButtonConfig = { showFollowing.value = isFollowingThisAccount.value || false }, classes: 'hover:!bg-transparent', -} +})) const followingConfig: ButtonConfig = { label: $i18n.t('profile.following'), } -const unfollowConfig: ButtonConfig = { +const unfollowConfig: ComputedRef = computed(() => ({ label: $i18n.t('profile.unfollow'), onClick: () => { unfollow({ @@ -502,7 +502,7 @@ const unfollowConfig: ButtonConfig = { }).then(refresh) }, classes: 'hover:!border-k-red', -} +})) const buttonRef = ref(null) const showFollowing = ref(false) @@ -556,7 +556,9 @@ const buttonConfig = computed((): ButtonConfig => { ) { return { ...followingConfig, active: isHovered.value } } - return isFollowingThisAccount.value ? unfollowConfig : followConfig + return isFollowingThisAccount.value + ? unfollowConfig.value + : followConfig.value }) const switchToTab = (tab: ProfileTab) => { From de418868907d86f74e84cca0149a1ed0cf409c62 Mon Sep 17 00:00:00 2001 From: Jarsen <31397967+Jarsen136@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:20:56 +0200 Subject: [PATCH 2/3] Update components/profile/ProfileDetail.vue Co-authored-by: Hassnian <44554284+hassnian@users.noreply.github.com> --- components/profile/ProfileDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/profile/ProfileDetail.vue b/components/profile/ProfileDetail.vue index be368fb07a..b37cff2ac1 100644 --- a/components/profile/ProfileDetail.vue +++ b/components/profile/ProfileDetail.vue @@ -493,7 +493,7 @@ const followingConfig: ButtonConfig = { label: $i18n.t('profile.following'), } -const unfollowConfig: ComputedRef = computed(() => ({ +const unfollowConfig = computed(() => ({ label: $i18n.t('profile.unfollow'), onClick: () => { unfollow({ From 1a6fbbf768a9e7ba7b53ceeb8b29910c77f8feb7 Mon Sep 17 00:00:00 2001 From: Jarsen <31397967+Jarsen136@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:21:05 +0200 Subject: [PATCH 3/3] Update components/profile/ProfileDetail.vue Co-authored-by: Hassnian <44554284+hassnian@users.noreply.github.com> --- components/profile/ProfileDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/profile/ProfileDetail.vue b/components/profile/ProfileDetail.vue index b37cff2ac1..7d32ded0a5 100644 --- a/components/profile/ProfileDetail.vue +++ b/components/profile/ProfileDetail.vue @@ -472,7 +472,7 @@ const createProfileConfig: ButtonConfig = { variant: 'k-accent', } -const followConfig: ComputedRef = computed(() => ({ +const followConfig = computed(() => ({ label: $i18n.t('profile.follow'), icon: 'plus', disabled: !accountId.value,