Initial release of 8BitDo Control Center
Provide a Linux desktop controller configuration app with evdev input, uinput remapping, profiles, calibration, and reconnect recovery. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
18
src/services/profileService.ts
Normal file
18
src/services/profileService.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
import type { Profile, ProfileSummary } from "@/types/profile";
|
||||
|
||||
/** Thin typed wrapper around the `profile_manager` Tauri commands. */
|
||||
export const profileService = {
|
||||
list: () => invoke<ProfileSummary[]>("list_profiles"),
|
||||
load: (id: string) => invoke<Profile>("load_profile", { id }),
|
||||
save: (profile: Profile) => invoke<Profile>("save_profile", { profile }),
|
||||
create: (name: string) => invoke<Profile>("create_profile", { name }),
|
||||
rename: (id: string, newName: string) => invoke<Profile>("rename_profile", { id, newName }),
|
||||
duplicate: (id: string, newName: string) => invoke<Profile>("duplicate_profile", { id, newName }),
|
||||
remove: (id: string) => invoke<void>("delete_profile", { id }),
|
||||
reset: (id: string) => invoke<Profile>("reset_profile", { id }),
|
||||
exportTo: (id: string, destination: string) => invoke<void>("export_profile", { id, destination }),
|
||||
importFrom: (source: string) => invoke<Profile>("import_profile", { source }),
|
||||
directory: () => invoke<string>("profiles_directory"),
|
||||
};
|
||||
Reference in New Issue
Block a user