Files
drop/desktop/main/composables/proton.ts
T
DecDuck 82b9912bd0 Game updates (#187)
* refactor: split umu launcher

* feat: latest version picker + fixes

* feat: frontend latest changes

* feat: game update detection w/ setting

* feat: fixes and refactor for game update

* fix: windows ui

* fix: deps

* feat: update modifications

* feat: missing ui and lock update

* fix: create install dir on init

* fix: clippy

* fix: clippy x2

* feat: add configuration option to toggle updates

* feat: uninstall dropdown on partiallyinstalled
2026-02-25 23:27:30 +11:00

33 lines
627 B
TypeScript

import { invoke } from "@tauri-apps/api/core";
interface ProtonPaths {
data: Ref<{
autodiscovered: ProtonPath[];
custom: ProtonPath[];
default?: string;
}>;
refresh: () => Promise<void>;
}
const protonPaths = useState<ProtonPaths["data"]["value"]>(
"proton_paths",
undefined,
);
export const useProtonPaths = async (): Promise<ProtonPaths> => {
const refresh = async () => {
protonPaths.value = await invoke("fetch_proton_paths");
};
if (protonPaths.value)
return {
data: protonPaths,
refresh,
};
await refresh();
return {
data: protonPaths,
refresh,
};
};