feat: add TypeScript definitions and utility functions for date formatting
- Created a global TypeScript declaration for the txadmin interface on the Window object. - Implemented date formatting utilities using date-fns with Spanish locale support. - Added TypeScript configuration files for app, Electron, and Node environments. - Set up Vite configuration for React application.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
contextBridge.exposeInMainWorld('txadmin', {
|
||||
getKeyStatus: () => ipcRenderer.invoke('key:status'),
|
||||
selectPrivateKey: () => ipcRenderer.invoke('key:select'),
|
||||
request: (route: string, body: unknown) => ipcRenderer.invoke('admin:request', route, body),
|
||||
minimizeWindow: () => ipcRenderer.invoke('window:minimize'),
|
||||
toggleMaximizeWindow: () => ipcRenderer.invoke('window:toggle-maximize'),
|
||||
closeWindow: () => ipcRenderer.invoke('window:close'),
|
||||
});
|
||||
Reference in New Issue
Block a user