Commit Graph

366 Commits

Author SHA1 Message Date
rmschooley 482462dc9b Improve/Simplify Mouse Wheel Scroll Behavior (#470)
* Improve/Simplify Mouse Wheel Scroll Behavior

* Update hid_mouse_absolute.go

Attempt to fix line reported as improperly formatted by lint.

* Update utils.go

Removed abs() function since lint states it is no longer used.
2025-09-26 08:21:17 +00:00
Julian Zander 6156b255c8 chore: add Go Report Card
Add Go Report Card
2025-09-26 08:21:17 +00:00
Siyuan Miao 97b2b0a3c2 chore: append package name to build script 2025-09-26 08:21:17 +00:00
Siyuan Miao a9021354b4 fix: golang test report input argument 2025-09-26 08:21:17 +00:00
Marc Brooks 7e9ca3dbe3 chore(ui): Patch-bump packages and use tailwind upgrade (#456)
* chore(ui): Patch bump in tailwind related packages and framer-motion

tailwind: [4.1.6 -> 4.1.7](https://github.com/tailwindlabs/tailwindcss/compare/v4.1.6...v4.1.7)
@tailwindcss/postcss: 4.1.6 -> 4.1.7
@tailwindcss/vite: 4.1.6 -> 4.1.7

Also patch-bump of:
framer-motion: [12.11.0 -> 12.11.4](https://github.com/motiondivision/motion/compare/v12.11.0...v12.11.4)

No source changes seemingly needed, have not rerun the migrate.

* chore(ui): Run tailwind upgrade and review changes

Ran the `npx @tailwindcss/upgrade` and accepted the changes that seemed safe.

They're things like:
- `data-[closed]:translate-y-9` -> `data-closed:translate-y-8` ()swaps the square bracket syntax to a `-` modifier)
- `bg-gradient-to-*` -> `bg-linear-to-*`
- `/[*%]` -> `/*` (swap square bracket syntax for inline)
- `theme(*.*)` -> `var(--*-*)` (theme styles are exposed as variables with hyphens for dots now)
- `[background-size:*]` -> `bg-size[*]` (move the square brackets inside tag)
- `[.active_&]:` -> `in[.active]:` (new syntax for parent query)
- `!class` -> `class!` (e.g. _!overflow-visible_ to _overflow-visible!_, for [important flag](https://tailwindcss.com/docs/styling-with-utility-classes#using-the-important-flag style)
- `w-[1px]` -> `w-px` (that's a new syntax for a 1px width)
- `h-[1px]` -> `h-px` (that's a new syntax for a 1px height)
- moved `html` and `html, body` global settings in the _index.css_

Also killed off an unused `import` and blank css class.
Also picked up the two `flex-grow` -> `grow` that I missed last pass, oops.
2025-09-26 08:21:17 +00:00
Aveline cbe1460295 chore: run golang tests 2025-09-26 08:21:17 +00:00
Marc Brooks fdbaafb629 fix(ui): Fix regression on Shift-Backspace not being handled (#454)
This keystroke is valid and means "delete to the right" on MacOS.
2025-09-26 08:21:17 +00:00
Marc Brooks 3eaf6da015 Update devcontainer.json to match ui package.json (#457)
Missed that we upgraded the ui's package.json, need to _also_ update the devcontainer.json to matching verison 22.15.0
2025-09-26 08:21:17 +00:00
Adam Shiervani b8f470d63a fix(ui): Adjust EmptyCard icon size and tweak SettingsMacros (#452) 2025-09-26 08:21:17 +00:00
Adam Shiervani dff6a5b3b2 refactor: Migrate from tailwind.js config to Tailwind CSS config (#451)
* refactor: Migrate from tailwind.js config to Tailwind CSS configuration and improve component styling

- Removed extensive theme and animation configurations from tailwind.config.js, migrating them to index.css for better organization.
- Updated components to utilize CSS variables for grid layouts and animations, enhancing maintainability.
- Adjusted various components to reflect the new CSS structure, ensuring consistent styling across the application.
- Improved accessibility and responsiveness in several UI components, including headers and popovers.
- Fixed minor styling issues and optimized class usage for better performance.

* style: use default tailwindcss/forms options

* refactor(Header): remove unused LuUser icon import
2025-09-26 08:21:17 +00:00
Marc Brooks 6047ea634e feat(ui): Enhance Virtual Keyboard for US (#449)
* feat(ui): Add Ctrl+Alt-Backspace combination key to Virtual Keyboard

Fixes #445 (somewhat)

* fix(ui): Correct virtual keyboard display when shift key is down.

Somewhere along the way, the handling of the shift-key state for letters and numbers was lost and we stopped displaying the capital/symbol for the key.
Also update page up and page down to have the space in the on-screen key.

* feat(ui): Add missing keys for virtual keyboard

Enable insert, delete, numpad equal, print scree, scroll lock, pause, system request, break keys.
2025-09-26 08:21:17 +00:00
Marc Brooks ba2f6f6500 chore: Upgrade UI vite and tailwind packages (#443)
* chore: Upgrade UI vite and tailwind packages

Vite 5.2.0 -> 6.3.5
@vitejs/plugin-basic-ssl 1.2.0 -> 2.0.0
cva: 1.0.0-beta.1 -> 1.0.0-beta.3
focus-trap-react 10.2.3 -> 11.0.3
framer-motion 11.15.0 -> 12.11.0
@tailwindcss/postcss 4.1.6
@tailwindcss/vite 4.1.6
tailwind 3.4.17 -> 4.1.6
tailwind-merge 2.5.5 -> 3.3.0

Minor updates:
@headlessui/react 2.2.2 -> 2.2.3
@types/react 19.1.3 -> 19.1.4
@types/react-dom 19.1.3 -> 19.1.5
@typescript-eslint/eslint-plugin 8.32.0 -> 8.32.1
@typescript-eslint/parser 8.32.0 -> 8.32.1
react-simple-keyboard 3.8.71 -> 3.8.72

The new version of vite required an Node 22.15 (since that's current LTS and node 21.x is EOL)

The changes to css due to the tailwind 3 to 4 upgrade were done following [the upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3)

Done in this order (important):
`shadow-sm` -> `shadow-xs`
`shadow` -> `shadown-sm`
`rounded` -> `rounded-sm`
`outline-none` -> `outline-hidden`
`32rem_32rem_at_center` -> `center_at_32rem_32rem` (revised order of gradient props)
`ring-1 ring-black ring-opacity-5` -> `ring-1 ring-black/50`
`flex-shrink-0` -> `shrink-0`
`flex-grow-0` -> `grow-0`
`outline outline-1` -> `outline-1`

ALSO removed the **extra** `opacity-0` on the video element (trips up latest tailwind causing the video to be invisible)

FocusTrap is now not exported as the default, so change those imports

headlessui's Menu completely changed, so upgrade to the new syntax which necessitated a reorganization of the Header.tsx to enable the "menu" to still work

* Update eslint config and fix errors
2025-09-26 08:21:17 +00:00
Adam Shiervani c167e34c21 feat(network): enhance network settings UI (#364)
* feat(network): enhance network settings UI with domain management and improved layout

- Added custom domain input and selection options for DHCP and local domains.
- Improved layout for displaying network settings, including DHCP lease information and IPv6 addresses.
- Refactored state management for network settings and added handlers for hostname and domain changes.
- Updated the display of network settings to enhance user experience and accessibility.

* Re-add save button

* fix: add ConfirmDialog for renewing DHCP lease and improve network settings layout

- Integrated ConfirmDialog component to confirm DHCP lease renewal.
- Enhanced the layout of network settings, including better organization of IPv4 and IPv6 information.
- Updated state management for displaying network settings and lease information.
- Improved user experience with clearer descriptions and structured UI elements.

* Fix lint errors

* fix: useRef TS2554

---------

Co-authored-by: Siyuan Miao <i@xswan.net>
2025-09-26 08:21:17 +00:00
Marc Brooks 3d67cb84a9 feat: Reset optionally reset USB HID in dev-deploy (#440)
Adds `--reset-usb-hid` command to delete the configured USB HID device before running.
2025-09-26 08:21:17 +00:00
Aveline c105699bf8 chore: update jetkvm_native binary (4e2ce48) (#442) 2025-09-26 08:21:17 +00:00
Aveline 2046c7c76d chore: create images folder when starting the application (#437) 2025-09-26 08:21:17 +00:00
Aveline 38a28ee534 feat(usb_mass_storage): mount as disk (#333)
* feat(usb_mass_storage): mount as disk

* chore: try to set initial virtual media state from sysfs

* chore(usb-mass-storage): fix inquiry_string
2025-09-26 08:21:17 +00:00
Marc Brooks 4bcd53997d Update npm packages for the UI (#432)
Upgraded most packages to current as of 2025-05-09 for almost everything.
Remove the erroneous extra dependency to old xterm package since the correct @xterm/xterm package was already included (suspect a bad merge) and it was causing issues with react 19.1.
Switched to using the hooks exposed in the usehooks-ts package (this package was already referenced, suspect a bad merge) removing our private copies of useInterval, useIsMounted, useResizeObserver which are identical.
Added import of JSX from react now needed because NPX is not in global scope in react 19.x.
Explicitly cast the ref of included elements due to change in react 19.x
2025-09-26 08:21:17 +00:00
Daniel Lorch dc086834a3 Fix: Alt Gr not recognized (#399)
* Fix: Alt-Gr not recognized

* Proper fix for Alt-Gr not being recognized

* Add comment on codes and modifiers

* Add comment on paste box

* Remove comment

* Improve description

* Wording...

* Formatting...

* Improve description again
2025-09-26 08:21:17 +00:00
Qishuai Liu 03ee14dd79 ntp: fix panic on NTP query error and add IPv6 server for IPv6-only support (#424)
* fix(ntp): prevent panic on NTP query error and add IPv6 server in defaultNTPServers

* fix(ntp): make sure queryMultipleNTP finish if all servers failed
2025-09-26 08:21:17 +00:00
John 34450e9366 fix: absolute mouse scroll (#434)
Co-authored-by: wup-one <wup@deepspace.game>
2025-09-26 08:21:17 +00:00
Peder Toftegaard Olsen 297c9306da feat: UI for changing display orientation
* Added UI for changing display orientation.

* Fixed lint issue.
2025-09-26 08:21:17 +00:00
Siyuan Miao 81a3510810 chore: bump version to 0.4.0 2025-09-26 08:21:17 +00:00
Aveline 96fc1a20ad network enhanecment / refactor (#361)
* chore(network): improve connectivity check

* refactor(network): rewrite network and timesync component

* feat(display): show cloud connection status

* chore: change logging verbosity

* chore(websecure): update log message

* fix(ota): validate root certificate when downloading update

* feat(ui): add network settings tab

* fix(display): cloud connecting animation

* fix: golintci issues

* feat: add network settings tab

* feat(timesync): query servers in parallel

* refactor(network): move to internal/network package

* feat(timesync): add metrics

* refactor(log): move log to internal/logging package

* refactor(mdms): move mdns to internal/mdns package

* feat(developer): add pprof endpoint

* feat(logging): add a simple logging streaming endpoint

* fix(mdns): do not start mdns until network is up

* feat(network): allow users to update network settings from ui

* fix(network): handle errors when net.IPAddr is nil

* fix(mdns): scopedLogger SIGSEGV

* fix(dhcp): watch directory instead of file to catch fsnotify.Create event

* refactor(nbd): move platform-specific code to different files

* refactor(native): move platform-specific code to different files

* chore: fix linter issues

* chore(dev_deploy): allow to override PION_LOG_TRACE
2025-09-26 08:21:17 +00:00
Aveline d2ed3439fb feat: implement pointer-lock and keyboard-lock (#352)
* feat: implement pointer-lock and keyboard-lock

* feat: Add Pointer lock functionality and SSL support in dev mode

- Introduced @vitejs/plugin-basic-ssl for enabling SSL in development.
- Added a new script `dev:ssl` to run the development server with SSL.
- Implemented pointer lock feature in the WebRTCVideo component, enhancing user interaction.
- Added a PointerLockBar component to guide users on enabling mouse control.
- Cleaned up the VideoOverlay and WebRTCVideo components for better readability and functionality.

---------

Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-09-26 08:21:17 +00:00
Simão Gomes Viana a1e65ae6d1 VideoOverlay: add missing word to adapter line (#355)
THe sentence was incomplete without "ensure".
2025-09-26 08:21:17 +00:00
Ben Kochie 99015c80fe refactor: update golintci-lint and linter issues
* Update golangci-lint

Update golangci-lint to v2.

Signed-off-by: SuperQ <superq@gmail.com>

* Fixup various linter issues.

Signed-off-by: SuperQ <superq@gmail.com>

---------

Signed-off-by: SuperQ <superq@gmail.com>
2025-09-26 08:21:17 +00:00
Siyuan Miao 22ceb698c5 chore(ntp): add logging for time sync errors 2025-09-26 08:21:17 +00:00
Siyuan Miao b8ec8b46a1 fix(log): segmentation violation when err is nil 2025-09-26 08:21:17 +00:00
Siyuan Miao 80dc1a5257 chore(cloud): use request id from the cloud 2025-09-26 08:21:17 +00:00
Siyuan Miao acd0b94871 chore(log): ntp logger 2025-09-26 08:21:17 +00:00
Siyuan Miao aafc9318ab chore(log): add nbdLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao 22a757cac7 chore: fix linting issue 2025-09-26 08:21:17 +00:00
Siyuan Miao 26064f44f0 chore: update logging 2025-09-26 08:21:17 +00:00
Siyuan Miao 265ea5ab8b chore(log): add wolLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao f61b16421c fix(ota): verifyFile missing arguments 2025-09-26 08:21:17 +00:00
Siyuan Miao 1b34e3f35d chore(log): add webRtcLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao a0bc18ea90 chore(log): add terminalLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao e2b6883342 chore(log): add serialLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao 15d95a8147 chore(log): add otaLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao 0302faa030 chore(log): add watchdogLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao 74a11ef7e9 chore(log): add jsonRpcLogger 2025-09-26 08:21:17 +00:00
Siyuan Miao 6e5493503e feat(tls): #330 2025-09-26 08:21:17 +00:00
Siyuan Miao 6c6ce4e5cb refactor: use structured logging 2025-09-26 08:21:17 +00:00
Andrew Davis 63176c8b53 Add keyboard macros (#305)
* add jsonrpc keyboard macro get/set

* add ui keyboard macros settings and macro bar

* use notifications component and handle jsonrpc errors

* cleanup settings menu

* return error rather than truncate steps in validation

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat(ui): add className prop to Checkbox component to allow custom styling

* use existing components and CTA

* extract display key mappings

* create generic combobox component

* remove macro description

* cleanup styles and macro list

* create sortable list component

* split up macro routes

* remove sortable list and simplify

* cleanup macrobar

* use and add info to fieldlabel

* add useCallback optimizations

* add confirm dialog component

* cleanup delete buttons

* revert info on field label

* cleanup combobox focus

* cleanup icons

* set default label for delay

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-26 08:21:17 +00:00
Adam Shiervani 5708653617 chore(dev_deploy): update logging for websocket in deployment script (#348) 2025-09-26 08:21:17 +00:00
Aveline 4aa37e2aa7 chore(websocket): logging and metrics improvement (#347)
* chore(websocket): only show warning if websocket is closed abnormally

* chore(websocket): add counter for ping requests received
2025-09-26 08:21:17 +00:00
Aveline daf28ac225 feat(websocket): handle ping messages sent from react and add logging (#346) 2025-09-26 08:21:17 +00:00
Adam Shiervani f1ba567ca3 fix(ui): adjust layout and z-index for improved UI consistency in KvmIdRoute (#345) 2025-09-26 08:21:17 +00:00
Adam Shiervani c14149f547 fix(ui): update WebRTCVideo component to properly animate on peer connection state (#343) 2025-09-26 08:21:17 +00:00