[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: search button disappears on homepage (#584)

Co-authored-by: Daniel Roe <daniel@roe.dev>

authored by

Matteo Gabriele
Daniel Roe
and committed by
GitHub
4801787f 7337dcbf

+4 -2
+4 -2
app/components/AppHeader.vue
··· 20 20 const searchBoxRef = shallowRef<{ focus: () => void } | null>(null) 21 21 22 22 // On search page, always show search expanded on mobile 23 + const isOnHomePage = computed(() => route.name === 'index') 23 24 const isOnSearchPage = computed(() => route.name === 'search') 24 25 const isSearchExpanded = computed(() => isOnSearchPage.value || isSearchExpandedManually.value) 25 26 ··· 96 97 <header class="sticky top-0 z-50 bg-bg/80 backdrop-blur-md border-b border-border"> 97 98 <nav 98 99 :aria-label="$t('nav.main_navigation')" 99 - class="container min-h-14 flex items-center justify-between gap-2" 100 + class="container min-h-14 flex items-center gap-2" 101 + :class="isOnHomePage ? 'justify-end' : 'justify-between'" 100 102 > 101 103 <!-- Mobile: Logo + search button (expands search, doesn't navigate) --> 102 104 <button 103 - v-if="!isSearchExpanded" 105 + v-if="!isSearchExpanded && !isOnHomePage" 104 106 type="button" 105 107 class="sm:hidden flex-shrink-0 inline-flex items-center gap-2 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring rounded" 106 108 :aria-label="$t('nav.tap_to_search')"