Skip to content

Commit

Permalink
chore: clean up the files for pre-commit that are required
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Dec 20, 2022
1 parent 9e5959d commit c107c27
Show file tree
Hide file tree
Showing 10 changed files with 725 additions and 748 deletions.
4 changes: 2 additions & 2 deletions app/main/nodemon.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"watch": ["src"],
"ext": "ts, css, png"
"watch": ["src"],
"ext": "ts, css, png"
}
4 changes: 2 additions & 2 deletions app/main/src/helpers/globalShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function activateGlobalShortcuts(shortcuts: ShortCut[]) {
}

export function activateFullScreenShortcuts(
exitFullScreenCallback: () => void
exitFullScreenCallback: () => void,
) {
globalShortcut.registerAll(
[EXIT_SHORTCUTS.ESCAPE, EXIT_SHORTCUTS.QUIT],
exitFullScreenCallback
exitFullScreenCallback,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Fullscreen break", () => {
setResizable: jest.spyOn(window, "setResizable"),
setVisibleOnAllWorkspaces: jest.spyOn(
window,
"setVisibleOnAllWorkspaces"
"setVisibleOnAllWorkspaces",
),
};
};
Expand Down Expand Up @@ -41,15 +41,15 @@ describe("Fullscreen break", () => {
isFullscreen: fullscreenState.isFullscreen,
trayTooltip,
tray,
}
},
);

// Verify that window has been setup to fullscreen
expect(windowSpies.show).toHaveBeenCalledTimes(1);
expect(windowSpies.focus).toHaveBeenCalledTimes(1);
expect(windowSpies.setAlwaysOnTop).toHaveBeenCalledWith(
true,
"screen-saver"
"screen-saver",
);
expect(windowSpies.setSkipTaskbar).toHaveBeenCalledWith(true);
expect(windowSpies.setFullScreen).toHaveBeenCalledWith(true);
Expand Down Expand Up @@ -90,15 +90,15 @@ describe("Fullscreen break", () => {
isFullscreen: fullscreenState.isFullscreen,
trayTooltip,
tray,
}
},
);

// Verify that window has been setup to fullscreen
expect(windowSpies.show).toHaveBeenCalledTimes(1);
expect(windowSpies.focus).toHaveBeenCalledTimes(1);
expect(windowSpies.setAlwaysOnTop).toHaveBeenCalledWith(
true,
"screen-saver"
"screen-saver",
);
expect(windowSpies.setSkipTaskbar).toHaveBeenCalledWith(false);
expect(windowSpies.setFullScreen).toHaveBeenCalledWith(false);
Expand Down
6 changes: 3 additions & 3 deletions app/main/src/lifecycleEventHandlers/fullScreenBreak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const setFullScreen = (
flag: boolean,
alwaysOnTop: boolean,
win: BrowserWindow | null,
isFullscreen: FullscreenState["isFullscreen"]
isFullscreen: FullscreenState["isFullscreen"],
) => {
if (flag) {
win?.setResizable(true);
Expand All @@ -48,7 +48,7 @@ const setFullScreen = (
*/
export const setFullscreenBreakHandler = (
fullscreenArgs: FullscreenArgs,
appArgs: AppArgs
appArgs: AppArgs,
) => {
const { shouldFullscreen, alwaysOnTop } = fullscreenArgs;
const { tray, trayTooltip, win, contextMenu, isFullscreen } = appArgs;
Expand All @@ -64,7 +64,7 @@ export const setFullscreenBreakHandler = (
{
label: "Please wait for your break to end.",
},
])
]),
);
} else {
setFullScreen(false, alwaysOnTop, win, isFullscreen);
Expand Down
Loading

0 comments on commit c107c27

Please sign in to comment.