mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactoring modal
This commit is contained in:
parent
06d2733fc5
commit
7013f7c65d
1 changed files with 24 additions and 41 deletions
|
@ -85,6 +85,24 @@ export function GameOptionsModal({
|
||||||
>
|
>
|
||||||
{t("open_download_options")}
|
{t("open_download_options")}
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={handleCreateShortcut}
|
||||||
|
style={{ alignSelf: "flex-end" }}
|
||||||
|
theme="outline"
|
||||||
|
disabled={deleting || !game.executablePath}
|
||||||
|
title={t("create_shortcut")}
|
||||||
|
>
|
||||||
|
{"Abrir local de download"}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={handleCreateShortcut}
|
||||||
|
style={{ alignSelf: "flex-end" }}
|
||||||
|
theme="outline"
|
||||||
|
disabled={deleting || !game.executablePath}
|
||||||
|
title={t("create_shortcut")}
|
||||||
|
>
|
||||||
|
{t("create_shortcut")}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.gameOptionRow}>
|
<div className={styles.gameOptionRow}>
|
||||||
<TextField
|
<TextField
|
||||||
|
@ -100,9 +118,8 @@ export function GameOptionsModal({
|
||||||
theme="outline"
|
theme="outline"
|
||||||
style={{ alignSelf: "flex-end" }}
|
style={{ alignSelf: "flex-end" }}
|
||||||
onClick={handleChangeExecutableLocation}
|
onClick={handleChangeExecutableLocation}
|
||||||
title={t("select_executable")}
|
|
||||||
>
|
>
|
||||||
<PencilIcon />
|
{t("select_executable")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -110,11 +127,11 @@ export function GameOptionsModal({
|
||||||
style={{ alignSelf: "flex-end" }}
|
style={{ alignSelf: "flex-end" }}
|
||||||
onClick={handleOpenGameExecutablePath}
|
onClick={handleOpenGameExecutablePath}
|
||||||
disabled={!game.executablePath}
|
disabled={!game.executablePath}
|
||||||
title={t("open_folder")}
|
|
||||||
>
|
>
|
||||||
<FileDirectoryOpenFillIcon />
|
{t("open_folder")}
|
||||||
</Button>
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={styles.gameOptionRow}>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleCreateShortcut}
|
onClick={handleCreateShortcut}
|
||||||
style={{ alignSelf: "flex-end" }}
|
style={{ alignSelf: "flex-end" }}
|
||||||
|
@ -122,44 +139,10 @@ export function GameOptionsModal({
|
||||||
disabled={deleting || !game.executablePath}
|
disabled={deleting || !game.executablePath}
|
||||||
title={t("create_shortcut")}
|
title={t("create_shortcut")}
|
||||||
>
|
>
|
||||||
<FileSymlinkFileIcon />
|
<TrashIcon />
|
||||||
|
Remover arquivos
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{game.folderName && (
|
|
||||||
<div className={styles.gameOptionRow}>
|
|
||||||
<TextField
|
|
||||||
label={t("installer_path")}
|
|
||||||
value={`${game.downloadPath}\\${game.folderName}`}
|
|
||||||
readOnly
|
|
||||||
theme="dark"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
theme="outline"
|
|
||||||
style={{ alignSelf: "flex-end" }}
|
|
||||||
onClick={handleOpenGameInstallerPath}
|
|
||||||
disabled={!game.downloadPath}
|
|
||||||
title={t("open_folder")}
|
|
||||||
>
|
|
||||||
<FileDirectoryOpenFillIcon />
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
theme="outline"
|
|
||||||
style={{ alignSelf: "flex-end" }}
|
|
||||||
disabled={!game.downloadPath}
|
|
||||||
onClick={() => {
|
|
||||||
setShowDeleteModal(true);
|
|
||||||
}}
|
|
||||||
title={t("remove_installer")}
|
|
||||||
>
|
|
||||||
<TrashIcon />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue