feat: dashboard manifest supports 'supported_games' field, frontend filters by selected game

- DashboardTheme model adds supported_games (default: 'all')
- Built-in dashboards declare game compatibility:
  speedometer/tachometer/gear_indicator -> all
  lap_timer -> forza_horizon_5,forza_horizon_4,forza_motorsport,f1_24
- Dashboard browser filters themes by selected game
- Card shows '全' (all) or '限' (limited) badge
- Updated DASHBOARD_DEV.md with supported_games spec
This commit is contained in:
2026-07-25 15:41:55 +08:00
parent 5e177f4514
commit 2177e65fb4
7 changed files with 46 additions and 10 deletions
+2
View File
@@ -21,6 +21,7 @@ dashboards/my_dashboard/
"description": "简短描述",
"author": "你的名字",
"version": "1.0.0",
"supported_games": "all",
"config": {
"icon": "🏎️",
"aspect_ratio": "16:9",
@@ -37,6 +38,7 @@ dashboards/my_dashboard/
| `description` | string | 否 | 描述文字 |
| `author` | string | 否 | 作者 |
| `version` | string | 否 | 版本号 |
| `supported_games` | string | 否 | 支持的游戏: `"all"` 或 ID 逗号分隔 (如 `"forza_horizon_5,f1_24"`) |
| `config.icon` | string | 否 | 预览图标 emoji |
| `config.aspect_ratio` | string | 否 | 渲染比例: `auto` / `16:9` / `4:3` / `1:1` / `21:9` |
| `config.render_mode` | string | 否 | 渲染模式: `contain` / `cover` / `fill` / `center` |