Send files directly between devices over the internet - no cloud storage, no size limits.
TypeScript cross-platformdata-transferdecentralizedfile-sharingfile-transferhole-punchingopen-sourcep2ppeer-to-peerprivacyprivacy-tools
fix window not fitting small screens
Denis Lupookov2292eab8b5f0
diff --git a/apps/desktop/src/electron/window.ts b/apps/desktop/src/electron/window.tsindex 727fabf..196b6a9 100644--- a/apps/desktop/src/electron/window.ts+++ b/apps/desktop/src/electron/window.ts@@ -1,4 +1,4 @@-import { app, BrowserWindow, shell } from 'electron'+import { app, BrowserWindow, screen, shell } from 'electron'import path from 'path'import { fileURLToPath } from 'url'import { isLinux } from 'which-runtime'@@ -16,11 +16,16 @@ export function sendToAllWindows(name: string, data: unknown) {export async function createMainWindow(pear: PearRuntimeInstance) {const shouldOpenDevTools = false+ const minWidth = 720+ const minHeight = 480+ const { width: workAreaWidth, height: workAreaHeight } = screen.getPrimaryDisplay().workAreaSize+ const width = Math.min(980, workAreaWidth)+ const height = Math.min(792, workAreaHeight)const win = new BrowserWindow({- width: 980,- height: 792,- minWidth: 980,- minHeight: 792,+ width,+ height,+ minWidth: Math.min(minWidth, width),+ minHeight: Math.min(minHeight, height),show: false,backgroundColor: rawTokens.colors.dark.colorBackground,titleBarStyle: 'hiddenInset',