History

Use Yes/No labels for desktop worktree confirm

Julius Marminge committed 9 months ago

Commit b6523a11 parent 8a4fed12 files · +3 −3Browse files

Unified · Split

2 files
  1. apps/desktop/src/confirmDialog.test.ts +2 −2
  2. apps/desktop/src/confirmDialog.ts +1 −1
apps/desktop/src/confirmDialog.test.ts+2−2
@@ -35,7 +35,7 @@ describe("showDesktopConfirmDialog", () => { · 34 unmodified lines
35 expect(showMessageBoxMock).toHaveBeenCalledWith(35 expect(showMessageBoxMock).toHaveBeenCalledWith(
36 ownerWindow,36 ownerWindow,
37 expect.objectContaining({37 expect.objectContaining({
38 buttons: ["Cancel", "Confirm"],38 buttons: ["No", "Yes"],
39 message: "Delete worktree?",39 message: "Delete worktree?",
40 }),40 }),
41 );41 );
@@ -49,7 +49,7 @@ describe("showDesktopConfirmDialog", () => { · 7 unmodified lines
49 expect(result).toBe(false);49 expect(result).toBe(false);
50 expect(showMessageBoxMock).toHaveBeenCalledWith(50 expect(showMessageBoxMock).toHaveBeenCalledWith(
51 expect.objectContaining({51 expect.objectContaining({
52 buttons: ["Cancel", "Confirm"],52 buttons: ["No", "Yes"],
53 message: "Delete worktree?",53 message: "Delete worktree?",
54 }),54 }),
55 );55 );
apps/desktop/src/confirmDialog.ts+1−1
@@ -13,7 +13,7 @@ export async function showDesktopConfirmDialog( · 12 unmodified lines
13 13
14 const options = {14 const options = {
15 type: "question" as const,15 type: "question" as const,
16 buttons: ["Cancel", "Confirm"],16 buttons: ["No", "Yes"],
17 defaultId: CONFIRM_BUTTON_INDEX,17 defaultId: CONFIRM_BUTTON_INDEX,
18 cancelId: 0,18 cancelId: 0,
19 noLink: true,19 noLink: true,