Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.
TypeScript clipboardclipboard-managerdesktop-appdrag-and-dropelectronopen-sourceproductivityproductivity-toolwindows
fixed bug with the drag preview
Deepender25685cc03f8d6f
diff --git a/README.md b/README.mdindex 693e3a0..d9875a3 100644--- a/README.md+++ b/README.md@@ -73,7 +73,7 @@ It is built for the developer and creative workflow where you constantly juggle### Prerequisites- **Node.js** v18 or higher-- **OS**: Windows 10/11 (primary target — uses Win32 OLE drag pipelines and transparent-window cursor polling) or macOS 12++- **OS**: Windows 10/11 (uses Win32 OLE drag pipelines and transparent-window cursor polling)### Run from source```bash@@ -367,7 +367,7 @@ The AI features are the headline roadmap items and the reason this project is apEdge-Drop is Apache-2.0 licensed and open to contributions. As a solo-maintained project in active beta, the best ways to help right now are:1. **File issues** for bugs, crashes, or privacy-edge-cases you hit (especially around clipboard format detection on different apps)-2. **Test on macOS** — Windows is the primary target; macOS testing is thin+2. **macOS porting** — Currently Edge-Drop only supports Windows; contributions for a macOS port are welcome3. **Suggest format readers** — if you copy from an app whose content Edge-Drop mis-categorizes, open an issue with the available formats list (`clipboard.availableFormats()` output)4. **Pick up a roadmap item** — open an issue first to discuss scope, then send a PR against a feature branchdiff --git a/drag_debug.txt b/drag_debug.txtindex ef3f9f5..a24e464 100644--- a/drag_debug.txt+++ b/drag_debug.txt@@ -3327,3 +3327,139 @@[2026-07-11T20:00:32.098Z] createFileStackDragIcon returning cached for stack|dark|image|1[2026-07-11T20:00:32.099Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}[2026-07-11T20:00:32.099Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrgsdlel-cik02t00.png, item.files=undefined+[2026-07-14T17:19:56.000Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:19:57.485Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-14T17:19:57.486Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:19:57.730Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-14T17:19:57.730Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:19:58.011Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-14T17:20:47.525Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:20:47.683Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-14T17:20:47.684Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:20:47.816Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-14T17:20:47.817Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-14T17:20:47.964Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:11.180Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:51:11.603Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:11.604Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:51:11.761Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:11.762Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:51:11.939Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:18.633Z] startDragOut called for kind=image+[2026-07-15T11:51:18.636Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, files=undefined+[2026-07-15T11:51:18.637Z] dragIcon called for kind=image+[2026-07-15T11:51:18.639Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:51:18.640Z] createFileStackDragIcon returning cached for stack|dark|image|1+[2026-07-15T11:51:18.642Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:18.642Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, item.files=undefined+[2026-07-15T11:51:31.454Z] startDragOut called for kind=image+[2026-07-15T11:51:31.455Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0lhb1-oahcge5d.png, files=undefined+[2026-07-15T11:51:31.457Z] dragIcon called for kind=image+[2026-07-15T11:51:31.457Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:51:31.458Z] createFileStackDragIcon returning cached for stack|dark|image|1+[2026-07-15T11:51:31.458Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:51:31.459Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0lhb1-oahcge5d.png, item.files=undefined+[2026-07-15T11:52:59.782Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:53:00.114Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:53:00.115Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:53:00.265Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:53:00.265Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:53:00.413Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:53:02.577Z] startDragOut called for kind=image+[2026-07-15T11:53:02.581Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, files=undefined+[2026-07-15T11:53:02.582Z] dragIcon called for kind=image+[2026-07-15T11:53:02.583Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:53:02.585Z] createFileStackDragIcon returning cached for stack|dark|image|1+[2026-07-15T11:53:02.586Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:53:02.587Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, item.files=undefined+[2026-07-15T11:55:51.631Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:55:51.803Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:55:51.803Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:55:51.966Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:55:51.967Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:55:52.136Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:02.597Z] startDragOut called for kind=image+[2026-07-15T11:56:02.600Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, files=undefined+[2026-07-15T11:56:02.601Z] dragIcon called for kind=image+[2026-07-15T11:56:02.603Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:56:02.604Z] createFileStackDragIcon returning cached for stack|solid-black|image|1+[2026-07-15T11:56:02.604Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:02.605Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, item.files=undefined+[2026-07-15T11:56:28.844Z] startDragOut called for kind=files+[2026-07-15T11:56:28.845Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:28.846Z] dragIcon called for kind=files+[2026-07-15T11:56:28.846Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:28.847Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T11:56:29.067Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:29.068Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:29.070Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:33.640Z] startDragOut called for kind=image+[2026-07-15T11:56:33.642Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, files=undefined+[2026-07-15T11:56:33.643Z] dragIcon called for kind=image+[2026-07-15T11:56:33.644Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:56:33.646Z] createFileStackDragIcon returning cached for stack|solid-black|image|1+[2026-07-15T11:56:33.648Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:33.650Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, item.files=undefined+[2026-07-15T11:56:54.782Z] startDragOut called for kind=files+[2026-07-15T11:56:54.783Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:54.785Z] dragIcon called for kind=files+[2026-07-15T11:56:54.786Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:54.786Z] createFileStackDragIcon returning cached for stack|solid-black|code|1+[2026-07-15T11:56:54.788Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:54.789Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:57.880Z] startDragOut called for kind=image+[2026-07-15T11:56:57.881Z] staged: file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, files=undefined+[2026-07-15T11:56:57.883Z] dragIcon called for kind=image+[2026-07-15T11:56:57.883Z] image drag requested: count=1. Returning custom image card stack icon!+[2026-07-15T11:56:57.884Z] createFileStackDragIcon returning cached for stack|solid-black|image|1+[2026-07-15T11:56:57.885Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:57.885Z] calling sender.startDrag with item.file=C:\Users\yadav\AppData\Roaming\edge-drop\temp\mrm0ojbx-3z0h4y19.png, item.files=undefined+[2026-07-15T11:56:59.239Z] startDragOut called for kind=files+[2026-07-15T11:56:59.240Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:59.240Z] dragIcon called for kind=files+[2026-07-15T11:56:59.241Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:56:59.241Z] createFileStackDragIcon returning cached for stack|solid-black|code|1+[2026-07-15T11:56:59.242Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:56:59.242Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:59:21.865Z] startDragOut called for kind=files+[2026-07-15T11:59:21.866Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:59:21.866Z] dragIcon called for kind=files+[2026-07-15T11:59:21.867Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T11:59:21.867Z] createFileStackDragIcon returning cached for stack|solid-black|code|1+[2026-07-15T11:59:21.868Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T11:59:21.868Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:09.897Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:10.074Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:10.075Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:10.221Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:10.222Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:10.379Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:12.387Z] startDragOut called for kind=files+[2026-07-15T12:00:12.388Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:12.389Z] dragIcon called for kind=files+[2026-07-15T12:00:12.389Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:12.389Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:12.631Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:12.632Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:12.633Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:25.758Z] startDragOut called for kind=files+[2026-07-15T12:00:25.759Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:25.759Z] dragIcon called for kind=files+[2026-07-15T12:00:25.760Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:25.760Z] createFileStackDragIcon returning cached for stack|solid-black-100|code|1+[2026-07-15T12:00:25.761Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:25.762Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:34.913Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:35.101Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:35.103Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:35.282Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:35.282Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:35.445Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:35.931Z] startDragOut called for kind=files+[2026-07-15T12:00:35.932Z] staged: file=C:\Users\yadav\Downloads\test_project.py, files=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:35.933Z] dragIcon called for kind=files+[2026-07-15T12:00:35.933Z] files check: count=1, paths=["C:\\Users\\yadav\\Downloads\\test_project.py"]+[2026-07-15T12:00:35.934Z] createFileStackDragIcon calling Resvg for count=1+[2026-07-15T12:00:36.093Z] createFileStackDragIcon resvg result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:36.094Z] dragIcon result: isEmpty=false, size={"width":96,"height":96}+[2026-07-15T12:00:36.094Z] calling sender.startDrag with item.file=C:\Users\yadav\Downloads\test_project.py, item.files=["C:\\Users\\yadav\\Downloads\\test_project.py"]diff --git a/electron/main/drag.ts b/electron/main/drag.tsindex 6eb422b..41b858a 100644--- a/electron/main/drag.ts+++ b/electron/main/drag.ts@@ -247,30 +247,22 @@ function createFileStackDragIcon(paths: string[]): Electron.NativeImage {if (count === 0) return getFileDragIcon()const kinds = paths.slice(0, 3).map((p) => getFileKind(p))- const cacheKey = `stack|dark|${kinds.map((k) => k.kind).join('-')}|${count}`+ const cacheKey = `stack|solid-black|${kinds.map((k) => k.kind).join('-')}|${count}`const cached = iconCache.get(cacheKey)if (cached && !cached.isEmpty()) {logDrag(`createFileStackDragIcon returning cached for ${cacheKey}`)return cached}- const defsSvg = `- <defs>- <linearGradient id="cardBg" x1="0%" y1="0%" x2="100%" y2="100%">- <stop offset="0%" stop-color="#26262a" />- <stop offset="100%" stop-color="#18181c" />- </linearGradient>- </defs>- `+ const defsSvg = ''let cardsSvg = ''for (let i = kinds.length - 1; i >= 0; i--) {const info = kinds[i]const x = 16 - i * 4const y = 8 + i * 4- const opacity = i === 0 ? '1' : i === 1 ? '0.85' : '0.7'cardsSvg += `- <rect x="${x}" y="${y}" width="64" height="72" rx="10" fill="url(#cardBg)" fill-opacity="${opacity}" stroke="rgba(255,255,255,0.18)" stroke-width="1.5" />+ <rect x="${x}" y="${y}" width="64" height="72" rx="10" fill="#000000" stroke="rgba(255,255,255,0.18)" stroke-width="1.5" />`if (i === 0) {cardsSvg += `@@ -344,10 +336,6 @@ function createTextDragIcon(text: string): Electron.NativeImage {const defsSvg = `<defs>- <linearGradient id="cardBg" x1="0%" y1="0%" x2="100%" y2="100%">- <stop offset="0%" stop-color="#2c2c30" />- <stop offset="100%" stop-color="#1c1c1e" />- </linearGradient><clipPath id="textClip"><rect x="48" y="0" width="200" height="72" /></clipPath>@@ -359,7 +347,7 @@ function createTextDragIcon(text: string): Electron.NativeImage {const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}">${defsSvg}- <rect x="2" y="2" width="${width - 4}" height="${height - 4}" rx="12" fill="url(#cardBg)" stroke="rgba(255,255,255,0.15)" stroke-width="1.5" />+ <rect x="2" y="2" width="${width - 4}" height="${height - 4}" rx="12" fill="#000000" stroke="rgba(255,255,255,0.15)" stroke-width="1.5" /><!-- Accent Icon --><svg x="14" y="24" width="24" height="24" viewBox="0 0 24 24">diff --git a/electron/main/ipc.ts b/electron/main/ipc.tsindex 134edc8..efaba45 100644--- a/electron/main/ipc.ts+++ b/electron/main/ipc.ts@@ -151,7 +151,35 @@ export function registerIpc(): void {handle('state:load', () => {return {items: getStore().toDto(),- settings: loadSettings()+ settings: loadSettings(),+ version: app.getVersion()+ }+ })++ handle('app:check-update', async () => {+ try {+ const response = await fetch('https://api.github.com/repos/Deepender25/Edge-Drop/releases/latest', {+ headers: {+ 'User-Agent': 'Edge-Drop-App'+ }+ })+ if (!response.ok) {+ console.error('[IPC] app:check-update fetch failed with status:', response.status)+ return null+ }+ const data = await response.json() as any+ const latestVersion = data.tag_name || ''+ const assets = data.assets || []+ const exeAsset = assets.find((a: any) => a.name && a.name.endsWith('.exe'))+ const apkAsset = assets.find((a: any) => a.name && a.name.endsWith('.apk'))+ const downloadUrl = exeAsset?.browser_download_url || apkAsset?.browser_download_url || data.html_url || ''+ return {+ latestVersion,+ downloadUrl+ }+ } catch (err) {+ console.error('[IPC] app:check-update error:', err)+ return null}})diff --git a/electron/preload/index.ts b/electron/preload/index.tsindex f304552..8245d26 100644--- a/electron/preload/index.ts+++ b/electron/preload/index.ts@@ -99,6 +99,7 @@ const api = {copySubitem: (req: import('../../shared/types').DragRequest) => invoke('item:copy-subitem', req),pasteItem: (id: string) => invoke('item:paste', id),pasteSubitem: (req: import('../../shared/types').DragRequest) => invoke('item:paste-subitem', req),+ checkUpdate: () => invoke('app:check-update'),startDrag: (req: DragRequest) => send('item:start-drag', req),addFiles: (paths: string[]) => invoke('item:add-files', paths),removeSubitem: (req: import('../../shared/types').DragRequest) => invoke('item:remove-subitem', req),diff --git a/shared/bridge.ts b/shared/bridge.tsindex 14370d2..10499a1 100644--- a/shared/bridge.ts+++ b/shared/bridge.ts@@ -10,7 +10,7 @@ import type { DragRequest } from './types'export interface EdgeApi {/* Renderer -> Main */- loadState: () => Promise<{ items: import('./types').ClipboardItemDto[]; settings: Settings }>+ loadState: () => Promise<{ items: import('./types').ClipboardItemDto[]; settings: Settings; version: string }>setPinned: (id: string, pinned: boolean) => Promise<import('./types').ClipboardItemDto[]>deleteItem: (id: string) => Promise<import('./types').ClipboardItemDto[]>clearItems: () => Promise<import('./types').ClipboardItemDto[]>@@ -19,6 +19,7 @@ export interface EdgeApi {copySubitem: (req: DragRequest) => Promise<boolean>pasteItem: (id: string) => Promise<boolean>pasteSubitem: (req: DragRequest) => Promise<boolean>+ checkUpdate: () => Promise<{ latestVersion: string; downloadUrl: string } | null>/*** Begin a native OS drag-out. Fire-and-forget: must be called synchronously* from the DOM `dragstart` event, and main calls `event.sender.startDrag`.diff --git a/shared/ipc.ts b/shared/ipc.tsindex 807594b..3fd72d6 100644--- a/shared/ipc.ts+++ b/shared/ipc.ts@@ -17,7 +17,7 @@ import type { ClipboardItemDto, DragRequest, MergeResult, Settings } from './typexport interface InvokeMap {/** Returns the full current item list + settings on startup. */- 'state:load': { args: []; result: { items: ClipboardItemDto[]; settings: Settings } }+ 'state:load': { args: []; result: { items: ClipboardItemDto[]; settings: Settings; version: string } }/** Set an item's pinned state. */'item:set-pinned': { args: [id: string, pinned: boolean]; result: ClipboardItemDto[] }@@ -61,6 +61,9 @@ export interface InvokeMap {/** Minimize the window (used by Onboarding). */'window:minimize': { args: []; result: void }++ /** Check for application updates on GitHub releases. */+ 'app:check-update': { args: []; result: { latestVersion: string; downloadUrl: string } | null }}/* ------------------------------------------------------------------ */diff --git a/src/components/Header.tsx b/src/components/Header.tsxindex 333161f..4f578e2 100644--- a/src/components/Header.tsx+++ b/src/components/Header.tsx@@ -6,6 +6,7 @@ import { GearIcon, CloseIcon } from './icons'export function Header() {const setSettingsOpen = useStore((s) => s.setSettingsOpen)const settingsOpen = useStore((s) => s.settingsOpen)+ const updateInfo = useStore((s) => s.updateInfo)return (<div className="header" style={{ display: 'flex', justifyContent: 'space-between', width: '100%', alignItems: 'center', height: 40, padding: '0 14px 0 6px' }}>@@ -54,10 +55,26 @@ export function Header() {width: 32,height: 32,display: 'grid',- placeItems: 'center'+ placeItems: 'center',+ position: 'relative'}}>{settingsOpen ? <CloseIcon /> : <GearIcon />}+ {!settingsOpen && updateInfo?.hasUpdate && (+ <span+ style={{+ position: 'absolute',+ top: 5,+ right: 5,+ width: 8,+ height: 8,+ borderRadius: '50%',+ backgroundColor: '#f97316',+ border: '1.5px solid #000000',+ pointerEvents: 'none'+ }}+ />+ )}</motion.button></div>)diff --git a/src/components/Settings.tsx b/src/components/Settings.tsxindex f484dc7..4d7ee6d 100644--- a/src/components/Settings.tsx+++ b/src/components/Settings.tsx@@ -4,10 +4,28 @@ import '../styles/settings.css'export function Settings() {const settings = useStore((s) => s.settings)const patch = useStore((s) => s.patchSettings)+ const updateInfo = useStore((s) => s.updateInfo)+ const currentVersion = useStore((s) => s.currentVersion)return (<div className="settings-list">-+ {updateInfo?.hasUpdate && (+ <>+ <div className="update-prompt">+ <div className="update-text">+ There is a new version available for this application and you can download it.+ </div>+ <button+ className="update-btn"+ onClick={() => window.open(updateInfo.downloadUrl, '_blank')}+ >+ Download {updateInfo.latestVersion}+ </button>+ </div>+ <div className="setting-divider" />+ </>+ )}+{/* Clear unpinned on restart */}<div className="setting-row"><div className="setting-info">@@ -176,6 +194,34 @@ export function Settings() {/></div>+ <div className="setting-divider" />++ {/* GitHub Star Promo */}+ <div className="github-promo">+ <div className="github-promo-text">+ If you like the application, please give a star to the GitHub repository - it means a lot!+ </div>+ <button+ className="github-promo-btn"+ onClick={() => window.open('https://github.com/Deepender25/Edge-Drop', '_blank')}+ >+ <svg+ className="star-icon"+ viewBox="0 0 24 24"+ width="14"+ height="14"+ fill="currentColor"+ style={{ marginRight: 6 }}+ >+ <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />+ </svg>+ Star on GitHub+ </button>+ <div className="app-version-footer">+ Version {currentVersion || '0.1.0'}+ </div>+ </div>+</div>)}diff --git a/src/store/appStore.ts b/src/store/appStore.tsindex e0ee06a..d76b7a0 100644--- a/src/store/appStore.ts+++ b/src/store/appStore.ts@@ -11,6 +11,24 @@ import { edge } from '../lib/edge'import type { ClipboardItemDto, Settings, DragRequest } from '../../shared/types'import { DEFAULT_SETTINGS } from '../../shared/types'+function isVersionLower(current: string, latest: string): boolean {+ const parse = (v: string) => {+ return v+ .replace(/^v/i, '')+ .split('.')+ .map((part) => parseInt(part, 10) || 0)+ }+ const currParts = parse(current)+ const latParts = parse(latest)+ for (let i = 0; i < Math.max(currParts.length, latParts.length); i++) {+ const c = currParts[i] ?? 0+ const l = latParts[i] ?? 0+ if (l > c) return true+ if (l < c) return false+ }+ return false+}+/** A transient user-facing notice shown as a toast. */export interface ToastMsg {id: string@@ -36,9 +54,12 @@ interface AppState {/** Active toasts (auto-dismissed after a short delay). */toasts: ToastMsg[]tutorialStep: number+ currentVersion: string+ updateInfo: { hasUpdate: boolean; latestVersion: string; downloadUrl: string } | null/* hydration + sync */hydrate: () => Promise<void>+ checkUpdate: () => Promise<void>setItems: (items: ClipboardItemDto[]) => voidsetSettings: (next: Settings) => void@@ -75,14 +96,38 @@ export const useStore = create<AppState>((set, get) => ({internalDragReq: null,toasts: [],tutorialStep: 0,+ currentVersion: '',+ updateInfo: null,async hydrate() {- const { items, settings } = await edge.loadState()+ const { items, settings, version } = await edge.loadState()set({items,settings,+ currentVersion: version,hydrated: true})+ get().checkUpdate().catch(console.error)+ },++ async checkUpdate() {+ const current = get().currentVersion+ if (!current) return+ try {+ const res = await edge.checkUpdate()+ if (res) {+ const hasUpdate = isVersionLower(current, res.latestVersion)+ set({+ updateInfo: {+ hasUpdate,+ latestVersion: res.latestVersion,+ downloadUrl: res.downloadUrl+ }+ })+ }+ } catch (e) {+ console.error('Update check failed:', e)+ }},setItems: (items) => set({ items }),diff --git a/src/styles/settings.css b/src/styles/settings.cssindex 6ceb39b..f4d311c 100644--- a/src/styles/settings.css+++ b/src/styles/settings.css@@ -10,6 +10,7 @@-webkit-font-smoothing: antialiased;text-rendering: optimizeLegibility;}+.settings-list::-webkit-scrollbar {display: none;}@@ -21,6 +22,7 @@gap: 18px;padding: 14px 4px;}+.setting-row.vertical {flex-direction: column;align-items: flex-start;@@ -78,10 +80,12 @@transition: all 0.15s ease;-webkit-font-smoothing: antialiased;}+.pill:hover:not(.active) {color: #ffffff;background: rgba(255, 255, 255, 0.06);}+.pill.active {background: #ffffff;color: #000000;@@ -102,6 +106,7 @@padding: 0;transition: background 0.2s ease, border-color 0.2s ease;}+.toggle-thumb {position: absolute;top: 3px;@@ -112,11 +117,111 @@background: #d4d4d8;transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;}+.setting-toggle.checked {background: #ffffff;border-color: #ffffff;}+.setting-toggle.checked .toggle-thumb {transform: translateX(16px);background: #000000;}++/* Update Prompt Banner */+.update-prompt {+ display: flex;+ flex-direction: column;+ gap: 10px;+ padding: 14px 12px;+ background: rgba(249, 115, 22, 0.08);+ /* 8% opacity orange background */+ border: 1px solid rgba(249, 115, 22, 0.25);+ /* Subtle orange border */+ border-radius: 10px;+ margin: 6px 4px 10px 4px;+}++.update-text {+ font-size: 13px;+ font-weight: 500;+ color: #ffffff;+ line-height: 1.45;+ letter-spacing: 0.01em;+}++.update-btn {+ width: 100%;+ padding: 8px 0;+ border-radius: 6px;+ font-size: 12.5px;+ font-weight: 600;+ color: #000000;+ background: #f97316;+ /* Edge-drop orange color */+ border: none;+ cursor: pointer;+ transition: opacity 0.2s ease, transform 0.1s ease;+ text-align: center;+}++.update-btn:hover {+ opacity: 0.9;+}++.update-btn:active {+ transform: scale(0.98);+}++/* GitHub Star Promo Footer */+.github-promo {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 12px;+ padding: 16px 12px;+ background: rgba(255, 255, 255, 0.03);+ border: 1px solid rgba(255, 255, 255, 0.06);+ border-radius: 10px;+ margin: 16px 4px 6px 4px;+ text-align: center;+}++.github-promo-text {+ font-size: 12px;+ color: #a1a1aa;+ line-height: 1.45;+}++.github-promo-btn {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: 6px;+ padding: 8px 16px;+ border-radius: 6px;+ font-size: 12.5px;+ font-weight: 500;+ color: #ffffff;+ background: rgba(255, 255, 255, 0.08);+ border: 1px solid rgba(255, 255, 255, 0.12);+ cursor: pointer;+ transition: all 0.2s ease;+}++.github-promo-btn:hover {+ background: rgba(255, 255, 255, 0.15);+ color: #ffffff;+ border-color: rgba(255, 255, 255, 0.2);+}++.github-promo-btn .star-icon {+ color: #fbbf24;+ /* yellow star */+}++.app-version-footer {+ font-size: 11px;+ color: #ffffff;+ margin-top: 4px;+}\ No newline at end of file