Added redistributable support to archives

redistributables
Pat Hartl 2023-10-18 18:17:47 -05:00
parent a3b1dabbb1
commit e3a08bc9c3
2 changed files with 8 additions and 7 deletions

View File

@ -23,7 +23,7 @@
<ActionColumn Title=""> <ActionColumn Title="">
<Space Style="display: flex; justify-content: end"> <Space Style="display: flex; justify-content: end">
<SpaceItem> <SpaceItem>
<a href="/Download/Game/@context.Id" target="_blank" class="ant-btn ant-btn-text ant-btn-icon-only"> <a href="/Download/Archive/@context.Id" target="_blank" class="ant-btn ant-btn-text ant-btn-icon-only">
<Icon Type="@IconType.Outline.Download" /> <Icon Type="@IconType.Outline.Download" />
</a> </a>
</SpaceItem> </SpaceItem>
@ -50,6 +50,7 @@
@code { @code {
[Parameter] public Guid GameId { get; set; } [Parameter] public Guid GameId { get; set; }
[Parameter] public Guid RedistributableId { get; set; }
[Parameter] public ICollection<Archive> Archives { get; set; } [Parameter] public ICollection<Archive> Archives { get; set; }
[Parameter] public EventCallback<ICollection<Archive>> ArchivesChanged { get; set; } [Parameter] public EventCallback<ICollection<Archive>> ArchivesChanged { get; set; }
@ -77,11 +78,11 @@
private async Task UploadArchive() private async Task UploadArchive()
{ {
Archive = new Archive() if (GameId != Guid.Empty)
{ Archive = new Archive() { GameId = GameId, Id = Guid.NewGuid() };
GameId = GameId,
Id = Guid.NewGuid() if (RedistributableId != Guid.Empty)
}; Archive = new Archive() { RedistributableId = RedistributableId, Id = Guid.NewGuid() };
await Uploader.Open(Archive); await Uploader.Open(Archive);
} }

View File

@ -19,7 +19,7 @@ namespace LANCommander.Controllers
ArchiveService = archiveService; ArchiveService = archiveService;
} }
public async Task<IActionResult> Game(Guid id) public async Task<IActionResult> Archive(Guid id)
{ {
var archive = await ArchiveService.Get(id); var archive = await ArchiveService.Get(id);