mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-06-22 04:11:32 +10:00
82b9912bd0
* 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
33 lines
627 B
TypeScript
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,
|
|
};
|
|
};
|