diff --git a/apps/client/public/locales/en/translation.json b/apps/client/public/locales/en/translation.json index baa4ebf..6d91b31 100644 --- a/apps/client/public/locales/en/translation.json +++ b/apps/client/public/locales/en/translation.json @@ -242,6 +242,8 @@ "properties.curtainLeftOpen": "Left open", "properties.curtainRightOpen": "Right open", "properties.curtainFabricColor": "Fabric color", + "properties.outletCountStat": "Outlets", + "properties.switchCountStat": "Switches", "properties.outletWidth": "Outlet width", "properties.outletHeight": "Outlet height", "properties.outletCount": "Count", @@ -293,6 +295,7 @@ "electrical.junction": "Junction", "electrical.lights": "Lights", "electrical.cable": "Cable", + "electrical.wallCable": "Wall Cable", "furniture.title": "Furniture", "furniture.searchPlaceholder": "Search furniture\u2026", diff --git a/apps/client/public/locales/ru/translation.json b/apps/client/public/locales/ru/translation.json index 071a5e6..a93c7b1 100644 --- a/apps/client/public/locales/ru/translation.json +++ b/apps/client/public/locales/ru/translation.json @@ -245,6 +245,8 @@ "properties.curtainLeftOpen": "Левая створка", "properties.curtainRightOpen": "Правая створка", "properties.curtainFabricColor": "Цвет ткани", + "properties.outletCountStat": "Розетки", + "properties.switchCountStat": "Выключатели", "properties.outletWidth": "Ширина розетки", "properties.outletHeight": "Высота розетки", "properties.outletCount": "Количество", @@ -296,6 +298,7 @@ "electrical.junction": "Распределительная коробка", "electrical.lights": "Освещение", "electrical.cable": "Кабель", + "electrical.wallCable": "Кабель из стены", "furniture.title": "Мебель", "furniture.searchPlaceholder": "Поиск мебели\u2026", diff --git a/apps/client/src/components/editor/PropertiesPanel.tsx b/apps/client/src/components/editor/PropertiesPanel.tsx index f4af673..326e6de 100644 --- a/apps/client/src/components/editor/PropertiesPanel.tsx +++ b/apps/client/src/components/editor/PropertiesPanel.tsx @@ -151,6 +151,14 @@ export function PropertiesPanel() { )} + e.type === 'OUTLET').reduce((sum, e) => sum + Math.max(1, e.count), 0))} + /> + e.type === 'SWITCH').length)} + /> {/* Stretch ceiling drop (натяжной потолок). Stored in meters, edited in cm for ergonomics. 0 = disabled. */} ); })()} + {item.type === 'WALL_CABLE' && ( + <> + {/* Wall plate circle */} + + {/* Cable stub hanging down */} + + + )} {/* Fallback for other wall-mounted types */} - {item.type !== 'OUTLET' && item.type !== 'SWITCH' && item.type !== 'LIGHT_WALL' && ( + {item.type !== 'OUTLET' && item.type !== 'SWITCH' && item.type !== 'LIGHT_WALL' && item.type !== 'WALL_CABLE' && ( = { LIGHT_CEILING: '#fff8dc', LIGHT_WALL: '#fff8dc', CABLE_ROUTE: '#ff6b35', + WALL_CABLE: '#c0c0c0', }; const SELECTED_COLOR = '#6fa8dc'; @@ -375,6 +376,24 @@ function WallLightMesh({ color, style, cordLength, lampSize }: { } } +/** Wall cable: round plate on wall with a cable stub protruding into the room. */ +function WallCableMesh({ color }: { readonly color: string }) { + return ( + + {/* Wall plate */} + + + + + {/* Cable stub protruding from the wall */} + + + + + + ); +} + /** Cable route: small orange marker */ function CableRouteMesh({ color }: { readonly color: string }) { return ( @@ -513,6 +532,7 @@ export function ElectricalMeshWithHeight({ /> )} {item.type === 'CABLE_ROUTE' && } + {item.type === 'WALL_CABLE' && } ); } diff --git a/packages/shared/src/types/elements.ts b/packages/shared/src/types/elements.ts index 3f9ff7d..3424a8f 100644 --- a/packages/shared/src/types/elements.ts +++ b/packages/shared/src/types/elements.ts @@ -221,6 +221,7 @@ export const ELECTRICAL_TYPES = [ 'LIGHT_CEILING', 'LIGHT_WALL', 'CABLE_ROUTE', + 'WALL_CABLE', ] as const; export type ElectricalType = (typeof ELECTRICAL_TYPES)[number];