revert: restore app/appType param compatibility and revert segmented-thumb pointer-events change
- Restore backend commands to accept app_type/app/appType with priority app_type
- Frontend invoke() now passes both { app_type, app } again
- Revert CSS change that set pointer-events: none on segmented-thumb
- Keep minor fix: open_config_folder signature uses handle + respects both names
Note: warnings for non_snake_case (appType) are expected for compatibility.
This commit is contained in:
@@ -78,7 +78,11 @@ export const tauriAPI = {
|
||||
app?: AppType,
|
||||
): Promise<boolean> => {
|
||||
try {
|
||||
return await invoke("switch_provider", { id: providerId, app_type: app, app });
|
||||
return await invoke("switch_provider", {
|
||||
id: providerId,
|
||||
app_type: app,
|
||||
app,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("切换供应商失败:", error);
|
||||
return false;
|
||||
@@ -90,7 +94,10 @@ export const tauriAPI = {
|
||||
app?: AppType,
|
||||
): Promise<ImportResult> => {
|
||||
try {
|
||||
const success = await invoke<boolean>("import_default_config", { app_type: app, app });
|
||||
const success = await invoke<boolean>("import_default_config", {
|
||||
app_type: app,
|
||||
app,
|
||||
});
|
||||
return {
|
||||
success,
|
||||
message: success ? "成功导入默认配置" : "导入失败",
|
||||
|
||||
Reference in New Issue
Block a user