Skip to content

Commit c7fe63f

Browse files
feat: general icon when both services are connected
1 parent ad49fa4 commit c7fe63f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/components/Header/AccountMenu.client.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ 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+
2124
/** Only show count of active (pending/approved/running) operations */
2225
const operationCount = computed(() => activeOperations.value.length)
2326
@@ -63,15 +66,15 @@ function openAuthModal() {
6366
>
6467
<span v-if="hasAnyConnection" class="flex items-center">
6568
<img
66-
v-if="isNpmConnected && npmAvatar"
69+
v-if="isNpmConnected && npmAvatar && !hasBothConnections"
6770
:src="npmAvatar"
6871
:alt="npmUser || $t('account_menu.npm_cli')"
6972
width="24"
7073
height="24"
7174
class="w-6 h-6 rounded-full ring-2 ring-bg object-cover"
7275
/>
7376
<img
74-
v-else-if="atprotoUser?.avatar"
77+
v-else-if="atprotoUser?.avatar && !hasBothConnections"
7578
:src="atprotoUser.avatar"
7679
:alt="atprotoUser.handle"
7780
width="24"

0 commit comments

Comments
 (0)