🎨 完善 dialog.open/save 配置

This commit is contained in:
BTMuli
2023-10-26 17:56:58 +08:00
parent 598a18557f
commit 7349f120e4
3 changed files with 18 additions and 9 deletions

View File

@@ -279,13 +279,16 @@ async function searchCard(): Promise<void> {
// 导入 UIAF 数据,进行数据合并、刷新
async function importJson(): Promise<void> {
const selectedFile = await dialog.open({
title: "选择 UIAF 数据文件",
multiple: false,
filters: [
{
name: "JSON",
name: "UIAF JSON",
extensions: ["json"],
},
],
defaultPath: await path.downloadDir(),
directory: false,
});
if (!selectedFile) {
showSnackbar({