File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { useAtproto } from '~/composables/atproto/useAtproto'
44
55const isOpen = defineModel <boolean >(' open' , { default: false })
66
7- const { isConnected, npmUser, avatar : npmAvatar } = useConnector ()
7+ const { isConnected, isConnecting, npmUser, avatar : npmAvatar } = useConnector ()
88const { user : atprotoUser } = useAtproto ()
99
1010const 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"
You can’t perform that action at this time.
0 commit comments