mirror of https://github.com/jetkvm/kvm.git
Move FeatureFlag to navigation
This commit is contained in:
parent
a4c15d5c7e
commit
1460fc5ac2
|
@ -6,7 +6,6 @@ import notifications from "@/notifications";
|
||||||
import { SettingsPageHeader } from "@components/SettingsPageheader";
|
import { SettingsPageHeader } from "@components/SettingsPageheader";
|
||||||
import { layouts } from "@/keyboardLayouts";
|
import { layouts } from "@/keyboardLayouts";
|
||||||
|
|
||||||
import { FeatureFlag } from "../components/FeatureFlag";
|
|
||||||
import { SelectMenuBasic } from "../components/SelectMenuBasic";
|
import { SelectMenuBasic } from "../components/SelectMenuBasic";
|
||||||
|
|
||||||
import { SettingsItem } from "./devices.$id.settings";
|
import { SettingsItem } from "./devices.$id.settings";
|
||||||
|
@ -52,25 +51,23 @@ export default function SettingsKeyboardRoute() {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<FeatureFlag minAppVersion="0.4.0" name="Paste text">
|
{ /* this menu item could be renamed to plain "Keyboard layout" in the future, when also the virtual keyboard layout mappings are being implemented */ }
|
||||||
{ /* this menu item could be renamed to plain "Keyboard layout" in the future, when also the virtual keyboard layout mappings are being implemented */ }
|
<SettingsItem
|
||||||
<SettingsItem
|
title="Paste text"
|
||||||
title="Paste text"
|
description="Keyboard layout of target operating system"
|
||||||
description="Keyboard layout of target operating system"
|
>
|
||||||
>
|
<SelectMenuBasic
|
||||||
<SelectMenuBasic
|
size="SM"
|
||||||
size="SM"
|
label=""
|
||||||
label=""
|
fullWidth
|
||||||
fullWidth
|
value={keyboardLayout}
|
||||||
value={keyboardLayout}
|
onChange={onKeyboardLayoutChange}
|
||||||
onChange={onKeyboardLayoutChange}
|
options={layoutOptions}
|
||||||
options={layoutOptions}
|
/>
|
||||||
/>
|
</SettingsItem>
|
||||||
</SettingsItem>
|
<p className="text-xs text-slate-600 dark:text-slate-400">
|
||||||
<p className="text-xs text-slate-600 dark:text-slate-400">
|
Pasting text sends individual key strokes to the target device. The keyboard layout determines which key codes are being sent. Ensure that the keyboard layout in JetKVM matches the settings in the operating system.
|
||||||
Pasting text sends individual key strokes to the target device. The keyboard layout determines which key codes are being sent. Ensure that the keyboard layout in JetKVM matches the settings in the operating system.
|
</p>
|
||||||
</p>
|
|
||||||
</FeatureFlag>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import { LinkButton } from "@/components/Button";
|
||||||
import LoadingSpinner from "@/components/LoadingSpinner";
|
import LoadingSpinner from "@/components/LoadingSpinner";
|
||||||
import { useUiStore } from "@/hooks/stores";
|
import { useUiStore } from "@/hooks/stores";
|
||||||
import useKeyboard from "@/hooks/useKeyboard";
|
import useKeyboard from "@/hooks/useKeyboard";
|
||||||
|
import { FeatureFlag } from "../components/FeatureFlag";
|
||||||
|
|
||||||
import { cx } from "../cva.config";
|
import { cx } from "../cva.config";
|
||||||
|
|
||||||
|
@ -156,17 +157,19 @@ export default function SettingsRoute() {
|
||||||
</div>
|
</div>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
<div className="shrink-0">
|
<FeatureFlag minAppVersion="0.4.0" name="Paste text">
|
||||||
<NavLink
|
<div className="shrink-0">
|
||||||
to="keyboard"
|
<NavLink
|
||||||
className={({ isActive }) => (isActive ? "active" : "")}
|
to="keyboard"
|
||||||
>
|
className={({ isActive }) => (isActive ? "active" : "")}
|
||||||
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent">
|
>
|
||||||
<LuKeyboard className="h-4 w-4 shrink-0" />
|
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent">
|
||||||
<h1>Keyboard</h1>
|
<LuKeyboard className="h-4 w-4 shrink-0" />
|
||||||
</div>
|
<h1>Keyboard</h1>
|
||||||
</NavLink>
|
</div>
|
||||||
</div>
|
</NavLink>
|
||||||
|
</div>
|
||||||
|
</FeatureFlag>
|
||||||
<div className="shrink-0">
|
<div className="shrink-0">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="video"
|
to="video"
|
||||||
|
|
Loading…
Reference in New Issue