mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-22 16:58:28 +02:00
Align branch with main: switch to vite-plus and reformat
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -512,13 +512,13 @@ function HttpRequestArg({
|
||||
value={value}
|
||||
disabled={arg.disabled}
|
||||
options={httpRequests.map((r) => {
|
||||
return {
|
||||
label:
|
||||
buildRequestBreadcrumbs(r, folders).join(" / ") +
|
||||
(r.id === activeHttpRequest?.id ? " (current)" : ""),
|
||||
value: r.id,
|
||||
};
|
||||
})}
|
||||
return {
|
||||
label:
|
||||
buildRequestBreadcrumbs(r, folders).join(" / ") +
|
||||
(r.id === activeHttpRequest?.id ? " (current)" : ""),
|
||||
value: r.id,
|
||||
};
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,13 +62,17 @@ export function SegmentedControl<T extends string>({
|
||||
if (e.key === "ArrowRight") {
|
||||
e.preventDefault();
|
||||
const newIndex = Math.abs((selectedIndex + 1) % options.length);
|
||||
if (options[newIndex]) { setSelectedValue(options[newIndex].value); }
|
||||
if (options[newIndex]) {
|
||||
setSelectedValue(options[newIndex].value);
|
||||
}
|
||||
const child = containerRef.current?.children[newIndex] as HTMLButtonElement;
|
||||
child.focus();
|
||||
} else if (e.key === "ArrowLeft") {
|
||||
e.preventDefault();
|
||||
const newIndex = Math.abs((selectedIndex - 1) % options.length);
|
||||
if (options[newIndex]) { setSelectedValue(options[newIndex].value); }
|
||||
if (options[newIndex]) {
|
||||
setSelectedValue(options[newIndex].value);
|
||||
}
|
||||
const child = containerRef.current?.children[newIndex] as HTMLButtonElement;
|
||||
child.focus();
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ import { Document, Page } from "react-pdf";
|
||||
import { useContainerSize } from "@yaakapp-internal/ui";
|
||||
import { fireAndForget } from "../../lib/fireAndForget";
|
||||
|
||||
fireAndForget(import("react-pdf").then(({ pdfjs }) => {
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
|
||||
"pdfjs-dist/build/pdf.worker.min.mjs",
|
||||
import.meta.url,
|
||||
).toString();
|
||||
}));
|
||||
fireAndForget(
|
||||
import("react-pdf").then(({ pdfjs }) => {
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
|
||||
"pdfjs-dist/build/pdf.worker.min.mjs",
|
||||
import.meta.url,
|
||||
).toString();
|
||||
}),
|
||||
);
|
||||
|
||||
interface Props {
|
||||
bodyPath?: string;
|
||||
|
||||
Reference in New Issue
Block a user