Skip to content

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.

feat(settings): add Quit Edge-Drop button with IPC integration and vertical card layout

Deepender25386474a3702c
diff --git a/electron/main/ipc.ts b/electron/main/ipc.ts
index 8fa5aef..d2a0566 100644
--- a/electron/main/ipc.ts
+++ b/electron/main/ipc.ts
@@ -190,6 +190,11 @@ export function registerIpc(): void {
quitAndInstallUpdate()
})
+ handle('app:quit', () => {
+ console.log('[IPC] app:quit requested by renderer — quitting application')
+ app.quit()
+ })
+
handle('app:get-releases', async () => {
if (_releasesCache) {
// Re-validate in background asynchronously without blocking UI render
diff --git a/electron/preload/index.ts b/electron/preload/index.ts
index b788c11..c85817e 100644
--- a/electron/preload/index.ts
+++ b/electron/preload/index.ts
@@ -100,6 +100,7 @@ const api = {
pasteItem: (id: string) => invoke('item:paste', id),
pasteSubitem: (req: import('../../shared/types').DragRequest) => invoke('item:paste-subitem', req),
installUpdate: () => invoke('app:install-update'),
+ quitApp: () => invoke('app:quit'),
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.ts
index 6f17e63..af1a1ad 100644
--- a/shared/bridge.ts
+++ b/shared/bridge.ts
@@ -20,6 +20,7 @@ export interface EdgeApi {
pasteItem: (id: string) => Promise<boolean>
pasteSubitem: (req: DragRequest) => Promise<boolean>
installUpdate: () => Promise<void>
+ quitApp: () => Promise<void>
/**
* 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.ts
index 44d5be9..809eb23 100644
--- a/shared/ipc.ts
+++ b/shared/ipc.ts
@@ -68,6 +68,9 @@ export interface InvokeMap {
/** Trigger a download of the already-available update and quit-and-install. */
'app:install-update': { args: []; result: void }
+ /** Quit the application process. */
+ 'app:quit': { args: []; result: void }
+
/** Reveal a file in native File Explorer / Finder. */
'file:reveal': { args: [path: string]; result: boolean }
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index 283c87d..0b49eaf 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -4,7 +4,7 @@ import { useStore } from '../store/appStore'
import type { DisplayInfo } from '../../shared/types'
import { LiquidOctopusLoader } from './LiquidOctopusLoader'
import { TickIndicatorIcon, CopyIndicatorIcon, SparkleIndicatorIcon } from './CopyIndicatorCurve'
-import { ChevronRightIcon, CloseIcon } from './icons'
+import { ChevronRightIcon, CloseIcon, LogOutIcon } from './icons'
import { ChangelogView } from './ChangelogView'
import '../styles/settings.css'
@@ -510,17 +510,34 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
{/* ══ GROUP: Community & Support ════════════════════════════════════ */}
<div className="setting-group-label" style={{ marginTop: 20 }}>COMMUNITY & SUPPORT</div>
- <div className="setting-row">
+ <div className="setting-row vertical" style={{ gap: 10 }}>
<div className="setting-info">
<div className="setting-title">Feedback & Issues</div>
<div className="setting-desc">Report bugs or suggest features on GitHub</div>
</div>
<button
className="pill display-pill"
- style={{ width: 'auto', padding: '6px 14px', cursor: 'pointer', whiteSpace: 'nowrap', fontSize: '13px' }}
+ style={{ width: '100%', justifyContent: 'center', padding: '7px 14px', cursor: 'pointer', whiteSpace: 'nowrap', fontSize: '12.5px' }}
onClick={() => window.open('https://github.com/Deepender25/Edge-Drop/issues/new/choose', '_blank')}
>
- Submit ↗
+ Submit Feedback ↗
+ </button>
+ </div>
+
+ {/* ══ GROUP: Application ═══════════════════════════════════════════ */}
+ <div className="setting-group-label" style={{ marginTop: 20 }}>APPLICATION</div>
+
+ <div className="setting-row vertical" style={{ gap: 10 }}>
+ <div className="setting-info">
+ <div className="setting-title">Quit Edge-Drop</div>
+ <div className="setting-desc">Close application and stop background process</div>
+ </div>
+ <button
+ className="quit-app-btn"
+ onClick={() => void window.edge.quitApp()}
+ >
+ <LogOutIcon width={14} height={14} />
+ Quit Edge-Drop
</button>
</div>
diff --git a/src/components/icons.tsx b/src/components/icons.tsx
index 611789a..22ac174 100644
--- a/src/components/icons.tsx
+++ b/src/components/icons.tsx
@@ -34,12 +34,14 @@ import {
FileSpreadsheet,
Music,
Video,
- Presentation
+ Presentation,
+ LogOut
} from 'lucide-react'
import { getFileKindByExt } from '../lib/fileType'
type P = SVGProps<SVGSVGElement>
+export const LogOutIcon = (p: P) => <LogOut size={p.width ?? 16} {...(p as any)} />
export const InfoIcon = (p: P) => <Info size={p.width ?? 16} strokeWidth={2} {...(p as any)} />
export const SparklesIcon = (p: P) => <Sparkles size={p.width ?? 16} {...(p as any)} />
export const WhatsNewIcon = InfoIcon
diff --git a/src/styles/settings.css b/src/styles/settings.css
index 0c39231..5468907 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -30,6 +30,8 @@
}
.setting-info {
+ flex: 1;
+ min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
@@ -219,6 +221,41 @@
transform: scale(0.98);
}
+/* Quit Application Button */
+.quit-app-btn {
+ width: 100%;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ padding: 8px 16px;
+ border-radius: 8px;
+ font-size: 12.5px;
+ font-weight: 600;
+ color: #ff5555;
+ background: rgba(255, 60, 60, 0.08);
+ border: 1px solid rgba(255, 60, 60, 0.22);
+ cursor: pointer;
+ white-space: nowrap;
+ transition: all 0.2s ease;
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ transform: translateZ(0);
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+
+.quit-app-btn:hover {
+ background: rgba(255, 60, 60, 0.16);
+ border-color: rgba(255, 60, 60, 0.4);
+ color: #ff7777;
+ box-shadow: 0 0 16px rgba(255, 60, 60, 0.2);
+}
+
+.quit-app-btn:active {
+ transform: scale(0.98);
+}
+
/* GitHub Star Promo Footer */
.github-promo {
display: flex;