diff --git a/docs/Reference_guide.md b/docs/Reference_guide.md index 967d039..8d9d2b7 100644 --- a/docs/Reference_guide.md +++ b/docs/Reference_guide.md @@ -125,7 +125,8 @@ Rail trái → flyout submenu → content (`www/nav.js`). | Module | Flyout (section → page) | File JS | Trạng thái | |--------|-------------------------|---------|------------| | **Dashboards** | Danh sách động → `dashboard` | `dashboard.js` | ✅ | -| **Setup** | missions, maps, sounds, transitions, users, user-groups, io-modules, paths, path-guides, build-robot → `config` | `*.js` | 🔶 | +| **Setup** | missions, maps, sounds, transitions, users, user-groups, io-modules, paths, path-guides | `*.js` | 🔶 | +| **Robot+** | robot → `config`, simulation → `simulation` | `app.js` (config), — | 🔶 | | **Monitoring** | analytics (mặc định), system log, error logs, hardware, safety, mission log → `monitoring` | — | ✅ | | **System** | integrations → `integrations` | `integrations.js` | 🔶 | | **Help** | help-api → `help` | — | ⏳ | diff --git a/www/app.js b/www/app.js index 3a7282f..853f28c 100644 --- a/www/app.js +++ b/www/app.js @@ -20,6 +20,7 @@ const pagePathsEl = el("pagePaths"); const pagePathGuidesEl = el("pagePathGuides"); const pageMonitoringEl = el("pageMonitoring"); const pageHelpEl = el("pageHelp"); +const pageSimulationEl = el("pageSimulation"); const contentEl = document.querySelector(".content"); const contentRightEl = el("contentRight"); const overviewBackendEl = el("overviewBackend"); @@ -132,7 +133,7 @@ const state = { }; function setActivePage(page) { - const valid = ["dashboard", "config", "maps", "missions", "sounds", "transitions", "user-groups", "io-modules", "paths", "path-guides", "users", "settings", "integrations", "monitoring", "help"]; + const valid = ["dashboard", "config", "maps", "missions", "sounds", "transitions", "user-groups", "io-modules", "paths", "path-guides", "users", "settings", "integrations", "monitoring", "simulation", "help"]; let p = valid.includes(page) ? page : "missions"; if (window.AuthApp && !window.AuthApp.canAccessPage(p)) { const fallback = valid.find((v) => window.AuthApp.canAccessPage(v)); @@ -153,6 +154,7 @@ function setActivePage(page) { if (pageSettingsEl) pageSettingsEl.hidden = p !== "settings"; if (pageIntegrationsEl) pageIntegrationsEl.hidden = p !== "integrations"; if (pageMonitoringEl) pageMonitoringEl.hidden = p !== "monitoring"; + if (pageSimulationEl) pageSimulationEl.hidden = p !== "simulation"; if (pageHelpEl) pageHelpEl.hidden = p !== "help"; if (configSplitterEl) configSplitterEl.hidden = p !== "config"; if (contentRightEl) contentRightEl.hidden = p !== "config"; @@ -171,6 +173,7 @@ function setActivePage(page) { contentEl.classList.toggle("content--settings", p === "settings"); contentEl.classList.toggle("content--integrations", p === "integrations"); contentEl.classList.toggle("content--monitoring", p === "monitoring"); + contentEl.classList.toggle("content--simulation", p === "simulation"); contentEl.classList.toggle("content--help", p === "help"); } if (p === "missions" && window.MissionsApp) window.MissionsApp.onPageShow(); diff --git a/www/auth.js b/www/auth.js index cbc431e..07428b6 100644 --- a/www/auth.js +++ b/www/auth.js @@ -143,7 +143,7 @@ } function canAccessPage(page) { - if (page === "config") return isDistributor(); + if (page === "config" || page === "simulation") return isDistributor(); const map = { dashboard: "dashboard", diff --git a/www/i18n.js b/www/i18n.js index 1613ca5..ed6972e 100644 --- a/www/i18n.js +++ b/www/i18n.js @@ -64,6 +64,7 @@ "nav.expand": "Mở menu", "nav.dashboards": "Dashboards", "nav.setup": "Setup", + "nav.robot-plus": "Robot+", "nav.monitoring": "Monitoring", "nav.system": "System", "nav.settings": "Settings", @@ -80,7 +81,8 @@ "nav.paths": "Paths", "nav.path-guides": "Path guides", "nav.users": "Users", - "nav.build-robot": "Build Robot", + "nav.robot": "Robot", + "nav.simulation": "Simulation", "nav.monitoring-log": "System log", "nav.analytics": "Analytics", "nav.error-logs": "Error logs", @@ -1035,6 +1037,10 @@ "settings.tile.advanced": "Advanced", "settings.tile.advancedSub": "Retention và logging.", + "simulation.title": "Simulation", + "simulation.subtitle": "Robot+ → Simulation — mô phỏng robot trong môi trường ảo.", + "simulation.comingSoon": "Tính năng đang phát triển.", + "help.api.title": "API documentation", "help.api.subtitle": "Help → API — tham chiếu REST MiR v2.0.0 cho tích hợp bên ngoài.", "help.api.body1": "Xem chi tiết endpoint tại System → Tích hợp hoặc tài liệu /api/v2.0.0/.", @@ -1099,6 +1105,7 @@ "nav.expand": "Expand menu", "nav.dashboards": "Dashboards", "nav.setup": "Setup", + "nav.robot-plus": "Robot+", "nav.monitoring": "Monitoring", "nav.system": "System", "nav.settings": "Settings", @@ -1115,7 +1122,8 @@ "nav.paths": "Paths", "nav.path-guides": "Path guides", "nav.users": "Users", - "nav.build-robot": "Build Robot", + "nav.robot": "Robot", + "nav.simulation": "Simulation", "nav.monitoring-log": "System log", "nav.analytics": "Analytics", "nav.error-logs": "Error logs", @@ -2070,6 +2078,10 @@ "settings.tile.advanced": "Advanced", "settings.tile.advancedSub": "Retention and logging.", + "simulation.title": "Simulation", + "simulation.subtitle": "Robot+ → Simulation — simulate the robot in a virtual environment.", + "simulation.comingSoon": "Feature in development.", + "help.api.title": "API documentation", "help.api.subtitle": "Help → API — MiR v2.0.0 REST reference for external integration.", "help.api.body1": "See endpoint details under System → Integrations or /api/v2.0.0/ docs.", diff --git a/www/index.html b/www/index.html index 9241c90..051729e 100644 --- a/www/index.html +++ b/www/index.html @@ -108,6 +108,18 @@ Setup + + + + + + + + + + + Robot+ + @@ -2741,6 +2753,18 @@ GET /api/v2.0.0/status + + + + + Simulation + Robot+ → Simulation — mô phỏng robot trong môi trường ảo. + + + Tính năng đang phát triển. + + + diff --git a/www/nav.js b/www/nav.js index d883e2a..68426a6 100644 --- a/www/nav.js +++ b/www/nav.js @@ -22,7 +22,12 @@ { section: "io-modules", page: "io-modules" }, { section: "paths", page: "paths" }, { section: "path-guides", page: "path-guides" }, - { section: "build-robot", page: "config" }, + ], + }, + "robot-plus": { + items: [ + { section: "robot", page: "config" }, + { section: "simulation", page: "simulation" }, ], }, monitoring: { @@ -48,7 +53,8 @@ const PAGE_NAV = { dashboard: { module: "dashboards", section: "dashboard-list" }, - config: { module: "setup", section: "build-robot" }, + config: { module: "robot-plus", section: "robot" }, + simulation: { module: "robot-plus", section: "simulation" }, maps: { module: "setup", section: "maps" }, missions: { module: "setup", section: "missions" }, sounds: { module: "setup", section: "sounds" }, @@ -260,8 +266,10 @@ const savedMod = localStorage.getItem(STORAGE_MODULE); const savedSec = localStorage.getItem(STORAGE_SECTION); const savedFlyout = localStorage.getItem(STORAGE_FLYOUT); - if (savedMod && MODULES[savedMod]) activeModule = savedMod; - if (savedSec) activeSection = savedSec; + if (savedMod === "build") activeModule = "robot-plus"; + else if (savedMod && MODULES[savedMod]) activeModule = savedMod; + if (savedSec === "build-robot") activeSection = "robot"; + else if (savedSec) activeSection = savedSec; if (savedFlyout === "0") flyoutOpen = false; } catch { /* ignore */ diff --git a/www/style.css b/www/style.css index 5f41917..08ece22 100644 --- a/www/style.css +++ b/www/style.css @@ -1018,6 +1018,7 @@ canvas { .content.content--sounds, .content.content--integrations, .content.content--monitoring, +.content.content--simulation, .content.content--help { grid-template-columns: minmax(0, 1fr); max-width: none; @@ -1030,6 +1031,7 @@ canvas { .content.content--sounds > .page, .content.content--integrations > .page, .content.content--monitoring > .page, +.content.content--simulation > .page, .content.content--help > .page { width: 100%; min-width: 0;
Robot+ → Simulation — mô phỏng robot trong môi trường ảo.
Tính năng đang phát triển.