diff --git a/package-lock.json b/package-lock.json index 5f83e790..c16d4deb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.0.0", "license": "AGPL-3.0-or-later", "dependencies": { - "@openmouse/protocol": "0.23.0", + "@openmouse/protocol": "0.24.0", "lucide-react": "^1.43.0", "preact": "^10.29.8" }, @@ -481,9 +481,9 @@ } }, "node_modules/@openmouse/protocol": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@openmouse/protocol/-/protocol-0.23.0.tgz", - "integrity": "sha512-r41kCnNM/ugSrYo7iuD5Hb6S1tXOGzyLBdfkNY83GTBPvJYhyv44jUHF3jIDpWiRypE5V5wBMIelt6zJQ72fQw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@openmouse/protocol/-/protocol-0.24.0.tgz", + "integrity": "sha512-n6hgDfLnD9oOW3P6bQDn6b8NwE/fa5AcQtzJYDvH9+DvxSaExJPVXJv+auS/unlm7kHf68WKlLnDynJfmZZsUg==", "engines": { "node": ">=20" } diff --git a/package.json b/package.json index e35b74d1..0e32699c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "preview": "vite preview" }, "dependencies": { - "@openmouse/protocol": "0.23.0", + "@openmouse/protocol": "0.24.0", "lucide-react": "^1.43.0", "preact": "^10.29.8" }, diff --git a/src/app/OverviewPage.tsx b/src/app/OverviewPage.tsx index af9a47ee..ad27ac5c 100644 --- a/src/app/OverviewPage.tsx +++ b/src/app/OverviewPage.tsx @@ -25,6 +25,7 @@ import { Superstrike } from "./Superstrike"; import { DpiCard } from "./cards/DpiCard"; import { LightforceCard, PollingCard, SensorCard } from "./cards/PerformanceCards"; import { LightingCard } from "./cards/LightingCard"; +import { LunaFuryButtonsCard, LunaFuryWheelCard } from "./cards/LunaFuryCards"; import { MxMasterButtonsCard, MxMasterCards } from "./cards/MxMasterCards"; import { AtkButtonCard, AtkDongleCard, AtkProfileCard, AtkReceiverCard, AtkSensorCard } from "./cards/AtkCards"; import { @@ -580,6 +581,8 @@ export function Workspace({ show(has.lowPower, ["advanced"]) ? : null, show(has.finalmouse, ["advanced"]) ? : null, show(has.incott, ["advanced"]) ? : null, + show(has.lunafuryButtons, ["buttons"]) ? : null, + show(has.lunafuryWheelGuard, ["buttons"]) ? : null, device && show(has.dongleLed, ["advanced"]) ? : null, show(has.atkProfile, ["profiles"]) ? : null, device && show(has.atkReceiver, ["advanced"]) ? : null, diff --git a/src/app/cards/AdvancedCards.tsx b/src/app/cards/AdvancedCards.tsx index 96180fa7..1a8a6e41 100644 --- a/src/app/cards/AdvancedCards.tsx +++ b/src/app/cards/AdvancedCards.tsx @@ -22,6 +22,7 @@ import { teevolutionSensorModeUi } from "@openmouse/protocol/teevolution"; import type { KsnakeMacroProfile, KsnakeMacroStep } from "@openmouse/protocol/ksnake"; import { isPulsarProProtocol } from "../../device/traits"; import { isNoirKsnakeStatus } from "../../device/noir.ts"; +import { lunafurySettingLabel, lunafuryTrackingVisible } from "../../device/lunafury-labels.ts"; import * as control from "../../device/controller"; import { PULSAR_SLEEP_OPTIONS } from "../../device/controller"; import { selectableValues, sleepLabel, sleepParts, sleepTotalSeconds, valuesWithCurrent, KEYCHRON_SLEEP_MAX_HOURS, KEYCHRON_SLEEP_MAX_SECONDS, KEYCHRON_SLEEP_MIN_SECONDS } from "../../device/options"; @@ -374,16 +375,29 @@ export function ProcessingCard({ snapshot }: { snapshot: ControlSnapshot }): Rea }) : null; - const angleSnappingLabel = status.ui?.family === "atk" ? t(locale, "adv.straightLine") : t(locale, "adv.angleSnapping"); + const angleSnappingLabel = lunafurySettingLabel(status, locale, "angleSnapping") + ?? (status.ui?.family === "atk" ? t(locale, "adv.straightLine") : t(locale, "adv.angleSnapping")); // WLMouse calls the same sensor setting High-speed mode in its own tool. - const hyperLabel = status.brand === "WLMouse" ? t(locale, "adv.highSpeed") : t(locale, "adv.hyperMode"); + const hyperLabel = lunafurySettingLabel(status, locale, "hyperMode") + ?? (status.brand === "WLMouse" ? t(locale, "adv.highSpeed") : t(locale, "adv.hyperMode")); // Pulsar Pro shows the angle with the rest of its Pro-only settings. const angleTuning = isPulsarProProtocol(status) ? null : status.angleTuning; + const angleLabel = t(locale, status.brand === "LunaFury" ? "luna.sensorAngle" : "adv.angleTune"); - const performanceLabel = status.brand === "CRDRAKO" + const performanceLabel = lunafurySettingLabel(status, locale, "performanceMode") ?? (status.brand === "CRDRAKO" ? t(locale, "adv.competitive") - : status.brand === "Teevolution" ? t(locale, "adv.highestPerf") : t(locale, "adv.perfMode"); + : status.brand === "Teevolution" ? t(locale, "adv.highestPerf") : t(locale, "adv.perfMode")); + + const hyperModeControl = ( +