feat: 优化历史记录样式

This commit is contained in:
DLmaster361
2025-09-06 01:06:12 +08:00
parent c4cd53277f
commit 93a61232cf
4 changed files with 144 additions and 29 deletions

View File

@@ -490,6 +490,26 @@ ipcMain.handle('open-url', async (_event, url: string) => {
}
})
// 打开文件
ipcMain.handle('open-file', async (_event, filePath: string) => {
try {
await shell.openPath(filePath)
} catch (error) {
console.error('打开文件失败:', error)
throw error
}
})
// 显示文件所在目录并选中文件
ipcMain.handle('show-item-in-folder', async (_event, filePath: string) => {
try {
shell.showItemInFolder(filePath)
} catch (error) {
console.error('显示文件所在目录失败:', error)
throw error
}
})
// 环境检查
ipcMain.handle('check-environment', async () => {
const appRoot = getAppRoot()