mirror of https://github.com/jetkvm/kvm.git
ui(actionBar): remove Ctrl + Alt + Del in favor of Keyboard Macros
This commit is contained in:
parent
a1ed28c676
commit
ffeaf8cced
|
@ -1,6 +1,6 @@
|
|||
import { MdOutlineContentPasteGo } from "react-icons/md";
|
||||
import { LuCable, LuHardDrive, LuMaximize, LuSettings, LuSignal } from "react-icons/lu";
|
||||
import { FaKeyboard, FaLock} from "react-icons/fa6";
|
||||
import { FaKeyboard } from "react-icons/fa6";
|
||||
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
|
||||
import { Fragment, useCallback, useRef } from "react";
|
||||
import { CommandLineIcon } from "@heroicons/react/20/solid";
|
||||
|
@ -19,8 +19,6 @@ import WakeOnLanModal from "@/components/popovers/WakeOnLan/Index";
|
|||
import MountPopopover from "@/components/popovers/MountPopover";
|
||||
import ExtensionPopover from "@/components/popovers/ExtensionPopover";
|
||||
import { useDeviceUiNavigation } from "@/hooks/useAppNavigation";
|
||||
import useKeyboard from "@/hooks/useKeyboard";
|
||||
import { keys, modifiers } from "@/keyboardMappings";
|
||||
|
||||
export default function Actionbar({
|
||||
requestFullscreen,
|
||||
|
@ -58,8 +56,6 @@ export default function Actionbar({
|
|||
[setDisableFocusTrap],
|
||||
);
|
||||
|
||||
const { sendKeyboardEvent, resetKeyboardState } = useKeyboard();
|
||||
|
||||
return (
|
||||
<Container className="border-b border-b-slate-800/20 bg-white dark:border-b-slate-300/20 dark:bg-slate-900">
|
||||
<div
|
||||
|
@ -266,7 +262,7 @@ export default function Actionbar({
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
{useSettingsStore().actionBarCtrlAltDel && (
|
||||
{/* {useSettingsStore().actionBarCtrlAltDel && (
|
||||
<div className="hidden lg:block">
|
||||
<Button
|
||||
size="XS"
|
||||
|
@ -282,7 +278,7 @@ export default function Actionbar({
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
)} */}
|
||||
<div>
|
||||
<Button
|
||||
size="XS"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { SettingsPageHeader } from "@components/SettingsPageheader";
|
||||
import { SettingsItem } from "@routes/devices.$id.settings";
|
||||
import { BacklightSettings, useSettingsStore } from "@/hooks/stores";
|
||||
import { useJsonRpc } from "@/hooks/useJsonRpc";
|
||||
import Checkbox from "@components/Checkbox";
|
||||
import { SelectMenuBasic } from "@components/SelectMenuBasic";
|
||||
import { UsbDeviceSetting } from "@components/UsbDeviceSetting";
|
||||
|
||||
|
@ -12,14 +11,6 @@ import notifications from "../notifications";
|
|||
import { UsbInfoSetting } from "../components/UsbInfoSetting";
|
||||
import { FeatureFlag } from "../components/FeatureFlag";
|
||||
|
||||
export interface ActionBarConfig {
|
||||
ctrlAltDel: boolean;
|
||||
}
|
||||
|
||||
const defaultActionBarConfig: ActionBarConfig = {
|
||||
ctrlAltDel: false,
|
||||
};
|
||||
|
||||
export default function SettingsHardwareRoute() {
|
||||
const [send] = useJsonRpc();
|
||||
const settings = useSettingsStore();
|
||||
|
@ -80,18 +71,6 @@ export default function SettingsHardwareRoute() {
|
|||
});
|
||||
}, [send, setBacklightSettings]);
|
||||
|
||||
const [actionBarConfig, setActionBarConfig] = useState<ActionBarConfig>(defaultActionBarConfig);
|
||||
|
||||
const onActionBarItemChange = useCallback(
|
||||
(key: keyof ActionBarConfig) => (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setActionBarConfig(prev => ({
|
||||
...prev,
|
||||
[key]: e.target.checked,
|
||||
}));
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<SettingsPageHeader
|
||||
|
@ -137,7 +116,7 @@ export default function SettingsHardwareRoute() {
|
|||
}}
|
||||
/>
|
||||
</SettingsItem>
|
||||
<SettingsItem
|
||||
{/* <SettingsItem
|
||||
title="Enable Ctrl+Alt+Del Action Bar"
|
||||
description="Enable or disable the action bar action for sending a Ctrl+Alt+Del to the host"
|
||||
>
|
||||
|
@ -145,7 +124,7 @@ export default function SettingsHardwareRoute() {
|
|||
checked={actionBarConfig.ctrlAltDel}
|
||||
onChange={onActionBarItemChange("ctrlAltDel")}
|
||||
/>
|
||||
</SettingsItem>
|
||||
</SettingsItem> */}
|
||||
{settings.backlightSettings.max_brightness != 0 && (
|
||||
<>
|
||||
<SettingsItem
|
||||
|
|
Loading…
Reference in New Issue