mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-02 16:23:48 +03:00
QoL allow clearing game executable path and wine prefix
This commit is contained in:
parent
ee4639e041
commit
948965dda5
@ -105,6 +105,7 @@
|
|||||||
"open_folder": "Open folder",
|
"open_folder": "Open folder",
|
||||||
"open_download_location": "See downloaded files",
|
"open_download_location": "See downloaded files",
|
||||||
"create_shortcut": "Create desktop shortcut",
|
"create_shortcut": "Create desktop shortcut",
|
||||||
|
"clear": "Clear",
|
||||||
"remove_files": "Remove files",
|
"remove_files": "Remove files",
|
||||||
"remove_from_library_title": "Are you sure?",
|
"remove_from_library_title": "Are you sure?",
|
||||||
"remove_from_library_description": "This will remove {{game}} from your library",
|
"remove_from_library_description": "This will remove {{game}} from your library",
|
||||||
|
@ -95,6 +95,11 @@ export function GameOptionsModal({
|
|||||||
await window.electron.openGameExecutablePath(game.id);
|
await window.electron.openGameExecutablePath(game.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleClearExecutablePath = async () => {
|
||||||
|
await window.electron.updateExecutablePath(game.id, "");
|
||||||
|
updateGame();
|
||||||
|
};
|
||||||
|
|
||||||
const handleChangeWinePrefixPath = async () => {
|
const handleChangeWinePrefixPath = async () => {
|
||||||
const { filePaths } = await window.electron.showOpenDialog({
|
const { filePaths } = await window.electron.showOpenDialog({
|
||||||
properties: ["openDirectory"],
|
properties: ["openDirectory"],
|
||||||
@ -106,6 +111,11 @@ export function GameOptionsModal({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleClearWinePrefixPath = async () => {
|
||||||
|
await window.electron.selectGameWinePrefix(game.id, "");
|
||||||
|
updateGame();
|
||||||
|
};
|
||||||
|
|
||||||
const shouldShowWinePrefixConfiguration =
|
const shouldShowWinePrefixConfiguration =
|
||||||
window.electron.platform === "linux";
|
window.electron.platform === "linux";
|
||||||
|
|
||||||
@ -168,6 +178,9 @@ export function GameOptionsModal({
|
|||||||
<Button onClick={handleCreateShortcut} theme="outline">
|
<Button onClick={handleCreateShortcut} theme="outline">
|
||||||
{t("create_shortcut")}
|
{t("create_shortcut")}
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button onClick={handleClearExecutablePath} theme="outline">
|
||||||
|
{t("clear")}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -196,6 +209,13 @@ export function GameOptionsModal({
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{game.winePrefixPath && (
|
||||||
|
<div className={styles.gameOptionRow}>
|
||||||
|
<Button onClick={handleClearWinePrefixPath} theme="outline">
|
||||||
|
{t("clear")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user