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:
@@ -14,7 +14,6 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { searchStations } from '@/lib/stations-lookup';
|
||||
import type { PermeabilityCase } from '@/lib/internal-pressure';
|
||||
import { Settings2 } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
@@ -29,16 +28,11 @@ export function GlobalWindSettingsModal() {
|
||||
s2,
|
||||
vk,
|
||||
q,
|
||||
permeabilityCase,
|
||||
cpiRatio,
|
||||
cpi,
|
||||
setV0,
|
||||
setS1,
|
||||
setS3,
|
||||
setS3Group,
|
||||
setTerrainCategory,
|
||||
setPermeabilityCase,
|
||||
setCpiRatio,
|
||||
} = useWindStore();
|
||||
|
||||
const [stationQuery, setStationQuery] = useState('');
|
||||
@@ -63,7 +57,6 @@ export function GlobalWindSettingsModal() {
|
||||
<Tabs defaultValue="norma" className="w-full mt-2 min-w-0">
|
||||
<TabsList className="flex w-full mb-4 bg-muted p-1 text-xs min-w-0">
|
||||
<TabsTrigger value="norma" className="text-xs py-1 px-1.5 flex-1">NBR 6123</TabsTrigger>
|
||||
<TabsTrigger value="cpi" className="text-xs py-1 px-1.5 flex-1">Cpi</TabsTrigger>
|
||||
<TabsTrigger value="local" className="text-xs py-1 px-1.5 flex-1">Local</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
@@ -133,46 +126,6 @@ export function GlobalWindSettingsModal() {
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="cpi" className="space-y-4 min-w-0">
|
||||
<div className="space-y-1">
|
||||
<label className="text-xs font-medium text-foreground">Caso de Permeabilidade</label>
|
||||
<Select value={permeabilityCase} onValueChange={(val) => setPermeabilityCase(val as PermeabilityCase)}>
|
||||
<SelectTrigger className="w-full text-xs h-8"><SelectValue placeholder="Selecione" /></SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="two-opposite-permeable">Duas faces opostas permeáveis</SelectItem>
|
||||
<SelectItem value="four-equally-permeable">Quatro faces igualmente permeáveis</SelectItem>
|
||||
<SelectItem value="dominant-windward">Abertura dominante — barlavento</SelectItem>
|
||||
<SelectItem value="dominant-leeward">Abertura dominante — sotavento</SelectItem>
|
||||
<SelectItem value="dominant-lateral">Abertura dominante — lateral</SelectItem>
|
||||
<SelectItem value="airtight">Edificação estanque</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
{(permeabilityCase === 'dominant-windward' || permeabilityCase === 'dominant-lateral') && (
|
||||
<div className="space-y-2 mt-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<label className="text-xs font-medium text-foreground">Razão de áreas</label>
|
||||
<span className="text-xs text-muted-foreground font-mono">{cpiRatio.toFixed(2)}</span>
|
||||
</div>
|
||||
<Slider min={0.1} max={5} step={0.05} value={[cpiRatio]} onValueChange={(vals) => setCpiRatio(vals[0])} className="py-1 cursor-pointer" />
|
||||
<p className="text-[10px] leading-tight text-muted-foreground">
|
||||
Razão entre a área da abertura dominante e a área total das demais aberturas em faces com sucção externa.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="rounded-md border bg-muted/40 p-2 mt-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-xs font-medium">Cpi calculado:</span>
|
||||
<Badge variant="default" className="font-mono text-sm">{cpi.toFixed(2)}</Badge>
|
||||
</div>
|
||||
<p className="text-[10px] leading-tight text-muted-foreground mt-1">
|
||||
Limitado a ±0,9 conforme norma. A pressão final usada é p = q · (Cpe − Cpi).
|
||||
</p>
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="local" className="space-y-3 min-w-0">
|
||||
<div className="space-y-2">
|
||||
<Input
|
||||
|
||||
Reference in New Issue
Block a user