优化用户体验:简化数据结构并改进文件夹访问

- 移除 Provider 中无用的 createdAt 和 updatedAt 字段
- 简化数据结构,去除冗余的时间戳设置代码
- 将底部"浏览"按钮改为"打开",直接打开配置文件夹
- 新增 openConfigFolder API,使用 shell.openPath 打开文件夹
- 优化用户体验,方便用户查看和管理所有配置文件
This commit is contained in:
farion1231
2025-08-07 22:08:47 +08:00
parent 45c75e826a
commit db28ccb27b
6 changed files with 22 additions and 27 deletions

View File

@@ -160,11 +160,8 @@ function App() {
}
}
const handleSelectConfigFile = async () => {
const selectedPath = await window.electronAPI.selectConfigFile();
if (selectedPath) {
setConfigPath(selectedPath);
}
const handleOpenConfigFolder = async () => {
await window.electronAPI.openConfigFolder();
};
return (
@@ -207,10 +204,10 @@ function App() {
<span>: {configPath}</span>
<button
className="browse-btn"
onClick={handleSelectConfigFile}
title="浏览选择配置文件"
onClick={handleOpenConfigFolder}
title="打开配置文件"
>
</button>
</div>
)}