Skip to content

Commit 7dce377

Browse files
committed
chore: add missing connect to npm cli option in mobile version
1 parent d7bb811 commit 7dce377

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

app/components/Header/MobileMenu.client.vue

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useAtproto } from '~/composables/atproto/useAtproto'
44
55
const isOpen = defineModel<boolean>('open', { default: false })
66
7-
const { isConnected, npmUser, avatar: npmAvatar } = useConnector()
7+
const { isConnected, isConnecting, npmUser, avatar: npmAvatar } = useConnector()
88
const { user: atprotoUser } = useAtproto()
99
1010
const navRef = useTemplateRef('navRef')
@@ -255,6 +255,30 @@ onUnmounted(deactivate)
255255
<span class="w-2 h-2 rounded-full bg-green-500" aria-hidden="true" />
256256
</button>
257257

258+
<!-- Connect npm CLI button (show if not connected) -->
259+
<button
260+
v-else
261+
type="button"
262+
class="w-full flex items-center gap-3 px-3 py-3 rounded-md font-mono text-sm text-fg hover:bg-bg-subtle transition-colors duration-200 text-start"
263+
@click="handleShowConnector"
264+
>
265+
<span class="w-5 h-5 rounded-full bg-bg-muted flex items-center justify-center">
266+
<span
267+
v-if="isConnecting"
268+
class="i-carbon-circle-dash w-3 h-3 text-yellow-500 animate-spin"
269+
aria-hidden="true"
270+
/>
271+
<span v-else class="i-carbon-terminal w-3 h-3 text-fg-muted" aria-hidden="true" />
272+
</span>
273+
<span class="flex-1">
274+
{{
275+
isConnecting
276+
? $t('account_menu.connecting')
277+
: $t('account_menu.connect_npm_cli')
278+
}}
279+
</span>
280+
</button>
281+
258282
<!-- Atmosphere connection status -->
259283
<button
260284
v-if="atprotoUser"

0 commit comments

Comments
 (0)