Commit Graph

199 Commits

Author SHA1 Message Date
Alex Goodkind 94d016d353 feat: add local web server loopback mode configuration (#511)
* feat: add local web server loopback mode configuration

- Introduced a new configuration option `LocalWebServerLoopbackOnly` to restrict the web server to listen only on the loopback interface.
- Added RPC methods `rpcGetLocalWebServerLoopbackOnly` and `rpcSetLocalWebServerLoopbackOnly` for retrieving and updating this setting.
- Updated the web server startup logic to bind to the appropriate address based on the new configuration.
- Modified the `LocalDevice` struct to include the loopback setting in the response.

* remove extra logs

* chore: add VSCode extensions for improved development environment

* refactor: rename LocalWebServerLoopbackOnly to LocalLoopbackOnly

- Updated the configuration struct and related RPC methods to use the new name `LocalLoopbackOnly` for clarity.
- Adjusted the web server binding logic and device response structure to reflect this change.

* feat: add loopback-only mode functionality to UI

- Implemented a new setting for enabling loopback-only mode, restricting web interface access to localhost.
- Added a confirmation dialog to warn users before enabling this feature.
- Updated the ConfirmDialog component to accept React nodes for the description prop.
- Refactored imports and adjusted component structure for clarity.

* refactor: optimize device settings handlers for better performance

- Refactored the `handleDevChannelChange` and `handleLoopbackOnlyModeChange` functions to use `useCallback` for improved performance and to prevent unnecessary re-renders.
- Consolidated the logic for applying loopback-only mode into a separate `applyLoopbackOnlyMode` function, enhancing code clarity and maintainability.
- Updated the confirmation flow for enabling loopback-only mode to ensure user warnings are displayed appropriately.
2025-09-26 08:21:18 +00:00
Marc Brooks 89fe0eaa42 feat(ui): Add Ctrl+Alt+Del to the action bar (#498)
Since this is the sort of thing we do all the time, make it one-click away
2025-09-26 08:21:18 +00:00
Marc Brooks b90756d1ee chore(ui): Removed unused DeviceSettingState (#496)
Now that we don't do any mouse/trackpad sensitivity settings, this whole interface is unused.
2025-09-26 08:21:18 +00:00
Aveline 2953839784 feat(websecure): add support for ed25519 certificates (#513) 2025-09-26 08:21:18 +00:00
ariedel87 7fb9dc9881 feat(Keyboard): Hide Pressed Keys (#518) 2025-09-26 08:21:18 +00:00
Alex Goodkind 97bbab7826 chore: add VSCode extensions for improved development environment (#509) 2025-09-26 08:21:17 +00:00
Marc Brooks 08471e75a0 fix(ui): Default the keyboardLayout to en-US if not set (#512)
The recent fix to PasteModal will silently fail a paste if the keyboardLayout hasn't been selected in the settings yet, then when you look in Settings it looks like it's set to Belgian, but it's really just blank. Set it to default to en-US in both these places so it works like it did previously.

Fixes #492
2025-09-26 08:21:17 +00:00
Aveline a6715df6f0 feat: allow user to disable keyboard LED synchronization (#507)
* feat: allow user to disable keyboard LED synchronization

* Update ui/src/hooks/stores.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-26 08:21:17 +00:00
adammkelly 57ee095c40 chore(ui): Allow mac address copying (#504) (#506) 2025-09-26 08:21:17 +00:00
Aveline 44e361f7a3 feat: sync keyboard led status (#502) 2025-09-26 08:21:17 +00:00
Siyuan Miao 7b5d9ca3cd chore: bump version to 0.4.1 2025-09-26 08:21:17 +00:00
Siyuan Miao cc31689f75 chore: fix linter issues 2025-09-26 08:21:17 +00:00
Aveline 10c1f9bf6e fix: display scaling broken (#499) 2025-09-26 08:21:17 +00:00
Aveline 0fca85a6b4 refactor: remove init functions (#489) 2025-09-26 08:21:17 +00:00
Daniel Lorch 31752ad2fd feat(ui): enable multiple keyboard layouts for "paste text" to remote host (#405)
* Enable multiple keyboard layouts for paste text from host

* Trema is the more robust method for capital umlauts

* Improve error handling and pre-loading

* Improve accent handling

* Remove obscure Alt-Gr keys, unsure if they are supported everywhere

* Add Swiss French

* Change line ordering

* Fix whitespace

* Add French (France)

* Add English (UK)

* Add Swedish

* Add Spanish

* Fix fr_FR special characters

* Add more keys to Spanish

* Remove default value shift: false

* Add Norwegian

* Operator precedence 🤦

* Add Italian

* Add Czech

* Move guard statements outside of loop

* Move language name definitions into the keyboard layout files

* Change the locale names to their native language

German->Deutsch et. al.

* Move hold key handling into Go backend analogous to https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt

* Remove trailing whitespace

* Fix

* Add Belgisch Nederlands

* Add JSONRPC handling

* Use useSettingsStore

* Revert "Move hold key handling into Go backend analogous to https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt"

This reverts commit 146cee9309.

* Move FeatureFlag to navigation

* Fix: flip Y/Z

* Add useEffect dependencies

* Embolden language

* Add to useCallback dependencies

---------

Co-authored-by: Marc Brooks <IDisposable@gmail.com>
2025-09-26 08:21:17 +00:00
Marc Brooks 714c419197 Handle panics when calling the RPCHandler instead of dying (#488)
Added a wrapper around the callRPCHandler function to recover from panic and translate that to and error so that the RPC thread doesn't just die when something malformed comes in. This should keep the Jet flying.
2025-09-26 08:21:17 +00:00
Siyuan Miao 3ee732eced chore: bump version to 0.4.0 2025-09-26 08:21:17 +00:00
Siyuan Miao 75b2f5da4b build: enable trimpath for both dev and prod releases 2025-09-26 08:21:17 +00:00
Adam Shiervani 48a3dfd7a8 style(ui): update styling for access and network settings components (#487)
* style(ui): update styling for access and network settings components

* fix(ui): simplify conditional rendering in network settings component
2025-09-26 08:21:17 +00:00
Siyuan Miao 9b7a58db3d build: add trimpath to go build command 2025-09-26 08:21:17 +00:00
Aveline e1b32a94d9 chore: upgrade golang to 1.24.3 and nodejs to 22.x (#483) 2025-09-26 08:21:17 +00:00
Adam Shiervani d0b0c096f8 refactor: network settings UI (#486)
* feat(ui): update prettier configuration and quote styles

- Add cx to tailwind functions
- Set tailwind stylesheet path
- Convert single quotes to double quotes in CSS
- Add prettier ignore comments for animation utilities

* refactor(ui): extract network information into separate components

- Create DhcpLeaseCard component
- Create Ipv6NetworkCard component

* style(ui): refine component styling and layout

- Add padding to AutoHeight component
- Improve lifetime label display format
- Enhance network information card layouts

* style(ui): enhance checkbox and radio button styling

- Update Checkbox component to use form-checkbox class
- Refactor radio button classes for consistency across components

* style(ui): Add opacity for fade-in animations

* refactor(ui): enhance Modal and network settings components

- Add stable scrollbar gutter to Modal component
- Refactor custom domain input handling and layout adjustments
2025-09-26 08:21:17 +00:00
Aveline 1a301ff7a3 chore: always return local version if update check fails (#485) 2025-09-26 08:21:17 +00:00
Aveline fa92516e35 chore: reset usb after updating config (#482)
* fix(usbgadget): do not panic if a change isn't found

* chore(usbgadget): rebind usb after updating config
2025-09-26 08:21:17 +00:00
Aveline 93be974e93 fix(usbgadget): do not panic if a change isn't found (#481)
* fix(usbgadget): do not panic if a change isn't found

* chore(usbgadget): rebind usb after updating config
2025-09-26 08:21:17 +00:00
Siyuan Miao 7587caa5c8 fix: jetkvm_app path is now bin/jetkvm_app 2025-09-26 08:21:17 +00:00
Aveline 77507bb831 fix: configFS might not be mounted if the directory exists (#479) 2025-09-26 08:21:17 +00:00
Siyuan Miao f34dbcdb41 build: set up golang (smoketest) 2025-09-26 08:21:17 +00:00
Siyuan Miao d3addba37a build: add device-tests 2025-09-26 08:21:17 +00:00
Siyuan Miao eeeb65bbaf fix: add missing files for building unit tests 2025-09-26 08:21:17 +00:00
Aveline f5642870f7 fix: unit test not returning error when test fails
* fix: unit test not returning error when test fails

* chore: add unit test to smoketest.yml

* fix: make linter happy
2025-09-26 08:21:17 +00:00
Adam Shiervani eb1052a424 refactor: remove scroll sensitivity functionality and clean up related code (#477)
- Removed scroll sensitivity state and associated functions from jsonrpc.go and WebRTCVideo component.
- Cleaned up device settings store by eliminating unused scroll sensitivity logic.
- Updated mouse settings route to reflect the removal of scroll sensitivity feature.
- Simplified mouse wheel event handling in WebRTCVideo component.
2025-09-26 08:21:17 +00:00
Aveline a942cd02a8 chore(usbgadget): update usbgadget config only when needed (#474) 2025-09-26 08:21:17 +00:00
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