优化用户体验:简化数据结构并改进文件夹访问
- 移除 Provider 中无用的 createdAt 和 updatedAt 字段 - 简化数据结构,去除冗余的时间戳设置代码 - 将底部"浏览"按钮改为"打开",直接打开配置文件夹 - 新增 openConfigFolder API,使用 shell.openPath 打开文件夹 - 优化用户体验,方便用户查看和管理所有配置文件
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user