Skip to content

Control Panel

Control Panel is the system-level configuration center of TechUI. It exists in the form of a Drawer, providing users with a unified interface to adjust the application's theme style, layout mode, interaction effects, and visual effects in real-time.

Unlike ordinary settings pages, the options in the Control Panel take effect instantly. It is directly bi-directionally bound to the system's global configuration ($globalConfig), so any modifications are immediately reflected in the UI without refreshing the page.

Core Features

Global State Synchronization

Every switch in the panel (such as "3D Panel", "Mask Blur") corresponds to a field in $globalConfig.

  • Read: When the panel opens, it automatically reads the current global configuration state for echo display.
  • Write: After user operation, it automatically updates the configuration in $tState, triggering a system response.

Intelligent Environment Awareness

The panel has intelligent display/hide logic that automatically optimizes options based on the current running environment:

  • Browser Compatibility: When a non-Webkit kernel (such as Firefox) is detected, the unsupported "Transition Animation" switch is automatically hidden.
  • Feature Authorization: When it detects that advanced features (isActAdvFeatures) are not enabled, the "3D Panel" option is automatically hidden.
  • Single Theme Mode: If the system has only registered one theme, the theme switching module is automatically hidden.

Highly Customizable

Although the panel has rich built-in system switches, it allows developers to:

  • Exclude (Exclusion): Hide unwanted default options.
  • Extend (Extension): Inject business-specific configuration switches.

Released under the MIT License.