Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/DevboxActionsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@
] as const;
const currentFieldIndex = snapshotFields.indexOf(snapshotFormField);

if (input === "q" || key.escape) {
const isInTextField =
snapshotFormField === "name" ||
snapshotFormField === "commit_message";
if (key.escape || (!isInTextField && input === "q")) {
// Cancel snapshot form
setSnapshotFormMode(false);
setSnapshotName("");
Expand Down Expand Up @@ -490,10 +493,10 @@
input === "o" &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "tunnel"

Check warning on line 496 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
// Open tunnel URL in browser
const tunnelUrl = (operationResult as any).__tunnelUrl;

Check warning on line 499 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (tunnelUrl) {
openInBrowser(tunnelUrl);
setCopyStatus("Opened in browser!");
Expand All @@ -503,46 +506,46 @@
(key.upArrow || input === "k") &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 509 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
setExecScroll(Math.max(0, execScroll - 1));
} else if (
(key.downArrow || input === "j") &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 516 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
setExecScroll(execScroll + 1);
} else if (
key.pageUp &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 523 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
setExecScroll(Math.max(0, execScroll - 10));
} else if (
key.pageDown &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 530 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
setExecScroll(execScroll + 10);
} else if (
input === "g" &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 537 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
setExecScroll(0);
} else if (
input === "G" &&
operationResult &&
typeof operationResult === "object" &&
(operationResult as any).__customRender === "exec"

Check warning on line 544 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) {
const lines = [
...((operationResult as any).stdout || "").split("\n"),

Check warning on line 547 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
...((operationResult as any).stderr || "").split("\n"),

Check warning on line 548 in src/components/DevboxActionsMenu.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
];
const maxScroll = Math.max(
0,
Expand Down
Loading