refactor: update UI components and styles for improved consistency and functionality
- Refactored Skeleton component to include data-slot attribute and updated class names. - Enhanced Switch component with size prop and improved styling. - Updated Tooltip components to include data-slot attributes and improved styling. - Refactored global CSS to use custom properties for theming and improved dark mode support. - Added useIsMobile hook for responsive design handling. - Updated IPC link implementation for tRPC in Electron. - Adjusted ProjectsPage layout for better responsiveness. - Removed outdated Tailwind configuration file and integrated Tailwind CSS with Vite.
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
// See the Electron documentation for details on how to use preload scripts:
|
||||
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
|
||||
import { exposeElectronTRPC } from 'electron-trpc/main';
|
||||
|
||||
process.once('loaded', () => {
|
||||
exposeElectronTRPC();
|
||||
});
|
||||
import './trpc';
|
||||
|
||||
20
src/preload/trpc.ts
Normal file
20
src/preload/trpc.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Preload script — expose a minimal IPC transport to the renderer.
|
||||
*
|
||||
* Replaces electron-trpc's exposeElectronTRPC with a compatible shim
|
||||
* that works with our custom IPC handler + tRPC v11.
|
||||
*/
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
const IPC_CHANNEL = 'trpc';
|
||||
|
||||
contextBridge.exposeInMainWorld('electronTRPC', {
|
||||
sendMessage: (msg: unknown) => ipcRenderer.send(IPC_CHANNEL, msg),
|
||||
onMessage: (cb: (data: unknown) => void) => {
|
||||
const handler = (_event: Electron.IpcRendererEvent, data: unknown) => cb(data);
|
||||
ipcRenderer.on(IPC_CHANNEL, handler);
|
||||
return () => {
|
||||
ipcRenderer.removeListener(IPC_CHANNEL, handler);
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user