Skip to content

Commit

Permalink
load release screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Jun 26, 2023
1 parent 40153a6 commit 9c150c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Source/Website/Controllers/ReleaseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public async Task<IActionResult> ReleaseDetailPage(string? slugId, bool? preview

// page data
ViewData[PageInfo.SidebarList] = await _context.QueryNewsModels(5);
ViewData["_ReleaseScreenshots"] = await GitHub.GetFilesAsync("releases/screenshots/v9.0-beta-4");
if (!string.IsNullOrEmpty(model.ScreenshotsDir))
{
ViewData["_ReleaseScreenshots"] = await GitHub.GetFilesAsync("releases/screenshots", model.ScreenshotsDir);
}


return View("ReleaseDetailPage", model);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Website/Views/Release/ReleaseDetailPage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@{
var list = (PaginatedList<NewsModel>?)ViewData[PageInfo.SidebarList];
var screenshots = (List<GitHubFileModel>)ViewData["_ReleaseScreenshots"] ?? new();
var screenshots = ((List<GitHubFileModel>?)ViewData["_ReleaseScreenshots"]) ?? new();
}


Expand Down

0 comments on commit 9c150c4

Please sign in to comment.