Files
ersatztv/ErsatzTV/Shared/EditExternalJsonFileDialog.razor
T
Jason DoveandGitHub 0330b9326d add external json playout type for dizquetv interop (#1539)
* add external json playout

* basic local playback works

* fallback to streaming from plex

* update external json file

* update changelog
2024-01-08 19:45:43 -06:00

45 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]
MudDialogInstance 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();
}