Files
ersatztv/ErsatzTV/Shared/EditExternalJsonFileDialog.razor
T
Jason DoveandGitHub 5d081ceeff fix editorconfig and run code cleanup (#2324)
* fix formatting rules

* reformat ersatztv

* reformat ersatztv.application

* reformat ersatztv.core

* refactor ersatztv.core.tests

* reformat ersatztv.ffmpeg

* reformat ersatztv.ffmpeg.tests

* reformat ersatztv.infrastructure

* cleanup infra mysql

* cleanup infra sqlite

* cleanup infra tests

* cleanup ersatztv.scanner

* cleanup ersatztv.scanner.tests

* sln cleanup

* update dependencies
2025-08-16 14:44:48 +00:00

43 lines
1.2 KiB
Plaintext

@implements IDisposable
<MudDialog>
<DialogContent>
<MudContainer Class="mb-6">
<MudText>
Edit the playout's external json file
</MudText>
</MudContainer>
<MudTextField Label="External Json File" @bind-Value="_externalJsonFile"/>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel" ButtonType="ButtonType.Reset">Cancel</MudButton>
<MudButton Color="Color.Primary" Variant="Variant.Filled" Disabled="@(string.IsNullOrWhiteSpace(_externalJsonFile))" OnClick="Submit">
Save Changes
</MudButton>
</DialogActions>
</MudDialog>
@code {
private readonly CancellationTokenSource _cts = new();
[Parameter]
public string ExternalJsonFile { get; set; }
[CascadingParameter]
IMudDialogInstance MudDialog { get; set; }
private string _externalJsonFile;
public void Dispose()
{
_cts.Cancel();
_cts.Dispose();
}
protected override void OnParametersSet() => _externalJsonFile = ExternalJsonFile;
private void Submit() => MudDialog.Close(DialogResult.Ok(_externalJsonFile));
private void Cancel() => MudDialog.Cancel();
}