mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
feat: add loading state to download button and enhance UI with spinner
This commit is contained in:
@@ -175,6 +175,7 @@
|
|||||||
"repacks_modal_description": "Choose the repack you want to download",
|
"repacks_modal_description": "Choose the repack you want to download",
|
||||||
"select_folder_hint": "To change the default folder, go to the <0>Settings</0>",
|
"select_folder_hint": "To change the default folder, go to the <0>Settings</0>",
|
||||||
"download_now": "Download now",
|
"download_now": "Download now",
|
||||||
|
"loading": "Loading...",
|
||||||
"no_shop_details": "Could not retrieve shop details.",
|
"no_shop_details": "Could not retrieve shop details.",
|
||||||
"download_options": "Download options",
|
"download_options": "Download options",
|
||||||
"download_path": "Download path",
|
"download_path": "Download path",
|
||||||
|
|||||||
@@ -93,4 +93,17 @@
|
|||||||
&__change-path-button {
|
&__change-path-button {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__loading-spinner {
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Modal,
|
Modal,
|
||||||
TextField,
|
TextField,
|
||||||
} from "@renderer/components";
|
} from "@renderer/components";
|
||||||
import { DownloadIcon } from "@primer/octicons-react";
|
import { DownloadIcon, SyncIcon } from "@primer/octicons-react";
|
||||||
import {
|
import {
|
||||||
Downloader,
|
Downloader,
|
||||||
formatBytes,
|
formatBytes,
|
||||||
@@ -323,8 +323,17 @@ export function DownloadSettingsModal({
|
|||||||
!hasWritePermission
|
!hasWritePermission
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<DownloadIcon />
|
{downloadStarting ? (
|
||||||
{t("download_now")}
|
<>
|
||||||
|
<SyncIcon className="download-settings-modal__loading-spinner" />
|
||||||
|
{t("loading")}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<DownloadIcon />
|
||||||
|
{t("download_now")}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user