Repository navigation
UI Refactoring, 3D Viewer Upgrades & Component/Company RBAC
Purpose
This merge request introduces major architectural upgrades to the 3D viewer (including STEP format support and custom LRU caching), refactors core UI components into unified blocks, and implements a prototype Role-Based Access Control (RBAC) system for companies and components to improve platform security and performance.
Features & UI Enhancements
- 3D Viewer Upgrades:
- Added STEP format support.
- Implemented 3D model LRU cache with size limit to optimize RAM (model-cache.js).
- Added
TransformControls(gizmo) for model transformation. - WebGPU/WebGL rendering with automatic backend selection via three.js.
- Added perspective/orthographic camera toggle.
- UI Refactoring & Architecture:
- Unified modal system (
ModalBlock) with CRUD support. - Unified form inputs via
InputConfig(icons, loading/error states). - Created reusable
CopyButtoncomponent with auto-reset timer. - Replaced external clipboard.js with native Clipboard API.
- Renamed
clipboard.rstoshare_link.rsfor better clarity. - Three libraries extracted to a separate git submodule.
- Removed unnecessary braces in
html!macro attributes for cleaner templates. - Replaced numeric keys with
LocaleKeyenum for i18n. - Replaced
lazy_staticwithOnceLockand removedparking_lotdependency. - API key management in user settings.
- Unified modal system (
- UX enhancements:
- Components in search results now open in a new tab for better navigation.
- Added Mastodon social link in the footer/header.
- Fixed publication date icon to correctly represent timestamp semantics.
- Access Control & Session Management:
- Prototype RBAC system: company roles/members and component access control for users and companies.
- JWT session manager: token validation and refresh.
- User/company search with debounce for access management.
Performance & Optimizations
- Optimized GCode parser (streaming).
- Improved 3D viewer cleanup (contexts, workers).
- Dynamic render quality based on model complexity.
- Prioritized render loop with animation control.
Security
- HTML/Markdown sanitization (XSS protection).
TokenManagerfor auto-refresh and session expiry redirect.
Bug Fixes
- Fixed mobile responsiveness (header, buttons, modals).
- Fixed modal and notification handling (animations, z-index).
- Improved 3D viewer error handling.
- Fixed model centering and auto-scaling.
⌨️ Hotkeys (3D Viewer) — Click to expand
F— toggle fullscreen modeEscape— close viewer modal0/Numpad0— isometric view1/Numpad1— front view3/Numpad3— left view7/Numpad7— top view9/Numpad9— opposite view (flip camera)5/Numpad5— toggle perspective/orthographic camera2,4,6,8/Numpad2,4,6,8— discrete camera rotation (15°)H— center modelZ— toggle wireframe modeSpace— play/pause animation (GLTF/GLB and GCode)T— attach/detach transform gizmoW, E, R— switch gizmo modes (Translate/Rotate/Scale)
IFC limitations: Only H and view keys (1,3,7,0,9) work.