Files
NanoKVM-MIRROR/web
watermeko 9e6d280826 feat(web): add configurable mouse input regions
Add device-level input-region APIs for reading, validating, and atomically persisting absolute mouse calibration settings, including automatic, manual, and disabled modes.

Introduce a shared screen viewport that keeps the rendered media geometry and configured input region aligned across MJPEG, direct H.264, and WebRTC streams. Add automatic black-border detection and a manual selection overlay with dragging, resizing, magnified preview, keyboard locking, and cancellation support.

Provide original-resolution presets so manual calibration can be recalculated for common aspect ratios, expose the controls from the desktop mouse menu, close menus before entering selection mode, and preserve active file transfers when the download menu closes.

Add localized control-region labels and messages for all supported locales, and update direct-frame rendering so media dimensions are reported after the canvas has been drawn.
2026-08-25 09:36:13 +08:00
..
2024-08-09 19:45:45 +08:00
2024-08-09 19:45:45 +08:00
2026-01-14 17:58:25 +08:00
2024-08-09 19:45:45 +08:00
2024-08-09 19:45:45 +08:00
2025-02-23 09:31:51 +09:00
2025-02-14 14:18:13 +08:00
2024-08-09 19:45:45 +08:00
2025-11-26 10:57:30 +08:00
2024-08-09 19:45:45 +08:00

NanoKVM Frontend

This is NanoKVM web project. For more documentation, please refer to the Wiki.

Structure

src
├── api                // backend api
├── assets             // static resources
├── components         // public components
├── i18n               // language resources
├── jotai              // Global jotai variables
├── lib                // util libs
├── pages              // web pages
│    ├── auth             // login and password
│    ├── desktop          // remote desktop
│    └── terminal         // web terminal
├── router.tsx         // routers
└── types              // types

Local Development

Requirements: Node.js >= 22 and pnpm >= 11 (the versions CI uses; enforced via the engines field in package.json).

Development requires SSH. You can enable it in the Web Settings: Settings > SSH.

Due to CORS restrictions, authentication needs to be disabled during local development.

To develop authentication features, you need to build the project and test in NanoKVM.

  1. Log in to NanoKVM via SSH: ssh root@your-nanokvm-ip (default password is root).
  2. Open the configuration file /etc/kvm/server.yaml/ and add authentication: disable. ⚠️CAUTION: This option disables all authentication and should NOT be enabled in production environment!
  3. Restart the service: /etc/init.d/S95nanokvm restart.
  4. Edit the .env.development file and change VITE_SERVER_IP to your NanoKVM IP address.
  5. Run pnpm dev to start the server and visit http://localhost:3001/ in browser.

It's recommended to disable browser caching to avoid access issues during development:

  1. Open the browser Developer Tools;
  2. Go to the Network tab;
  3. Check Disable cache option;
  4. Refresh the page.

Deployment

Build:

cd web
pnpm install
pnpm build
  1. After the compilation is complete, the dist folder will be generated.
  2. Rename the folder to web.
  3. Upload web to /kvmapp/server/ in NanoKVM.
  4. Restart the service by executing /etc/init.d/S95nanokvm restart in NanoKVM.

Tips:

  1. File uploads requires SSH. You can enable it in the Web Settings: Settings > SSH.
  2. Browser may have old version cache. If you can't open the page, try a force refresh or clear the cache.