Epic manifest parsing frontend part - #49
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the frontend to support the new manifest parsing functionality by replacing the previous SteamDepot-based implementation with a new DownloadInfo model. It adjusts the UI components in the razor pages to reference the new DownloadInfo properties, refactors the DownloadEvent model accordingly, and makes a minor namespace update and workflow adjustment.
- Updates razor pages to use DownloadInfo for progress and image/link data.
- Refactors DownloadEvent by replacing SteamDepot with DownloadInfo and updating the DownloadIdentifier type.
- Changes the client namespace and removes the branch condition in the Docker login workflow.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| DeveLanCacheUI_Frontend/Pages/SteamLatestDownloads.razor | Refactored progress calculation and UI links to use DownloadInfo; retained commented legacy code for appId and imgUrl. |
| DeveLanCacheUI_Frontend/Pages/LatestDownload.razor | Updated UI to reflect new DownloadInfo properties and added a new progress column. |
| DeveLanCacheUI_Frontend/Client/Program.cs | Updated namespace to better reflect the client project structure. |
| DeveLanCacheUI_Frontend/ApiModels/SteamDepot.cs | Removed obsolete SteamDepot model. |
| DeveLanCacheUI_Frontend/ApiModels/DownloadInfo.cs | Introduced new DownloadInfo model to support manifest parsing. |
| DeveLanCacheUI_Frontend/ApiModels/DownloadEvent.cs | Updated DownloadEvent to reference DownloadInfo and changed DownloadIdentifier to uint?. |
| .github/workflows/githubactionsbuilds.yml | Removed branch condition for Docker Hub login to apply the change unconditionally. |
Comments suppressed due to low confidence (1)
.github/workflows/githubactionsbuilds.yml:30
- The removal of the branch condition for Docker Hub login now causes the login step to execute on every branch; please confirm that this change is intentional as it may affect deployment behavior in non-master branches.
if: github.ref == 'refs/heads/master'
| @*var appId = downloadEvent.SteamDepot?.SteamAppId ?? 0; | ||
| var downloadIdentifierString = downloadEvent.DownloadIdentifierString; | ||
| var appHref = appId != 0 ? $"https://steamdb.info/app/{appId}/" : ""; | ||
| var depotHref = downloadIdentifierString != null && downloadEvent.CacheIdentifier == "steam" ? $"https://steamdb.info/depot/{downloadIdentifierString}/" : null; | ||
| var imgUrl = appId != 0 ? $"https://cdn.cloudflare.steamstatic.com/steam/apps/{appId}/header.jpg" : ""; | ||
| var imgUrl = appId != 0 ? $"https://cdn.cloudflare.steamstatic.com/steam/apps/{appId}/header.jpg" : ""; *@ |
There was a problem hiding this comment.
[nitpick] There is a commented block for appId and imgUrl that is no longer in use. Consider removing these commented sections to reduce clutter and improve code maintainability.
| } | ||
| </td> | ||
| <td> | ||
| @if (downloadEvent.DownloadInfo?.TotalBytes is not null or 0) |
There was a problem hiding this comment.
The conditional check with 'is not null or 0' might always pass when DownloadInfo.TotalBytes is provided, including when it is 0. An explicit check for a non-zero value should be used to preserve the original logic.
| @if (downloadEvent.DownloadInfo?.TotalBytes is not null or 0) | |
| @if (downloadEvent.DownloadInfo?.TotalBytes != null && downloadEvent.DownloadInfo.TotalBytes > 0) |
No description provided.