mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-20 02:04:15 +01:00
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.
This commit is contained in:
@@ -18,11 +18,9 @@ import useWebSocket from "react-use-websocket";
|
||||
|
||||
import { cx } from "@/cva.config";
|
||||
import {
|
||||
DeviceSettingsState,
|
||||
HidState,
|
||||
NetworkState,
|
||||
UpdateState,
|
||||
useDeviceSettingsStore,
|
||||
useDeviceStore,
|
||||
useHidStore,
|
||||
useMountMediaStore,
|
||||
@@ -714,21 +712,6 @@ export default function KvmIdRoute() {
|
||||
});
|
||||
}, [appVersion, send, setAppVersion, setSystemVersion]);
|
||||
|
||||
const setScrollSensitivity = useDeviceSettingsStore(
|
||||
state => state.setScrollSensitivity,
|
||||
);
|
||||
|
||||
// Initialize device settings
|
||||
useEffect(
|
||||
function initializeDeviceSettings() {
|
||||
send("getScrollSensitivity", {}, resp => {
|
||||
if ("error" in resp) return;
|
||||
setScrollSensitivity(resp.result as DeviceSettingsState["scrollSensitivity"]);
|
||||
});
|
||||
},
|
||||
[send, setScrollSensitivity],
|
||||
);
|
||||
|
||||
const ConnectionStatusElement = useMemo(() => {
|
||||
const hasConnectionFailed =
|
||||
connectionFailed || ["failed", "closed"].includes(peerConnectionState || "");
|
||||
|
||||
Reference in New Issue
Block a user