Skip to content

Commit bef8f78

Browse files
committed
remove screenshot footer and space
1 parent 274b02d commit bef8f78

12 files changed

Lines changed: 18 additions & 549 deletions

File tree

apps/desktop/src/main.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ import { isArm64HostRunningIntelBuild, resolveDesktopRuntimeInfo } from "./runti
5555
syncShellEnvironment();
5656

5757
const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
58-
const CAPTURE_WINDOW_CHANNEL = "desktop:capture-window";
5958
const CONFIRM_CHANNEL = "desktop:confirm";
6059
const SET_THEME_CHANNEL = "desktop:set-theme";
6160
const SET_SIDEBAR_OPACITY_CHANNEL = "desktop:set-sidebar-opacity";
@@ -1178,19 +1177,6 @@ function registerIpcHandlers(): void {
11781177
return result.filePaths[0] ?? null;
11791178
});
11801179

1181-
ipcMain.removeHandler(CAPTURE_WINDOW_CHANNEL);
1182-
ipcMain.handle(CAPTURE_WINDOW_CHANNEL, async (event) => {
1183-
try {
1184-
const image = await event.sender.capturePage();
1185-
if (image.isEmpty()) {
1186-
return null;
1187-
}
1188-
return image.toDataURL();
1189-
} catch {
1190-
return null;
1191-
}
1192-
});
1193-
11941180
ipcMain.removeHandler(CONFIRM_CHANNEL);
11951181
ipcMain.handle(CONFIRM_CHANNEL, async (_event, message: unknown) => {
11961182
if (typeof message !== "string") {

apps/desktop/src/preload.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { contextBridge, ipcRenderer } from "electron";
22
import type { DesktopBridge } from "@okcode/contracts";
33

44
const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
5-
const CAPTURE_WINDOW_CHANNEL = "desktop:capture-window";
65
const CONFIRM_CHANNEL = "desktop:confirm";
76
const SET_THEME_CHANNEL = "desktop:set-theme";
87
const SET_SIDEBAR_OPACITY_CHANNEL = "desktop:set-sidebar-opacity";
@@ -36,7 +35,6 @@ const wsUrl = process.env.OKCODE_DESKTOP_WS_URL ?? null;
3635

3736
contextBridge.exposeInMainWorld("desktopBridge", {
3837
getWsUrl: () => wsUrl,
39-
captureWindow: () => ipcRenderer.invoke(CAPTURE_WINDOW_CHANNEL),
4038
pickFolder: () => ipcRenderer.invoke(PICK_FOLDER_CHANNEL),
4139
confirm: (message) => ipcRenderer.invoke(CONFIRM_CHANNEL, message),
4240
setTheme: (theme) => ipcRenderer.invoke(SET_THEME_CHANNEL, theme),

apps/web/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"@xterm/xterm": "^6.0.0",
4040
"class-variance-authority": "^0.7.1",
4141
"effect": "catalog:",
42-
"html-to-image": "^1.11.13",
4342
"lexical": "^0.41.0",
4443
"lucide-react": "^0.564.0",
4544
"oxfmt": "^0.44.0",

0 commit comments

Comments
 (0)