fix: implement option A for Cpi, adjust LLM config fields stack layout on mobile, update main icons, and fix tests

This commit is contained in:
2026-07-10 14:43:01 +00:00
parent 8a357022c4
commit 892409cee3
5 changed files with 56 additions and 57 deletions
+50 -8
View File
@@ -11,8 +11,8 @@ import DynamicsModule from './pages/DynamicsModule';
import SettingsModule from './pages/SettingsModule';
import TowerModule from './pages/TowerModule';
import {
Wind, Home, Settings, Menu, Cylinder, Church, CircleDot,
Square, Layers, BarChart3, Activity, Building2,
Home, Settings, Menu, Cylinder, Church, CircleDot,
Square, Layers, BarChart3, Activity, Warehouse,
} from 'lucide-react';
import { useState } from 'react';
import { cn } from '@/lib/utils';
@@ -22,6 +22,48 @@ import { useI18n } from './store/i18nStore';
import LanguageSwitcher from './components/LanguageSwitcher';
import { GlobalWindSettingsModal } from './components/GlobalWindSettingsModal';
// Ícones Customizados de Engenharia Premium
const BridgeIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={props.className}
>
<path d="M3 11h18" />
<path d="M3 16h18" />
<path d="M6 11v5" />
<path d="M12 11v5" />
<path d="M18 11v5" />
<path d="M3 11c3-3 5-3 9-3s6 0 9 3" />
</svg>
);
const TowerIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={props.className}
>
<path d="M9 22L11 2h2l2 20" />
<path d="M10 7h4" />
<path d="M9.5 12h5" />
<path d="M9 17h6" />
<path d="M9 22h6" />
<path d="M11 2l4 5M13 2l-4 5" />
<path d="M11 7l4 5M13 7l-4 5" />
<path d="M10 12l5 5M14 12l-5 5" />
<path d="M9.5 17l5.5 5M14.5 17l-5.5 5" />
</svg>
);
function AppLayout({ children }: { children: React.ReactNode }) {
const location = useLocation();
const [isCollapsed, setIsCollapsed] = useState(false);
@@ -29,15 +71,15 @@ function AppLayout({ children }: { children: React.ReactNode }) {
const navItems = [
{ path: '/', icon: <Home className="w-5 h-5" />, labelKey: 'nav_home' as const },
{ path: '/galpao', icon: <Wind className="w-5 h-5" />, labelKey: 'nav_warehouse' as const },
{ path: '/galpao', icon: <Warehouse className="w-5 h-5" />, labelKey: 'nav_warehouse' as const },
{ path: '/cilindro', icon: <Cylinder className="w-5 h-5" />, labelKey: 'nav_cylinder' as const },
{ path: '/abobada', icon: <Church className="w-5 h-5" />, labelKey: 'nav_vault' as const },
{ path: '/cupula', icon: <CircleDot className="w-5 h-5" />, labelKey: 'nav_dome' as const },
{ path: '/muros', icon: <Square className="w-5 h-5" />, labelKey: 'nav_sign' as const },
{ path: '/cobertura-isolada', icon: <Layers className="w-5 h-5" />, labelKey: 'nav_isolated_roof' as const },
{ path: '/barras', icon: <BarChart3 className="w-5 h-5" />, labelKey: 'nav_bar' as const },
{ path: '/pontes', icon: <Activity className="w-5 h-5" />, labelKey: 'nav_bridge' as const },
{ path: '/torre', icon: <Building2 className="w-5 h-5" />, labelKey: 'nav_tower' as const },
{ path: '/pontes', icon: <BridgeIcon className="w-5 h-5" />, labelKey: 'nav_bridge' as const },
{ path: '/torre', icon: <TowerIcon className="w-5 h-5" />, labelKey: 'nav_tower' as const },
{ path: '/dinamica', icon: <Activity className="w-5 h-5" />, labelKey: 'nav_dynamics' as const },
{ path: '/settings', icon: <Settings className="w-5 h-5" />, labelKey: 'nav_settings' as const },
];
@@ -177,15 +219,15 @@ function AppLayout({ children }: { children: React.ReactNode }) {
function HomeMock() {
const { t } = useI18n();
const modules = [
{ to: '/galpao', icon: Wind, label: 'Galpão Retangular', desc: 'Paredes A/B/C/D, telhados E-J, excentricidade, atrito, alta turbulência.' },
{ to: '/galpao', icon: Warehouse, label: 'Galpão Retangular', desc: 'Paredes A/B/C/D, telhados E-J, excentricidade, atrito, alta turbulência.' },
{ to: '/cilindro', icon: Cylinder, label: 'Cilindro Vertical', desc: 'Silos, reservatórios, chaminés. Cpe por ângulo (Tab. 13), Reynolds.' },
{ to: '/abobada', icon: Church, label: 'Abóbada Cilíndrica', desc: 'Coberturas curvas em arco. Tab. 15-20, 6 zonas.' },
{ to: '/cupula', icon: CircleDot, label: 'Cúpula', desc: 'Sobre terreno (Tab. 21) ou parede cilíndrica (Tab. 22).' },
{ to: '/muros', icon: Square, label: 'Muros e Placas', desc: 'Cf para vento perpendicular e oblíquo (Tab. 23).' },
{ to: '/cobertura-isolada', icon: Layers, label: 'Coberturas Isoladas', desc: 'Uma ou duas águas, abas perpendiculares (Tab. 24-25).' },
{ to: '/barras', icon: BarChart3, label: 'Barras Prismáticas', desc: 'Faces planas (Tab. 26) ou circulares (Tab. 27).' },
{ to: '/pontes', icon: Activity, label: 'Pontes', desc: 'Pse, Cx/Cz do tabuleiro, flutter, galope (sec. 11).' },
{ to: '/torre', icon: Building2, label: 'Torres', desc: 'Torres treliçadas e mastros (sec. 8.4).' },
{ to: '/pontes', icon: BridgeIcon, label: 'Pontes', desc: 'Pse, Cx/Cz do tabuleiro, flutter, galope (sec. 11).' },
{ to: '/torre', icon: TowerIcon, label: 'Torres', desc: 'Torres treliçadas e mastros (sec. 8.4).' },
];
return (