Ajuste Layout, Dashboard Terapeuta, Timeline, Suporte técnico, Documentação e FAQ

This commit is contained in:
Leonardo
2026-03-15 19:46:06 -03:00
parent ee09b30987
commit f66f6f3fde
21 changed files with 24146 additions and 721 deletions
+19 -4
View File
@@ -6,7 +6,7 @@ function _loadVariant () {
const v = localStorage.getItem('layout_variant')
if (v === 'rail' || v === 'classic') return v
} catch {}
return 'classic'
return 'rail'
}
const layoutConfig = reactive({
@@ -31,7 +31,10 @@ const layoutState = reactive({
activePath: null,
// ── Layout 2 (rail) ─────────────────────────────────────
railSectionKey: null, // qual seção está ativa no rail
railPanelOpen: false // painel lateral expandido
railPanelOpen: false, // painel lateral expandido
// ── variant dirty: true quando o usuário mudou o variant
// mas ainda não salvou — impede que loadUserSettings reverta
_variantDirty: false
})
/**
@@ -75,12 +78,21 @@ export function useLayout () {
const isDesktop = () => window.innerWidth > 991
// breakpoint do botão hamburguer no Rail (≤ 1200px)
const isRailMobile = () => window.innerWidth <= 1200
const toggleMenu = () => {
// No Rail, o botão hamburguer (≤1200px) controla a sidebar mobile
if (layoutConfig.variant === 'rail') {
layoutState.mobileMenuActive = !layoutState.mobileMenuActive
return
}
// Layout clássico — comportamento original
if (isDesktop()) {
if (layoutConfig.menuMode === 'static') {
layoutState.staticMenuInactive = !layoutState.staticMenuInactive
}
if (layoutConfig.menuMode === 'overlay') {
layoutState.overlayMenuActive = !layoutState.overlayMenuActive
}
@@ -134,13 +146,15 @@ export function useLayout () {
layoutState.anchored = false
}
const setVariant = (v) => {
const setVariant = (v, { fromUser = true } = {}) => {
if (v !== 'classic' && v !== 'rail') return
layoutConfig.variant = v
try { localStorage.setItem('layout_variant', v) } catch {}
// reset rail state ao trocar
layoutState.railSectionKey = null
layoutState.railPanelOpen = false
// marca que o usuário fez uma escolha explícita (não restauração do DB)
if (fromUser) layoutState._variantDirty = true
}
const isDarkTheme = computed(() => layoutConfig.darkTheme)
@@ -158,6 +172,7 @@ export function useLayout () {
changeMenuMode,
setVariant,
isDesktop,
isRailMobile,
hasOpenOverlay
}
}