mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-02 03:01:52 +08:00
0be2d69ffa732e4efdeebd00a7f3b7409b25e271
Replaces the "store an i18n key in menu_ext.content.title and resolve it via frontend locales" design with per-locale titles maintained by the admin in the menu CRUD form. The menu store type gains a titles: Record<string,string> field, and MenuEditForm now asks for Chinese / English display names directly instead of an nav.* key. A new resolveMenuTitle(node) helper in utils/MenuUtil.ts gives the rest of the UI a single place to pick the title with the right fallback chain: titles[currentLocale] → titles.en → any populated locale → legacy content.title (via $t for nav.* keys still in the database) → menuName. Any time a menu is rendered — sidebar, breadcrumb, settings left nav — it should go through this helper. Old rows that still carry content.title keep rendering via the legacy-fallback branch until the dc3-docker migration converts them to titles; no hard cutover required.
1. Prepare
gitVisual Studio Codenodejs>= 18, recommended to use 22pnpm, install usingcorepack enable && corepack prepare pnpm@latest --activate(ornpm install -g pnpm)
2. Source code
git clone https://github.com/pnoker/iot-dc3-web.git
3. Develop
cd iot-dc3-web
# install
pnpm install
# run
pnpm dev
Description
IoT DC3 是一个基于 Spring Cloud 的 100% 完全开源的、分布式的物联网(IoT)平台,用于快速开发物联网项目和管理物联设备,是一整套物联系统解决方案。
321 MiB
Languages
Java
75.7%
TypeScript
10.4%
Vue
8.3%
PLpgSQL
3.6%
JavaScript
0.9%
Other
1%