trying better ui on modal #1

This commit is contained in:
Zamitto 2024-06-07 23:37:03 -03:00
parent 163b17324e
commit 9eef445b1a

View File

@ -93,14 +93,8 @@ export function GameOptionsModal({
/> />
<div className={styles.optionsContainer}> <div className={styles.optionsContainer}>
<h2>Arquivos baixados</h2>
<div className={styles.gameOptionRow}> <div className={styles.gameOptionRow}>
<Button
onClick={openRepacksModal}
theme="outline"
disabled={deleting}
>
{t("open_download_options")}
</Button>
<Button <Button
onClick={handleOpenDownloadFolder} onClick={handleOpenDownloadFolder}
style={{ alignSelf: "flex-end" }} style={{ alignSelf: "flex-end" }}
@ -109,18 +103,23 @@ export function GameOptionsModal({
> >
{t("open_download_location")} {t("open_download_location")}
</Button> </Button>
<Button <Button
onClick={handleCreateShortcut} onClick={() => {
setShowDeleteModal(true);
}}
style={{ alignSelf: "flex-end" }} style={{ alignSelf: "flex-end" }}
theme="outline" theme="outline"
disabled={deleting || !game.executablePath} disabled={isGameDownloading || deleting || !game.downloadPath}
> >
{t("create_shortcut")} <TrashIcon />
{t("remove_files")}
</Button> </Button>
</div> </div>
<h2>Executável</h2>
<div className={styles.gameOptionRow}> <div className={styles.gameOptionRow}>
<TextField <TextField
label="Caminho do executável"
value={game.executablePath || ""} value={game.executablePath || ""}
readOnly readOnly
theme="dark" theme="dark"
@ -145,19 +144,29 @@ export function GameOptionsModal({
{t("open_folder")} {t("open_folder")}
</Button> </Button>
</div> </div>
<div className={styles.gameOptionRow}> <div className={styles.gameOptionRow}>
<Button <Button
onClick={() => { onClick={handleCreateShortcut}
setShowDeleteModal(true);
}}
style={{ alignSelf: "flex-end" }} style={{ alignSelf: "flex-end" }}
theme="outline" theme="outline"
disabled={isGameDownloading || deleting || !game.downloadPath} disabled={deleting || !game.executablePath}
> >
<TrashIcon /> {t("create_shortcut")}
{t("remove_files")}
</Button> </Button>
</div>
<h2>Novo Download</h2>
<div className={styles.gameOptionRow}>
<Button
onClick={openRepacksModal}
theme="outline"
disabled={deleting}
>
{t("open_download_options")}
</Button>
</div>
<h2>Remover</h2>
<div className={styles.gameOptionRow}>
<Button <Button
onClick={() => setShowRemoveGameModal(true)} onClick={() => setShowRemoveGameModal(true)}
style={{ alignSelf: "flex-end" }} style={{ alignSelf: "flex-end" }}