Provide a Linux desktop controller configuration app with evdev input, uinput remapping, profiles, calibration, and reconnect recovery. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
1.0 KiB
TypeScript
19 lines
1.0 KiB
TypeScript
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"),
|
|
};
|