Skip to content

Commit ffeaf8c

Browse files
committed
ui(actionBar): remove Ctrl + Alt + Del in favor of Keyboard Macros
1 parent a1ed28c commit ffeaf8c

File tree

2 files changed

+6
-31
lines changed

2 files changed

+6
-31
lines changed

ui/src/components/ActionBar.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MdOutlineContentPasteGo } from "react-icons/md";
22
import { LuCable, LuHardDrive, LuMaximize, LuSettings, LuSignal } from "react-icons/lu";
3-
import { FaKeyboard, FaLock} from "react-icons/fa6";
3+
import { FaKeyboard } from "react-icons/fa6";
44
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
55
import { Fragment, useCallback, useRef } from "react";
66
import { CommandLineIcon } from "@heroicons/react/20/solid";
@@ -19,8 +19,6 @@ import WakeOnLanModal from "@/components/popovers/WakeOnLan/Index";
1919
import MountPopopover from "@/components/popovers/MountPopover";
2020
import ExtensionPopover from "@/components/popovers/ExtensionPopover";
2121
import { useDeviceUiNavigation } from "@/hooks/useAppNavigation";
22-
import useKeyboard from "@/hooks/useKeyboard";
23-
import { keys, modifiers } from "@/keyboardMappings";
2422

2523
export default function Actionbar({
2624
requestFullscreen,
@@ -58,8 +56,6 @@ export default function Actionbar({
5856
[setDisableFocusTrap],
5957
);
6058

61-
const { sendKeyboardEvent, resetKeyboardState } = useKeyboard();
62-
6359
return (
6460
<Container className="border-b border-b-slate-800/20 bg-white dark:border-b-slate-300/20 dark:bg-slate-900">
6561
<div
@@ -266,7 +262,7 @@ export default function Actionbar({
266262
}}
267263
/>
268264
</div>
269-
{useSettingsStore().actionBarCtrlAltDel && (
265+
{/* {useSettingsStore().actionBarCtrlAltDel && (
270266
<div className="hidden lg:block">
271267
<Button
272268
size="XS"
@@ -282,7 +278,7 @@ export default function Actionbar({
282278
}}
283279
/>
284280
</div>
285-
)}
281+
)} */}
286282
<div>
287283
<Button
288284
size="XS"

ui/src/routes/devices.$id.settings.hardware.tsx

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
import { useCallback, useEffect, useState } from "react";
1+
import { useEffect } from "react";
22

33
import { SettingsPageHeader } from "@components/SettingsPageheader";
44
import { SettingsItem } from "@routes/devices.$id.settings";
55
import { BacklightSettings, useSettingsStore } from "@/hooks/stores";
66
import { useJsonRpc } from "@/hooks/useJsonRpc";
7-
import Checkbox from "@components/Checkbox";
87
import { SelectMenuBasic } from "@components/SelectMenuBasic";
98
import { UsbDeviceSetting } from "@components/UsbDeviceSetting";
109

1110
import notifications from "../notifications";
1211
import { UsbInfoSetting } from "../components/UsbInfoSetting";
1312
import { FeatureFlag } from "../components/FeatureFlag";
1413

15-
export interface ActionBarConfig {
16-
ctrlAltDel: boolean;
17-
}
18-
19-
const defaultActionBarConfig: ActionBarConfig = {
20-
ctrlAltDel: false,
21-
};
22-
2314
export default function SettingsHardwareRoute() {
2415
const [send] = useJsonRpc();
2516
const settings = useSettingsStore();
@@ -80,18 +71,6 @@ export default function SettingsHardwareRoute() {
8071
});
8172
}, [send, setBacklightSettings]);
8273

83-
const [actionBarConfig, setActionBarConfig] = useState<ActionBarConfig>(defaultActionBarConfig);
84-
85-
const onActionBarItemChange = useCallback(
86-
(key: keyof ActionBarConfig) => (e: React.ChangeEvent<HTMLInputElement>) => {
87-
setActionBarConfig(prev => ({
88-
...prev,
89-
[key]: e.target.checked,
90-
}));
91-
},
92-
[],
93-
);
94-
9574
return (
9675
<div className="space-y-4">
9776
<SettingsPageHeader
@@ -137,15 +116,15 @@ export default function SettingsHardwareRoute() {
137116
}}
138117
/>
139118
</SettingsItem>
140-
<SettingsItem
119+
{/* <SettingsItem
141120
title="Enable Ctrl+Alt+Del Action Bar"
142121
description="Enable or disable the action bar action for sending a Ctrl+Alt+Del to the host"
143122
>
144123
<Checkbox
145124
checked={actionBarConfig.ctrlAltDel}
146125
onChange={onActionBarItemChange("ctrlAltDel")}
147126
/>
148-
</SettingsItem>
127+
</SettingsItem> */}
149128
{settings.backlightSettings.max_brightness != 0 && (
150129
<>
151130
<SettingsItem

0 commit comments

Comments
 (0)