Skip to content

Commit 9254398

Browse files
refactor: simplify avatars checks
1 parent c7fe63f commit 9254398

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/components/Header/AccountMenu.client.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ const isOpen = shallowRef(false)
1818
/** Check if connected to at least one service */
1919
const hasAnyConnection = computed(() => isNpmConnected.value || !!atprotoUser.value)
2020
21-
/** Check if connected to both services */
22-
const hasBothConnections = computed(() => isNpmConnected.value && !!atprotoUser.value)
23-
2421
/** Only show count of active (pending/approved/running) operations */
2522
const operationCount = computed(() => activeOperations.value.length)
2623
@@ -66,15 +63,15 @@ function openAuthModal() {
6663
>
6764
<span v-if="hasAnyConnection" class="flex items-center">
6865
<img
69-
v-if="isNpmConnected && npmAvatar && !hasBothConnections"
66+
v-if="npmAvatar && !atprotoUser?.avatar"
7067
:src="npmAvatar"
7168
:alt="npmUser || $t('account_menu.npm_cli')"
7269
width="24"
7370
height="24"
7471
class="w-6 h-6 rounded-full ring-2 ring-bg object-cover"
7572
/>
7673
<img
77-
v-else-if="atprotoUser?.avatar && !hasBothConnections"
74+
v-else-if="atprotoUser?.avatar && !npmAvatar"
7875
:src="atprotoUser.avatar"
7976
:alt="atprotoUser.handle"
8077
width="24"

0 commit comments

Comments
 (0)