docs: update plan to use 'current' instead of 'default' for initial import\n\n- Aligns documentation with implementation across migration and import flows
This commit is contained in:
10
src/App.tsx
10
src/App.tsx
@@ -80,7 +80,7 @@ function App() {
|
||||
setProviders(loadedProviders);
|
||||
setCurrentProviderId(currentId);
|
||||
|
||||
// 如果供应商列表为空,尝试自动导入现有配置为"default"供应商
|
||||
// 如果供应商列表为空,尝试自动导入现有配置为"current"供应商
|
||||
if (Object.keys(loadedProviders).length === 0) {
|
||||
await handleAutoImportDefault();
|
||||
}
|
||||
@@ -154,18 +154,14 @@ function App() {
|
||||
}
|
||||
};
|
||||
|
||||
// 自动导入现有配置为"default"供应商
|
||||
// 自动导入现有配置为"current"供应商
|
||||
const handleAutoImportDefault = async () => {
|
||||
try {
|
||||
const result = await window.api.importCurrentConfigAsDefault(activeApp);
|
||||
|
||||
if (result.success) {
|
||||
await loadProviders();
|
||||
showNotification(
|
||||
"已自动导入现有配置为 default 供应商",
|
||||
"success",
|
||||
3000,
|
||||
);
|
||||
showNotification("已自动导入现有配置为 current 供应商", "success", 3000);
|
||||
}
|
||||
// 如果导入失败(比如没有现有配置),静默处理,不显示错误
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user