Compare commits

...

5 Commits

Author SHA1 Message Date
Marc Brooks a6b9502ffe
chore(ui): Removed unused DeviceSettingState
Now that we don't do any mouse/trackpad sensitivity settings, this whole interface is unused.
2025-05-22 06:34:31 -05:00
Siyuan Miao 0cee284561 chore: bump version to 0.4.1 2025-05-22 11:17:00 +02:00
Siyuan Miao 2272247668 chore: fix linter issues 2025-05-22 11:16:30 +02:00
Aveline 21e30c60ea
fix: display scaling broken (#499) 2025-05-22 11:01:28 +02:00
Aveline 25e30f6420
refactor: remove init functions (#489) 2025-05-22 10:29:16 +02:00
11 changed files with 18 additions and 26 deletions

View File

@ -4,6 +4,7 @@ linters:
- forbidigo
- misspell
- whitespace
- gochecknoinits
settings:
forbidigo:
forbid:
@ -22,6 +23,9 @@ linters:
- linters:
- errcheck
path: _test.go
- linters:
- gochecknoinits
path: internal/logging/sse.go
paths:
- third_party$
- builtin$

View File

@ -2,8 +2,8 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
BUILDDATE ?= $(shell date -u +%FT%T%z)
BUILDTS ?= $(shell date -u +%s)
REVISION ?= $(shell git rev-parse HEAD)
VERSION_DEV := 0.4.1-dev$(shell date +%Y%m%d%H%M)
VERSION := 0.4.0
VERSION_DEV := 0.4.2-dev$(shell date +%Y%m%d%H%M)
VERSION := 0.4.1
PROMETHEUS_TAG := github.com/prometheus/common/version
KVM_PKG_NAME := github.com/jetkvm/kvm

View File

@ -370,9 +370,7 @@ func startBacklightTickers() {
}
}
func init() {
ensureConfigLoaded()
func initDisplay() {
go func() {
waitCtrlClientConnected()
displayLogger.Info().Msg("setting initial display contents")

View File

@ -15,9 +15,7 @@ func rpcGetJigglerState() bool {
return jigglerEnabled
}
func init() {
ensureConfigLoaded()
func initJiggler() {
go runJiggler()
}

View File

@ -75,8 +75,8 @@ func Main() {
}
}()
// initialize usb gadget
initUsbGadget()
if err := setInitialVirtualMediaState(); err != nil {
logger.Warn().Err(err).Msg("failed to set initial virtual media state")
}
@ -84,6 +84,10 @@ func Main() {
if err := initImagesFolder(); err != nil {
logger.Warn().Err(err).Msg("failed to init images folder")
}
initJiggler()
// initialize display
initDisplay()
go func() {
time.Sleep(15 * time.Minute)

View File

@ -674,7 +674,6 @@ export default function WebRTCVideo() {
<div className="grid grow grid-rows-(--grid-bodyFooter) overflow-hidden">
<div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden">
<div className="relative flex h-full w-full items-center justify-center">
<div className="relative inline-block">
{/* In relative mouse mode and under https, we enable the pointer lock, and to do so we need a bar to show the user to click on the video to enable mouse control */}
<PointerLockBar show={showPointerLockBar} />
<video
@ -688,7 +687,7 @@ export default function WebRTCVideo() {
disablePictureInPicture
controlsList="nofullscreen"
className={cx(
"z-30 max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
"max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
{
"cursor-none": settings.isCursorHidden,
"opacity-0":
@ -720,7 +719,6 @@ export default function WebRTCVideo() {
)}
</div>
</div>
</div>
<VirtualKeyboard />
</div>
</div>

View File

@ -344,17 +344,6 @@ export const useSettingsStore = create(
),
);
export interface DeviceSettingsState {
trackpadSensitivity: number;
mouseSensitivity: number;
clampMin: number;
clampMax: number;
blockDelay: number;
trackpadThreshold: number;
scrollSensitivity: "low" | "default" | "high";
setScrollSensitivity: (sensitivity: DeviceSettingsState["scrollSensitivity"]) => void;
}
export interface RemoteVirtualMediaState {
source: "WebRTC" | "HTTP" | "Storage" | null;
mode: "CDROM" | "Disk" | null;

View File

@ -11,7 +11,7 @@ import { chars as chars_sv_SE, name as name_sv_SE } from "@/keyboardLayouts/sv_S
import { chars as chars_fr_CH, name as name_fr_CH } from "@/keyboardLayouts/fr_CH"
import { chars as chars_de_CH, name as name_de_CH } from "@/keyboardLayouts/de_CH"
type KeyInfo = { key: string | number; shift?: boolean, altRight?: boolean }
interface KeyInfo { key: string | number; shift?: boolean, altRight?: boolean }
export type KeyCombo = KeyInfo & { deadKey?: boolean, accentKey?: KeyInfo }
export const layouts: Record<string, string> = {

View File

@ -1,4 +1,5 @@
import { KeyCombo } from "../keyboardLayouts"
import { chars as chars_de_CH } from "./de_CH"
export const name = "Français de Suisse";

View File

@ -25,7 +25,7 @@ export default function SettingsKeyboardRoute() {
if ("error" in resp) return;
setKeyboardLayout(resp.result as string);
});
}, []);
}, []); // eslint-disable-line react-hooks/exhaustive-deps
const onKeyboardLayoutChange = useCallback(
(e: React.ChangeEvent<HTMLSelectElement>) => {

View File

@ -20,8 +20,8 @@ import { LinkButton } from "@/components/Button";
import LoadingSpinner from "@/components/LoadingSpinner";
import { useUiStore } from "@/hooks/stores";
import useKeyboard from "@/hooks/useKeyboard";
import { FeatureFlag } from "../components/FeatureFlag";
import { FeatureFlag } from "../components/FeatureFlag";
import { cx } from "../cva.config";