fix: resolve admin issue review findings and record verification
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from "../api/pi-management";
|
||||
import { listModels } from "../api/models";
|
||||
import { Button } from "../components/ui/button";
|
||||
import { nextTabIndex } from "../components/ui/tab-navigation";
|
||||
import { WorkAreaPanel } from "./WorkAreaPanel";
|
||||
|
||||
type Feedback = { tone: "success" | "error"; message: string } | undefined;
|
||||
@@ -214,18 +215,10 @@ function PiPlatformInstructions({ hostPlatform }: { hostPlatform?: PiPlatform })
|
||||
|
||||
function handleTabKeyDown(event: React.KeyboardEvent<HTMLButtonElement>, platform: PiPlatform) {
|
||||
const index = piPlatforms.findIndex((item) => item.id === platform);
|
||||
const nextPlatform = event.key === "ArrowRight"
|
||||
? piPlatforms[(index + 1) % piPlatforms.length]
|
||||
: event.key === "ArrowLeft"
|
||||
? piPlatforms[(index - 1 + piPlatforms.length) % piPlatforms.length]
|
||||
: event.key === "Home"
|
||||
? piPlatforms[0]
|
||||
: event.key === "End"
|
||||
? piPlatforms[piPlatforms.length - 1]
|
||||
: undefined;
|
||||
if (!nextPlatform) return;
|
||||
const next = nextTabIndex(event.key, index, piPlatforms.length);
|
||||
if (next === undefined) return;
|
||||
event.preventDefault();
|
||||
activateAndFocus(nextPlatform.id);
|
||||
activateAndFocus(piPlatforms[next].id);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user