diff --git a/ErsatzTV/Pages/BlockEditor.razor b/ErsatzTV/Pages/BlockEditor.razor index 2f6577b2..ceb5126b 100644 --- a/ErsatzTV/Pages/BlockEditor.razor +++ b/ErsatzTV/Pages/BlockEditor.razor @@ -10,280 +10,297 @@ @inject ISnackbar Snackbar @inject IMediator Mediator - -Edit Block -
- - - - - - - - - - - - - - - - - - - - - + + +
+
+ + Save Block + + + Add Block Item + + + Preview Block Playout + +
+
+
+ + + + + +
+
+
+
+ + Block + + +
+ Name +
+ +
+ +
+ Duration +
+ +
+ +
+ + + + + + + + + + + + + + +
+ +
+ Stop scheduling block items +
+ + Before Duration End + After Duration End + +
+ Block Items + + + + + + + + + + + + Collection + Playback Order + Show In EPG + Disable Watermarks + + + + + + @context.CollectionName + + + + + @context.PlaybackOrder + + + + + + + + + +
+ + + + + + + + +
+
+
+
+ @if (_selectedItem is not null) + { + Block Item + + +
+ Collection Type +
+ + Collection + Television Show + Television Season + @* Artist *@ + @* Multi Collection *@ + Smart Collection - - - - Before Duration End - After Duration End - - - -
- - Add Block Item - - - Save Changes - - - Preview Block Playout - - - - - - - - - - - - - - - Collection - Playback Order - Show In EPG - Disable Watermarks - - - - - - - - - @context.CollectionName - - - - - @context.PlaybackOrder - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- @if (_selectedItem is not null) - { - - -
- - - - Collection - Television Show - Television Season - @* Artist *@ - @* Multi Collection *@ - Smart Collection - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.Collection) - { - - - - Only the first 10 items are shown - - - - } - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.MultiCollection) - { - - - - Only the first 10 items are shown - - - - } - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.SmartCollection) - { - - - - Only the first 10 items are shown - - - - } - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.TelevisionShow) - { - - - - Only the first 10 items are shown - - - - } - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.TelevisionSeason) - { - - - - Only the first 20 items are shown - - - - } - - @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.Artist) + + @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.Collection) + { + +
+ Collection +
+ + + + Only the first 10 items are shown + + + +
+ } + @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.MultiCollection) + { + +
+ Multi Collection +
+ + + + Only the first 10 items are shown + + + +
+ } + @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.SmartCollection) + { + +
+ Smart Collection +
+ + + + Only the first 10 items are shown + + + +
+ } + @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.TelevisionShow) + { + +
+ Television Show +
+ + + + Only the first 10 items are shown + + + +
+ } + @if (_selectedItem.CollectionType == ProgramScheduleItemCollectionType.TelevisionSeason) + { + +
+ Television Season +
+ + + + Only the first 20 items are shown + + + +
+ } + +
+ Playback Order +
+ + @switch (_selectedItem.CollectionType) { - - - - Only the first 10 items are shown - - - + case ProgramScheduleItemCollectionType.MultiCollection: + Shuffle + @* Shuffle In Order *@ + break; + case ProgramScheduleItemCollectionType.Collection: + case ProgramScheduleItemCollectionType.SmartCollection: + Chronological + Shuffle + Random + Random Rotation + @* Shuffle In Order *@ + break; + case ProgramScheduleItemCollectionType.TelevisionShow: + Season, Episode + Chronological + Shuffle + Random + @* Multi-Episode Shuffle *@ + break; + case ProgramScheduleItemCollectionType.TelevisionSeason: + case ProgramScheduleItemCollectionType.Artist: + case ProgramScheduleItemCollectionType.FakeCollection: + default: + Chronological + Shuffle + Random + break; } - - - @switch (_selectedItem.CollectionType) - { - case ProgramScheduleItemCollectionType.MultiCollection: - Shuffle - @* Shuffle In Order *@ - break; - case ProgramScheduleItemCollectionType.Collection: - case ProgramScheduleItemCollectionType.SmartCollection: - Chronological - Shuffle - Random - Random Rotation - @* Shuffle In Order *@ - break; - case ProgramScheduleItemCollectionType.TelevisionShow: - Season, Episode - Chronological - Shuffle - Random - @* Multi-Episode Shuffle *@ - break; - case ProgramScheduleItemCollectionType.TelevisionSeason: - case ProgramScheduleItemCollectionType.Artist: - case ProgramScheduleItemCollectionType.FakeCollection: - default: - Chronological - Shuffle - Random - break; - } - -
-
-
-
- } -
-@if (_previewItems != null) -{ - - - Block Playout Preview - - - Start - Finish - Media Item - Duration - - - @context.Start.ToString(@"hh\:mm\:ss") - @context.Finish.ToString(@"hh\:mm\:ss") - @context.Title - @context.Duration - - -} - +
+ + } + else if (_previewItems != null) + { + Preview + + + + Start + Finish + Media Item + Duration + + + @context.Start.ToString(@"hh\:mm\:ss") + @context.Finish.ToString(@"hh\:mm\:ss") + @context.Title + @context.Duration + + + } + +
+ @code { private readonly CancellationTokenSource _cts = new(); @@ -389,15 +406,15 @@ return await Mediator.Send(new SearchTelevisionSeasons(value), _cts.Token); } - private async Task> SearchArtists(string value, CancellationToken cancellationToken) - { - if (string.IsNullOrWhiteSpace(value)) - { - return new List(); - } - - return await Mediator.Send(new SearchArtists(value), _cts.Token); - } + // private async Task> SearchArtists(string value, CancellationToken cancellationToken) + // { + // if (string.IsNullOrWhiteSpace(value)) + // { + // return new List(); + // } + // + // return await Mediator.Send(new SearchArtists(value), _cts.Token); + // } private static BlockItemEditViewModel ProjectToEditViewModel(BlockItemViewModel item) => new() @@ -514,4 +531,6 @@ private static void UpdateWatermark(BlockItemEditViewModel context, bool disableWatermarks) => context.DisableWatermarks = disableWatermarks; + private string SelectedRowClassFunc(BlockItemEditViewModel element, int rowNumber) => _selectedItem != null && _selectedItem == element ? "selected" : string.Empty; + } \ No newline at end of file diff --git a/ErsatzTV/wwwroot/css/site.css b/ErsatzTV/wwwroot/css/site.css index ec003496..990a930c 100644 --- a/ErsatzTV/wwwroot/css/site.css +++ b/ErsatzTV/wwwroot/css/site.css @@ -145,6 +145,10 @@ font-weight: bold; } +.form-field-stack .mud-input-adornment-text { + font-weight: unset; +} + .form-field-stack ul.mud-treeview .mud-typography { font-weight: unset; }