diff --git a/public/devices/README.md b/public/devices/README.md index 0b7cbd3c..9bdf12d7 100644 --- a/public/devices/README.md +++ b/public/devices/README.md @@ -160,6 +160,12 @@ trusted. 4. Keep this note as provenance. Vendor product art — treat as a request pending licensing review. +`delux-m800-mini.png` — the name-fallback mapping in `src/ui/device-images.ts` +is in place (keyed on reported names like "Delux M800 Mini", "Delux M800 Pro", +"Delux M800 Mini (Wireless)"). The render was supplied from Delux's official +product portal (`deluxworld.com`, `/uploads/admin/image/20251226/M800mini黑.png`), +centered on a transparent 700×700 canvas. + `attackshark-r5-ultra.png` is the top-down render of the Attack Shark R5 Ultra extracted from Attack Shark's official product gallery (`cdn.shopify.com/s/files/1/0823/5050/6282/files/R5ULTRA_C06_3.png`), keyed diff --git a/public/devices/delux-m800-mini.png b/public/devices/delux-m800-mini.png new file mode 100644 index 00000000..639dfb98 Binary files /dev/null and b/public/devices/delux-m800-mini.png differ diff --git a/src/ui/device-images.test.ts b/src/ui/device-images.test.ts index d4a175ec..dadfd249 100644 --- a/src/ui/device-images.test.ts +++ b/src/ui/device-images.test.ts @@ -96,6 +96,12 @@ test("Dareu A950 PRO Mg resolves by name", () => { assert.equal(deviceImage(null, "Dareu A950 PRO Mg"), CDN + "dareu-a950-pro-mg.png"); }); +test("Delux M800 Mini and M800 family resolve by name", () => { + assert.equal(deviceImage(null, "Delux M800 Mini"), "/devices/delux-m800-mini.png"); + assert.equal(deviceImage(null, "Delux M800 Mini (Wireless)"), "/devices/delux-m800-mini.png"); + assert.equal(deviceImage(null, "Delux M800 Pro"), "/devices/delux-m800-mini.png"); +}); + test("Attack Shark R2 resolves by name (PID 0x402D is shared with the M5 Pro)", () => { // TEMPORARY: served from the repo override (see LOCAL_OVERRIDES in // device-images.ts / public/devices/README.md) until a maintainer uploads diff --git a/src/ui/device-images.ts b/src/ui/device-images.ts index afa8846d..0252ea4f 100644 --- a/src/ui/device-images.ts +++ b/src/ui/device-images.ts @@ -60,6 +60,9 @@ function resolveDeviceImageFilename(_device: HIDDevice | null | undefined, displ // R2 shares PID 0x402D with the Lingbao M5 Pro, so it can only be told apart // by the name the gearhub driver reads back from the device id. if (/\battack\s*shark\s*r2\b/i.test(displayName)) return "attackshark-r2.png"; + if (/\bdelux\b.*\bm800/i.test(displayName) || /\bm800\s*(mini|pro)?\b/i.test(displayName)) { + return "delux-m800-mini.png"; + } // X3 / X3 Pro share one shell. Brand-scoped so Pulsar X3 (matched by the // generic /pulsar/i rule below) never borrows this render, and so X11/X1 // don't match. @@ -190,6 +193,7 @@ const DEVICE_IMAGE_BASE_URL = "https://img.openmouse.app/"; */ const LOCAL_OVERRIDES: Readonly> = { "attackshark-r2.png": "/devices/attackshark-r2.png", + "delux-m800-mini.png": "/devices/delux-m800-mini.png", "ipi-float-88.png": "/devices/ipi-float-88.png", };