Ziya/electron/handlers/window-handlers.ts
rizary 67fb3a203e
feat: implement CEX analysis cards and real-time token monitoring
- Add TokenCard and CexAnalysisCard components for displaying token data
- Implement real-time Redis event streaming for token updates
- Add environment-based configuration system for dev/prod Redis servers
- Create comprehensive hunting ground dashboard with card management
- Add individual and bulk card removal functionality
- Implement browser integration for token details viewing
- Add timestamp utilities and proper type handling for Redis events
- Create production-ready configuration with 154.38.185.112 Redis server
- Add comprehensive documentation in README.md and CONTRIBUTORS.md
- Restructure project architecture with proper Electron-Vue integration

BREAKING CHANGE: Redis configuration now uses environment-based settings
2025-06-23 09:03:39 +07:00

38 lines
996 B
TypeScript

import { BrowserWindow, shell } from 'electron';
import { defineIpcHandler } from './ipc-handlers';
/**
* Register all window-related IPC handlers
*/
export function registerWindowHandlers(): void {
defineIpcHandler('window-minimize', () => {
const window = BrowserWindow.getFocusedWindow();
if (window) window.minimize();
});
defineIpcHandler('window-maximize', () => {
const window = BrowserWindow.getFocusedWindow();
if (window) {
if (window.isMaximized()) {
window.unmaximize();
}
else {
window.maximize();
}
}
});
defineIpcHandler('window-close', () => {
const window = BrowserWindow.getFocusedWindow();
if (window) window.close();
});
defineIpcHandler('window-is-maximized', (): boolean => {
const window = BrowserWindow.getFocusedWindow();
return window ? window.isMaximized() : false;
});
defineIpcHandler('open-external', (_event, url: string) => {
shell.openExternal(url);
});
}