Browse Source

more keyboard navigation

pull/2646/head
Jason Dove 9 months ago
parent
commit
04190bb62d
No known key found for this signature in database
  1. 7
      CHANGELOG.md
  2. 4
      ErsatzTV.Core/Scheduling/BlockScheduling/BlockPlayoutFillerBuilder.cs
  3. 10
      ErsatzTV/Pages/Blocks.razor
  4. 10
      ErsatzTV/Pages/Templates.razor

7
CHANGELOG.md

@ -84,9 +84,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Use smaller batch size for search index updates (100, down from 1000) - Use smaller batch size for search index updates (100, down from 1000)
- This should help newly scanned items appear in the UI more quickly - This should help newly scanned items appear in the UI more quickly
- Replace favicon and logo in background image used for error streams - Replace favicon and logo in background image used for error streams
- Block schedule template editor: - Block schedules:
- Auto scroll day view to block item time when adding and removing block items from template - Auto scroll day view to block item time when adding and removing block items from template
- Allow keyboard selection of block groups and blocks - Allow keyboard selection of
- Block groups in block list
- Template groups in template list
- Block groups and blocks in template editor
## [25.8.0] - 2025-10-26 ## [25.8.0] - 2025-10-26
### Added ### Added

4
ErsatzTV.Core/Scheduling/BlockScheduling/BlockPlayoutFillerBuilder.cs

@ -100,7 +100,6 @@ public class BlockPlayoutFillerBuilder(
collectionEnumerators, collectionEnumerators,
allItems, allItems,
filteredExistingHistory, filteredExistingHistory,
result.RemoveBefore,
cancellationToken); cancellationToken);
return result; return result;
@ -130,7 +129,7 @@ public class BlockPlayoutFillerBuilder(
// guide group is template item id // guide group is template item id
// they are reused over multiple days, so we only want to group consecutive items // they are reused over multiple days, so we only want to group consecutive items
IEnumerable<IGrouping<int, PlayoutItem>> consecutiveBlocks = allItems IEnumerable<IGrouping<int, PlayoutItem>> consecutiveBlocks = allItems
.Where(i => i.FinishOffset > result.RemoveBefore.IfNone(SystemTime.MinValueUtc)) .Where(i => i.FinishOffset > removeBefore.IfNone(SystemTime.MinValueUtc))
.GroupConsecutiveBy(item => item.GuideGroup); .GroupConsecutiveBy(item => item.GuideGroup);
foreach (IGrouping<int, PlayoutItem> blockGroup in consecutiveBlocks) foreach (IGrouping<int, PlayoutItem> blockGroup in consecutiveBlocks)
{ {
@ -303,7 +302,6 @@ public class BlockPlayoutFillerBuilder(
Dictionary<CollectionKey, IMediaCollectionEnumerator> collectionEnumerators, Dictionary<CollectionKey, IMediaCollectionEnumerator> collectionEnumerators,
List<PlayoutItem> allItems, List<PlayoutItem> allItems,
List<PlayoutHistory> filteredExistingHistory, List<PlayoutHistory> filteredExistingHistory,
Option<DateTimeOffset> removeBefore,
CancellationToken cancellationToken) CancellationToken cancellationToken)
{ {
// find all unscheduled periods // find all unscheduled periods

10
ErsatzTV/Pages/Blocks.razor

@ -30,10 +30,10 @@
<div class="d-flex"> <div class="d-flex">
<MudText>Block Group</MudText> <MudText>Block Group</MudText>
</div> </div>
<MudSelect @bind-Value="_selectedBlockGroup"> <MudSelect T="string" ValueChanged="@(name => UpdateSelectedBlockGroup(name))">
@foreach (BlockGroupViewModel blockGroup in _blockGroups) @foreach (BlockGroupViewModel blockGroup in _blockGroups)
{ {
<MudSelectItem Value="@blockGroup">@blockGroup.Name</MudSelectItem> <MudSelectItem Value="@blockGroup.Name">@blockGroup.Name</MudSelectItem>
} }
</MudSelect> </MudSelect>
</MudStack> </MudStack>
@ -192,6 +192,12 @@
} }
} }
private void UpdateSelectedBlockGroup(string blockGroupName)
{
_selectedBlockGroup = _blockGroups.Find(bg => bg.Name == blockGroupName);
InvokeAsync(StateHasChanged);
}
private async Task AddBlock() private async Task AddBlock()
{ {
if (_selectedBlockGroup is not null && !string.IsNullOrWhiteSpace(_blockName)) if (_selectedBlockGroup is not null && !string.IsNullOrWhiteSpace(_blockName))

10
ErsatzTV/Pages/Templates.razor

@ -30,10 +30,10 @@
<div class="d-flex"> <div class="d-flex">
<MudText>Template Group</MudText> <MudText>Template Group</MudText>
</div> </div>
<MudSelect @bind-Value="_selectedTemplateGroup"> <MudSelect T="string" ValueChanged="@UpdateSelectedTemplateGroup">
@foreach (TemplateGroupViewModel templateGroup in _templateGroups) @foreach (TemplateGroupViewModel templateGroup in _templateGroups)
{ {
<MudSelectItem Value="@templateGroup">@templateGroup.Name</MudSelectItem> <MudSelectItem Value="@templateGroup.Name">@templateGroup.Name</MudSelectItem>
} }
</MudSelect> </MudSelect>
</MudStack> </MudStack>
@ -140,6 +140,12 @@
} }
} }
private void UpdateSelectedTemplateGroup(string templateGroupName)
{
_selectedTemplateGroup = _templateGroups.Find(tg => tg.Name == templateGroupName);
InvokeAsync(StateHasChanged);
}
private async Task AddTemplate() private async Task AddTemplate()
{ {
if (_selectedTemplateGroup is not null && !string.IsNullOrWhiteSpace(_templateName)) if (_selectedTemplateGroup is not null && !string.IsNullOrWhiteSpace(_templateName))

Loading…
Cancel
Save