Skip to content

Commit 255030a

Browse files
committed
fix(mobile-nav): make context label a visible back button in the bar
1 parent 669b90c commit 255030a

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

app/components/Header/MobileBottomBar.client.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
const { isOpen, activeView, toggle, close } = useMobileNav()
2+
const { isOpen, activeView, toggle, close, back } = useMobileNav()
33
const { open: openCommandPalette } = useCommandPalette()
44
const colorMode = useColorMode()
55
@@ -34,10 +34,19 @@ function handleThemeClick() {
3434
>
3535
<AppMark class="w-6 h-auto" />
3636
</NuxtLink>
37-
<div v-else class="flex items-center gap-2 flex-1 min-w-0">
38-
<AppMark class="w-6 h-auto flex-shrink-0" aria-hidden="true" />
37+
<button
38+
v-else
39+
type="button"
40+
class="flex items-center gap-2 flex-1 min-w-0 px-2 py-1 -mx-2 rounded-md hover:bg-bg-subtle transition-colors duration-200 text-start"
41+
:aria-label="$t('nav.back_to_main_menu')"
42+
@click="back"
43+
>
44+
<span
45+
class="i-lucide:arrow-left rtl-flip w-4 h-4 text-fg-muted flex-shrink-0"
46+
aria-hidden="true"
47+
/>
3948
<span class="font-mono text-sm text-fg truncate">{{ contextLabel }}</span>
40-
</div>
49+
</button>
4150

4251
<div v-if="!contextLabel" class="flex-1" />
4352

0 commit comments

Comments
 (0)