feat: add mobile responsiveness support
- Hamburger menu + drawer sidebar for mobile navigation - Auto-collapse chat session list on mobile - Responsive grids, modals, forms, and settings - Touch-friendly nav items (44px targets) - Skills page sidebar toggle on mobile - Memory sections stack vertically on mobile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, computed, ref } from 'vue'
|
||||
import { onMounted, onUnmounted, computed, ref, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { NConfigProvider, NMessageProvider, NDialogProvider, NNotificationProvider } from 'naive-ui'
|
||||
import { themeOverrides } from '@/styles/theme'
|
||||
@@ -14,6 +14,11 @@ const ready = ref(false)
|
||||
|
||||
const isLoginPage = computed(() => route.name === 'login')
|
||||
|
||||
// Close mobile sidebar on route change
|
||||
watch(() => route.path, () => {
|
||||
appStore.closeSidebar()
|
||||
})
|
||||
|
||||
// Wait for router to resolve before rendering layout
|
||||
router.isReady().then(() => {
|
||||
ready.value = true
|
||||
@@ -39,6 +44,10 @@ useKeyboard()
|
||||
<NDialogProvider>
|
||||
<NNotificationProvider>
|
||||
<div v-if="ready" class="app-layout" :class="{ 'no-sidebar': isLoginPage }">
|
||||
<button v-if="!isLoginPage" class="hamburger-btn" @click="appStore.toggleSidebar">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
|
||||
</button>
|
||||
<div v-if="!isLoginPage && appStore.sidebarOpen" class="mobile-backdrop" @click="appStore.closeSidebar" />
|
||||
<AppSidebar v-if="!isLoginPage" />
|
||||
<main class="app-main">
|
||||
<router-view />
|
||||
|
||||
Reference in New Issue
Block a user