feat: v0.1.1 体验打磨 - 拖拽编码识别、行级右键菜单、行显示修正

This commit is contained in:
2026-08-17 17:30:02 +08:00
parent f5da68e624
commit fb9a202d97
10 changed files with 179 additions and 15 deletions
+5
View File
@@ -83,6 +83,11 @@ ipcMain.handle('file:open', async (_event, side: 'left' | 'right' | null) => {
return { path: filePath, name, text, encoding }
})
/** IPC: 解码拖拽传入的原始字节(复用编码探测逻辑) */
ipcMain.handle('file:decode-buffer', (_event, buffer: ArrayBuffer) => {
return decodeText(Buffer.from(buffer))
})
/** IPC: 打开系统文件管理器定位文件 */
ipcMain.handle('file:show-in-folder', (_event, filePath: string) => {
shell.showItemInFolder(filePath)