Add redistributable support to script editor

redistributables
Pat Hartl 2023-10-18 18:11:42 -05:00
parent 2287ac9922
commit a3b1dabbb1
2 changed files with 7 additions and 5 deletions

View File

@ -113,6 +113,7 @@
@code {
[Parameter] public Guid GameId { get; set; }
[Parameter] public Guid RedistributableId { get; set; }
[Parameter] public Guid ArchiveId { get; set; }
[Parameter] public ICollection<Script> Scripts { get; set; }
[Parameter] public EventCallback<ICollection<Script>> ScriptsChanged { get; set; }
@ -150,10 +151,11 @@
private async void Edit(Script script = null)
{
if (script == null) {
Script = new Script()
{
GameId = GameId
};
if (GameId != Guid.Empty)
Script = new Script() { GameId = GameId };
if (RedistributableId != Guid.Empty)
Script = new Script() { RedistributableId = RedistributableId };
if (Editor != null)
await Editor.SetValue("");