(search: string)
| 53 | } |
| 54 | |
| 55 | export function getTouchModeUrlActionFromSearch(search: string): TouchModeStartupAction | null { |
| 56 | const touchParam = new URLSearchParams(search).get('touch'); |
| 57 | if (touchParam === null) return null; |
| 58 | |
| 59 | const enabled = isEnabledQueryFlag(touchParam); |
| 60 | return { |
| 61 | enabled, |
| 62 | source: 'url', |
| 63 | logMessage: `[App] Touch mode ${enabled ? 'enabled' : 'disabled'} (URL override)`, |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | export function getTouchModeAutoAction(isTouchDevice: boolean): TouchModeStartupAction | null { |
| 68 | if (!isTouchDevice) return null; |
no test coverage detected