refactor(types): rename AppType to AppId for semantic clarity
Rename `AppType` to `AppId` across the entire frontend codebase to better reflect its purpose as an application identifier rather than a type category. This aligns frontend naming with backend command parameter conventions. Changes: - Rename type `AppType` to `AppId` in src/lib/api/types.ts - Remove `AppType` export from src/lib/api/index.ts - Update all component props from `appType` to `appId` (43 files) - Update all variable names from `appType` to `appId` - Synchronize documentation (CHANGELOG, refactoring plans) - Update test files and MSW mocks BREAKING CHANGE: `AppType` type is no longer exported. Use `AppId` instead. All component props have been renamed from `appType` to `appId`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import type { Settings } from "@/types";
|
||||
import type { AppType } from "./types";
|
||||
import type { AppId } from "./types";
|
||||
|
||||
export interface ConfigTransferResult {
|
||||
success: boolean;
|
||||
@@ -30,12 +30,12 @@ export const settingsApi = {
|
||||
return await invoke("is_portable_mode");
|
||||
},
|
||||
|
||||
async getConfigDir(appType: AppType): Promise<string> {
|
||||
return await invoke("get_config_dir", { app: appType });
|
||||
async getConfigDir(appId: AppId): Promise<string> {
|
||||
return await invoke("get_config_dir", { app: appId });
|
||||
},
|
||||
|
||||
async openConfigFolder(appType: AppType): Promise<void> {
|
||||
await invoke("open_config_folder", { app: appType });
|
||||
async openConfigFolder(appId: AppId): Promise<void> {
|
||||
await invoke("open_config_folder", { app: appId });
|
||||
},
|
||||
|
||||
async selectConfigDirectory(defaultPath?: string): Promise<string | null> {
|
||||
|
||||
Reference in New Issue
Block a user