Commit Graph
5 Commits
Author SHA1 Message Date
DrSmoothl 7c0519f75f lint 2026-10-12 15:43:34 +08:00
DrSmoothl 5b68ca5bd3 feat(webui): refine interactive controls
Separate the custom context menu preference and enable it by default.

Bring dropdowns and settings choices into a consistent, responsive interaction language.
2026-07-31 17:38:51 +08:00
DrSmoothl a9b8440731 fix(webui): disable custom pointer system by default
Default new and legacy-normalized appearance configs to native cursor and context-menu behavior while preserving explicit opt-in settings.
2026-07-19 19:33:26 +08:00
DrSmoothl d40c803ed9 feat(webui): add adaptive pointer interactions
Introduce a CSS-driven adaptive cursor that morphs for controls, text editing, dragging, resizing, busy states, and other native pointer semantics on desktop devices.

Add a themed context menu for editing, selections, links, images, and page navigation while preserving explicit native-menu escape paths. Store a default-on interaction preference through the normalized appearance model and cover its migration and opt-out behavior.
2026-07-18 23:38:43 +08:00
DrSmoothl 2913a7a19b test(webui): regression tests for ui-config normalizers (B4)
First test coverage for the WebUI config trust boundary + the B1–B3 schema
additions (22 cases in packages/core/tests):

- normalizeAppearance totality (garbage → defaults, clamps, bad enums); custom
  fonts accept free-form families but reject control chars/injection/over-length;
  cssVars keep only whitelisted tokens with break-out-proof colour values.
- normalizeLayout: overviewMobile/topbarItems order-preserving + de-duped +
  fallback; overviewBlocks coord clamping; per-widget config 4096-byte cap.
- normalizePages: logs preset oneOf (unknown → custom).
- sniffImageMime magic bytes; normalizeUiConfig never derives image fields from
  the value.
- fs-backed (isolated temp cwd + fresh module): saveUiConfig forces the
  server-managed image fields (client can't forge hasImage); publicAppearance
  strips customCss but keeps cssVars + other cosmetic fields.
2026-06-16 14:38:57 +08:00