From 71d039ba82886079977fd1376f5e82fcc5d1a9d3 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Sun, 26 Jul 2026 18:43:59 +0800 Subject: [PATCH] feat: #4 shift lights + #5 phone dash + #6 PWA support --- dashboards/phone_dash/index.html | 86 ++++++++++++++++++++++++++++ dashboards/phone_dash/manifest.json | 14 +++++ dashboards/shift_light/index.html | 67 ++++++++++++++++++++++ dashboards/shift_light/manifest.json | 14 +++++ static/manifest.json | 10 ++++ static/sw.js | 3 + templates/index.html | 1 + 7 files changed, 195 insertions(+) create mode 100644 dashboards/phone_dash/index.html create mode 100644 dashboards/phone_dash/manifest.json create mode 100644 dashboards/shift_light/index.html create mode 100644 dashboards/shift_light/manifest.json create mode 100644 static/manifest.json create mode 100644 static/sw.js diff --git a/dashboards/phone_dash/index.html b/dashboards/phone_dash/index.html new file mode 100644 index 0000000..0956302 --- /dev/null +++ b/dashboards/phone_dash/index.html @@ -0,0 +1,86 @@ + + + + + +TurboSu - 手机仪表 + + + +
+
+
0
+
RPM
+
+
N
+
0
+
KM/H
+
+ + + diff --git a/dashboards/phone_dash/manifest.json b/dashboards/phone_dash/manifest.json new file mode 100644 index 0000000..1f48982 --- /dev/null +++ b/dashboards/phone_dash/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "phone_dash", + "name": "手机竖屏仪表", + "category": "racing", + "description": "竖屏适配,方向盘后置:转速+档位+换挡灯,9:16宽高比", + "author": "Yei.J. (AskaEth)", + "version": "1.0.0", + "supported_games": "all", + "config": { + "icon": "📱", + "aspect_ratio": "9:16", + "render_mode": "contain" + } +} diff --git a/dashboards/shift_light/index.html b/dashboards/shift_light/index.html new file mode 100644 index 0000000..c31bd78 --- /dev/null +++ b/dashboards/shift_light/index.html @@ -0,0 +1,67 @@ + + + + + +TurboSu - 换挡灯 + + + +
+ + + diff --git a/dashboards/shift_light/manifest.json b/dashboards/shift_light/manifest.json new file mode 100644 index 0000000..75227f0 --- /dev/null +++ b/dashboards/shift_light/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "shift_light", + "name": "换挡指示灯", + "category": "racing", + "description": "转速接近红线区逐级亮灯闪烁提示", + "author": "Yei.J. (AskaEth)", + "version": "1.0.0", + "supported_games": "all", + "config": { + "icon": "💡", + "aspect_ratio": "16:3", + "render_mode": "contain" + } +} diff --git a/static/manifest.json b/static/manifest.json new file mode 100644 index 0000000..087970a --- /dev/null +++ b/static/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "TurboSu", + "short_name": "TurboSu", + "description": "赛车遥测仪表盘", + "start_url": "/", + "display": "standalone", + "background_color": "#0a0a0f", + "theme_color": "#0a0a0f", + "icons": [] +} diff --git a/static/sw.js b/static/sw.js new file mode 100644 index 0000000..e53c702 --- /dev/null +++ b/static/sw.js @@ -0,0 +1,3 @@ +self.addEventListener('install', (e) => { self.skipWaiting(); }); +self.addEventListener('activate', (e) => { e.waitUntil(clients.claim()); }); +self.addEventListener('fetch', (e) => { e.respondWith(fetch(e.request).catch(() => caches.match(e.request))); }); diff --git a/templates/index.html b/templates/index.html index 1a37b9c..bd31ac1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,6 +3,7 @@ + TurboSu - 赛车遥测仪表盘