CI / Build and test (push) Successful in 10m37s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 16m19s
CI / PostgreSQL 16 integration (push) Successful in 10m19s
CI / PostgreSQL 17 integration (push) Successful in 11m27s
CI / Docker image (push) Successful in 57s
Release / Server image (push) Successful in 1m34s
Owner review 4 and owner review 1 phase 6. - Work board in Videos (desktop and admin panel): Published and Workspace lanes (#29). - Anonymous usage counts removed: Chronos sends nothing about its use (#30). - The archive's whole folder tree is created inside any archive root, on the server and the desktop (#31). - Video cards start with the preset; sizes keep number and unit together (#28). - Deploy guide docs/deploy (Docker, Unraid, desktop), BRIEF §24, original documentation in docs/reference/original (#22). Closes #22 #28 #29 #30 #31 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
440 lines
32 KiB
XML
440 lines
32 KiB
XML
<UserControl x:Class="Chronos.App.Sections.VideosView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ui="clr-namespace:Chronos.Ui.Controls;assembly=Chronos.Ui"
|
|
xmlns:v="clr-namespace:Chronos.Ui.Visuals;assembly=Chronos.Ui"
|
|
xmlns:l="clr-namespace:Chronos.Ui.Localization;assembly=Chronos.Ui"
|
|
xmlns:vid="clr-namespace:Chronos.App.Videos">
|
|
<UserControl.Resources>
|
|
<Style x:Key="Button.Bar" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="Height" Value="30" />
|
|
<Setter Property="Margin" Value="0,0,8,8" />
|
|
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
|
|
</Style>
|
|
<Style x:Key="Button.Quick" TargetType="Button" BasedOn="{StaticResource Button.Icon}">
|
|
<Setter Property="Width" Value="28" />
|
|
<Setter Property="Height" Value="28" />
|
|
<Setter Property="MinWidth" Value="28" />
|
|
<Setter Property="Margin" Value="6,0,0,0" />
|
|
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
|
|
</Style>
|
|
<Style x:Key="ComboBox.ToolbarFilter" TargetType="ComboBox" BasedOn="{StaticResource ComboBox.Filter}">
|
|
<Setter Property="Margin" Value="10,4,0,4" />
|
|
<Setter Property="MaxWidth" Value="170" />
|
|
<Setter Property="ItemTemplate" Value="{StaticResource Template.FilterOption}" />
|
|
</Style>
|
|
<!--
|
|
The list's preset, format and date columns: with the player open the list keeps the title, duration, size and state
|
|
(the player shows the rest), so the state stays in view beside the pane.
|
|
-->
|
|
<Style x:Key="Column.Preset" TargetType="ColumnDefinition">
|
|
<Setter Property="Width" Value="*" />
|
|
<Setter Property="MinWidth" Value="110" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">
|
|
<Setter Property="Width" Value="0" />
|
|
<Setter Property="MinWidth" Value="0" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="Column.Format" TargetType="ColumnDefinition" BasedOn="{StaticResource Column.Preset}">
|
|
<Setter Property="MinWidth" Value="130" />
|
|
</Style>
|
|
<Style x:Key="Column.Date" TargetType="ColumnDefinition" BasedOn="{StaticResource Column.Preset}">
|
|
<Setter Property="Width" Value="130" />
|
|
<Setter Property="MinWidth" Value="0" />
|
|
</Style>
|
|
<Style x:Key="Text.CellDetail" TargetType="TextBlock" BasedOn="{StaticResource Text.Cell}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="Text.HeaderDetail" TargetType="TextBlock" BasedOn="{StaticResource Text.Header}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<ItemsPanelTemplate x:Key="Panel.Row">
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
<DataTemplate x:Key="Template.Status" DataType="{x:Type v:CardStatus}">
|
|
<ui:StatusGlyph Kind="{Binding Kind}" Text="{Binding Text}" ToolTip="{Binding ToolTip}" Margin="0,0,8,0" />
|
|
</DataTemplate>
|
|
<!--
|
|
One render's own menu (the card's and the row's): it acts on the render, or on the selection when the render is part of
|
|
it. Tag carries the section's view model to the menu, which lives outside the visual tree.
|
|
-->
|
|
<ContextMenu x:Key="Menu.Video" x:Shared="False">
|
|
<MenuItem Header="{l:Loc Videos.Play}" Command="{Binding PlacementTarget.Tag.PlayCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuPlayToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<MenuItem Header="{l:Loc Videos.ShowInFolder}" Command="{Binding PlacementTarget.Tag.ShowInFolderCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuShowInFolderToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<MenuItem Header="{Binding MenuCopyText}" Command="{Binding PlacementTarget.Tag.CopyCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuCopyToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<MenuItem Header="{l:Loc Videos.CopyOnServer}" Command="{Binding PlacementTarget.Tag.CopyOnServerCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuCopyOnServerToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<MenuItem Header="{l:Loc Videos.OpenInEdit}" Command="{Binding PlacementTarget.Tag.OpenInEditCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuOpenInEditToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
<MenuItem Header="{l:Loc Editor.Render.SendAgain}" Command="{Binding PlacementTarget.Tag.SendCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{l:Loc Tooltips.Videos.WorkspaceRow}" ToolTipService.ShowOnDisabled="True"
|
|
Visibility="{Binding Entry.IsUnsent, Converter={StaticResource BoolToVisibility}}" />
|
|
<Separator />
|
|
<MenuItem Header="{l:Loc Videos.Delete}" Command="{Binding PlacementTarget.Tag.DeleteCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" ToolTip="{Binding MenuDeleteToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
</ContextMenu>
|
|
<Style x:Key="ListBoxItem.VideoCard" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Card}">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBox}}" />
|
|
<Setter Property="ContextMenu" Value="{StaticResource Menu.Video}" />
|
|
<EventSetter Event="MouseDoubleClick" Handler="OnItemDoubleClick" />
|
|
</Style>
|
|
<Style x:Key="ListBoxItem.VideoRow" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Row}">
|
|
<Setter Property="Height" Value="38" />
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBox}}" />
|
|
<Setter Property="ContextMenu" Value="{StaticResource Menu.Video}" />
|
|
<EventSetter Event="MouseDoubleClick" Handler="OnItemDoubleClick" />
|
|
</Style>
|
|
<Style x:Key="ListBoxItem.VideoBoard" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Row}">
|
|
<Setter Property="Padding" Value="14,10" />
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBox}}" />
|
|
<Setter Property="ContextMenu" Value="{StaticResource Menu.Video}" />
|
|
<EventSetter Event="MouseDoubleClick" Handler="OnItemDoubleClick" />
|
|
</Style>
|
|
<!--
|
|
A Board card's text and its actions: beside each other, and the actions on a row of their own under the text while the
|
|
player pane narrows the lanes (rc.14 review: at the window's smallest width the text kept about 80 px).
|
|
-->
|
|
<Style x:Key="Panel.BoardText" TargetType="StackPanel">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">
|
|
<Setter Property="Grid.ColumnSpan" Value="2" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="Panel.BoardActions" TargetType="StackPanel">
|
|
<Setter Property="Orientation" Value="Horizontal" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="Grid.Column" Value="1" />
|
|
<Setter Property="Margin" Value="8,0,0,0" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="True">
|
|
<Setter Property="Grid.Column" Value="0" />
|
|
<Setter Property="Grid.Row" Value="1" />
|
|
<Setter Property="Margin" Value="0,4,0,0" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<!-- A Board card: title, project and version, preset · codec · duration · size, kind · date, state chips, and its actions. -->
|
|
<DataTemplate x:Key="Template.BoardCard" DataType="{x:Type vid:VideoRowViewModel}">
|
|
<Grid ToolTip="{Binding ToolTip}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Style="{StaticResource Panel.BoardText}">
|
|
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Style="{StaticResource Text.Secondary}" Text="{Binding ProjectText}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0"
|
|
Visibility="{Binding HasProject, Converter={StaticResource BoolToVisibility}}" />
|
|
<TextBlock Style="{StaticResource Text.Secondary}" Text="{Binding CardText}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0" />
|
|
<TextBlock Style="{StaticResource Text.Faint}" Text="{Binding BoardFactsText}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0" />
|
|
<ItemsControl Margin="0,6,0,0" ItemsSource="{Binding States}" ItemTemplate="{StaticResource Template.Status}" ItemsPanel="{StaticResource Panel.Row}"
|
|
Focusable="False" ClipToBounds="True" />
|
|
</StackPanel>
|
|
<StackPanel Style="{StaticResource Panel.BoardActions}">
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Play}"
|
|
Command="{Binding DataContext.PlayCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding PlayToolTip}" AutomationProperties.Name="{l:Loc Videos.Play}" />
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}"
|
|
Command="{Binding DataContext.ShowInFolderCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding MenuShowInFolderToolTip}" AutomationProperties.Name="{l:Loc Videos.ShowInFolder}" />
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Sequence}"
|
|
Command="{Binding DataContext.OpenInEditCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding MenuOpenInEditToolTip}" AutomationProperties.Name="{l:Loc Videos.OpenInEdit}" />
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Upload}"
|
|
Command="{Binding DataContext.SendCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding SendToolTip}" AutomationProperties.Name="{l:Loc Editor.Render.SendAgain}"
|
|
Visibility="{Binding CanSend, Converter={StaticResource BoolToVisibility}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
<Style x:Key="ListBox.Lane" TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItem.VideoBoard}" />
|
|
<Setter Property="ItemTemplate" Value="{StaticResource Template.BoardCard}" />
|
|
<Setter Property="SelectionMode" Value="Extended" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True" />
|
|
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling" />
|
|
<Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Continue" />
|
|
</Style>
|
|
<Style x:Key="Border.LaneCount" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="CornerRadius" Value="9" />
|
|
<Setter Property="Padding" Value="7,0" />
|
|
<Setter Property="MinWidth" Value="22" />
|
|
<Setter Property="Height" Value="18" />
|
|
<Setter Property="Margin" Value="8,0,0,0" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Toolbar: search, kind, codec, year, source, order · cards, list or Board (decision 20). -->
|
|
<Grid Grid.ColumnSpan="2" Margin="20,0" MinHeight="56">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" MinWidth="160" MaxWidth="260" />
|
|
<ColumnDefinition Width="3*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox VerticalAlignment="Top" Margin="0,12,0,0" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" ui:Field.Glyph="{StaticResource Icon.Search}"
|
|
ui:Field.Placeholder="{l:Loc Videos.Search}" ToolTip="{l:Loc Tooltips.Videos.Search}" AutomationProperties.Name="{l:Loc Videos.Search}" />
|
|
<WrapPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,8">
|
|
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Kinds}" SelectedItem="{Binding SelectedKind}" Tag="{Binding IsKindFiltered}"
|
|
ToolTip="{l:Loc Tooltips.Videos.Kind}" AutomationProperties.Name="{l:Loc Videos.Kind.All}" />
|
|
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Codecs}" SelectedItem="{Binding SelectedCodec}" Tag="{Binding IsCodecFiltered}"
|
|
ToolTip="{l:Loc Tooltips.Videos.Codec}" AutomationProperties.Name="{l:Loc Videos.Codec.All}" />
|
|
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Years}" SelectedItem="{Binding SelectedYear}" Tag="{Binding IsYearFiltered}"
|
|
ToolTip="{l:Loc Tooltips.Videos.Year}" AutomationProperties.Name="{l:Loc Videos.Year.All}" />
|
|
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Sources}" SelectedItem="{Binding SelectedSource}" Tag="{Binding IsSourceFiltered}"
|
|
ToolTip="{l:Loc Tooltips.Videos.Source}" AutomationProperties.Name="{l:Loc Videos.Source.All}" />
|
|
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Sorts}" SelectedItem="{Binding SelectedSort}"
|
|
ToolTip="{l:Loc Tooltips.Videos.Sort}" AutomationProperties.Name="{l:Loc Videos.Sort.Newest}" />
|
|
</WrapPanel>
|
|
<v:SegmentedControl Grid.Column="2" VerticalAlignment="Top" Margin="10,12,0,0" SelectedIndex="{Binding LayoutIndex, Mode=TwoWay}"
|
|
AutomationProperties.Name="{l:Loc Videos.View.Grid}">
|
|
<v:SegmentedItem Glyph="{StaticResource Icon.ViewGrid}" ToolTip="{l:Loc Tooltips.Videos.View}" AutomationProperties.Name="{l:Loc Videos.View.Grid}" />
|
|
<v:SegmentedItem Glyph="{StaticResource Icon.ViewList}" ToolTip="{l:Loc Tooltips.Videos.View}" AutomationProperties.Name="{l:Loc Videos.View.List}" />
|
|
<v:SegmentedItem Glyph="{StaticResource Icon.ViewBoard}" ToolTip="{l:Loc Tooltips.Videos.View.Board}" AutomationProperties.Name="{l:Loc Videos.View.Board}" />
|
|
</v:SegmentedControl>
|
|
<Button Grid.Column="3" Style="{StaticResource Button.Quick}" VerticalAlignment="Top" Margin="8,14,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Refresh}"
|
|
Command="{Binding RefreshCommand}" ToolTip="{l:Loc Tooltips.Videos.Refresh}" AutomationProperties.Name="{l:Loc Videos.Refresh}" />
|
|
</Grid>
|
|
|
|
<!-- The sequence the list is narrowed to (a chip that clears that filter alone), and why the server's videos are not listed. -->
|
|
<WrapPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="20,0,20,4">
|
|
<Button Style="{StaticResource Button.Chip}" Content="{Binding SequenceFilterText}" ui:ButtonIcon.Glyph="{StaticResource Icon.Close}" Command="{Binding ClearSequenceCommand}"
|
|
ToolTip="{l:Loc Tooltips.Videos.ClearSequence}" Visibility="{Binding IsSequenceFiltered, Converter={StaticResource BoolToVisibility}}" Margin="0,0,12,4" />
|
|
<ui:StatusGlyph Kind="Offline" Text="{Binding ServerStatusText}" ToolTip="{Binding ServerStatusToolTip}" VerticalAlignment="Center" Margin="0,0,12,4"
|
|
Visibility="{Binding IsServerLimited, Converter={StaticResource BoolToVisibility}}" />
|
|
<ProgressBar Width="120" Height="4" IsIndeterminate="True" VerticalAlignment="Center" Margin="0,0,12,4"
|
|
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}" />
|
|
</WrapPanel>
|
|
|
|
<!-- Cards: the sequence's cover (or the still itself), title, preset, details and state chips. -->
|
|
<ListBox x:Name="CardGrid" Grid.Row="2" Style="{StaticResource ListBox.Cards}" ItemsSource="{Binding Rows}" ItemContainerStyle="{StaticResource ListBoxItem.VideoCard}"
|
|
Visibility="{Binding IsGrid, Converter={StaticResource BoolToVisibility}}" AutomationProperties.Name="{l:Loc Shell.Nav.Videos}"
|
|
KeyboardNavigation.TabNavigation="Continue">
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding PlayCommand}" />
|
|
<KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
|
|
</ListBox.InputBindings>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type vid:VideoRowViewModel}">
|
|
<v:SequenceCard Title="{Binding Title}" Subtitle="{Binding CardText}" Badge="{Binding DurationText}" Statuses="{Binding States}" Thumbnail="{Binding Poster}"
|
|
IsSelected="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}, Mode=TwoWay}"
|
|
SelectToolTip="{l:Loc Tooltips.Videos.Select}" ToolTip="{Binding ToolTip}" Loaded="OnCardLoaded">
|
|
<v:SequenceCard.ActionsContent>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Play}"
|
|
Command="{Binding DataContext.PlayCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding PlayToolTip}" AutomationProperties.Name="{l:Loc Videos.Play}" />
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}"
|
|
Command="{Binding DataContext.ShowInFolderCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding MenuShowInFolderToolTip}" AutomationProperties.Name="{l:Loc Videos.ShowInFolder}" />
|
|
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.CopyToFolder}"
|
|
Command="{Binding DataContext.CopyCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
|
ToolTip="{Binding MenuCopyToolTip}" AutomationProperties.Name="{Binding MenuCopyText}" />
|
|
</StackPanel>
|
|
</v:SequenceCard.ActionsContent>
|
|
</v:SequenceCard>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<!-- List: title, preset, format, duration, size, date and state. -->
|
|
<Border Grid.Row="2" Style="{StaticResource Border.Panel}" Margin="20,4,20,12" Visibility="{Binding IsList, Converter={StaticResource BoolToVisibility}}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Border BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="14,6">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*" MinWidth="120" />
|
|
<ColumnDefinition Style="{StaticResource Column.Preset}" />
|
|
<ColumnDefinition Style="{StaticResource Column.Format}" />
|
|
<ColumnDefinition Width="72" />
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition Style="{StaticResource Column.Date}" />
|
|
<ColumnDefinition Width="*" MinWidth="140" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Videos.Column.Title}" />
|
|
<TextBlock Grid.Column="1" Style="{StaticResource Text.HeaderDetail}" Text="{l:Loc Videos.Column.Preset}" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="2" Style="{StaticResource Text.HeaderDetail}" Text="{l:Loc Videos.Column.Format}" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Videos.Column.Duration}" TextAlignment="Right" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="4" Style="{StaticResource Text.Header}" Text="{l:Loc Videos.Column.Size}" TextAlignment="Right" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="5" Style="{StaticResource Text.HeaderDetail}" Text="{l:Loc Videos.Column.Date}" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="6" Style="{StaticResource Text.Header}" Text="{l:Loc Videos.Column.State}" Margin="16,0,0,0" />
|
|
</Grid>
|
|
</Border>
|
|
<ListBox x:Name="RowList" Grid.Row="1" ItemsSource="{Binding Rows}" ItemContainerStyle="{StaticResource ListBoxItem.VideoRow}" SelectionMode="Extended"
|
|
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled" AutomationProperties.Name="{l:Loc Shell.Nav.Videos}" KeyboardNavigation.TabNavigation="Continue">
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding PlayCommand}" />
|
|
<KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
|
|
</ListBox.InputBindings>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type vid:VideoRowViewModel}">
|
|
<Grid ToolTip="{Binding ToolTip}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*" MinWidth="120" />
|
|
<ColumnDefinition Style="{StaticResource Column.Preset}" />
|
|
<ColumnDefinition Style="{StaticResource Column.Format}" />
|
|
<ColumnDefinition Width="72" />
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition Style="{StaticResource Column.Date}" />
|
|
<ColumnDefinition Width="*" MinWidth="140" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Title}" />
|
|
<TextBlock Grid.Column="1" Style="{StaticResource Text.CellDetail}" Text="{Binding Subtitle}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}" />
|
|
<TextBlock Grid.Column="2" Style="{StaticResource Text.CellDetail}" Text="{Binding FormatText}" Margin="10,0,0,0" FlowDirection="LeftToRight" />
|
|
<TextBlock Grid.Column="3" Style="{StaticResource Text.CellNumber}" Text="{Binding DurationText}" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="4" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" />
|
|
<TextBlock Grid.Column="5" Style="{StaticResource Text.CellDetail}" Text="{Binding DateText}" Margin="10,0,0,0" Foreground="{DynamicResource Brush.TextMuted}" />
|
|
<ItemsControl Grid.Column="6" Margin="16,0,0,0" ItemsSource="{Binding States}" ItemTemplate="{StaticResource Template.Status}"
|
|
ItemsPanel="{StaticResource Panel.Row}" VerticalAlignment="Center" Focusable="False" ClipToBounds="True" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!--
|
|
Board (owner request of 2026-11-06): Published, the renders filed at this PC's archive or the server, and Workspace, the
|
|
workspace's renders not sent yet and those sent still in its exports; newest first, a count per lane, the list's filters.
|
|
-->
|
|
<Grid Grid.Row="2" Margin="20,4,20,12" Visibility="{Binding IsBoard, Converter={StaticResource BoolToVisibility}}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="16" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Style="{StaticResource Border.Panel}">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Top" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="14,10" Background="Transparent"
|
|
ToolTip="{l:Loc Tooltips.Videos.Lane.Published}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{l:Loc Videos.Lane.Published}" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
<Border Style="{StaticResource Border.LaneCount}">
|
|
<TextBlock Style="{StaticResource Text.Faint}" Text="{Binding PublishedCountText}" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Typography.NumeralAlignment="Tabular" />
|
|
</Border>
|
|
</StackPanel>
|
|
</Border>
|
|
<Grid>
|
|
<ListBox x:Name="PublishedLane" Style="{StaticResource ListBox.Lane}" ItemsSource="{Binding PublishedRows}" AutomationProperties.Name="{l:Loc Videos.Lane.Published}">
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding PlayCommand}" />
|
|
<KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
|
|
</ListBox.InputBindings>
|
|
</ListBox>
|
|
<TextBlock Style="{StaticResource Text.Hint}" Text="{l:Loc Videos.Empty}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,24,0,0"
|
|
Visibility="{Binding IsPublishedEmpty, Converter={StaticResource BoolToVisibility}}" />
|
|
</Grid>
|
|
</DockPanel>
|
|
</Border>
|
|
<Border Grid.Column="2" Style="{StaticResource Border.Panel}">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Top" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="14,10" Background="Transparent"
|
|
ToolTip="{l:Loc Tooltips.Videos.Lane.Workspace}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{l:Loc Videos.Lane.Workspace}" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
<Border Style="{StaticResource Border.LaneCount}">
|
|
<TextBlock Style="{StaticResource Text.Faint}" Text="{Binding WorkspaceCountText}" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Typography.NumeralAlignment="Tabular" />
|
|
</Border>
|
|
</StackPanel>
|
|
</Border>
|
|
<Grid>
|
|
<ListBox x:Name="WorkspaceLane" Style="{StaticResource ListBox.Lane}" ItemsSource="{Binding WorkspaceRows}" AutomationProperties.Name="{l:Loc Videos.Lane.Workspace}">
|
|
<ListBox.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding PlayCommand}" />
|
|
<KeyBinding Key="Delete" Command="{Binding DeleteCommand}" />
|
|
</ListBox.InputBindings>
|
|
</ListBox>
|
|
<TextBlock Style="{StaticResource Text.Hint}" Text="{l:Loc Videos.Empty}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,24,0,0"
|
|
Visibility="{Binding IsWorkspaceEmpty, Converter={StaticResource BoolToVisibility}}" />
|
|
</Grid>
|
|
</DockPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Empty states: no video anywhere, or none the filters keep. -->
|
|
<ui:EmptyState Grid.Row="2" Message="{l:Loc Videos.Empty}" Visibility="{Binding IsEmpty, Converter={StaticResource BoolToVisibility}}" />
|
|
<ui:EmptyState Grid.Row="2" Message="{l:Loc Videos.Empty}" Visibility="{Binding IsNoMatch, Converter={StaticResource BoolToVisibility}}">
|
|
<Button Content="{l:Loc Library.ClearFilters}" Command="{Binding ClearFiltersCommand}" ToolTip="{l:Loc Tooltips.Library.ClearFilters}" />
|
|
</ui:EmptyState>
|
|
|
|
<!-- The player pane on the right (decision 21). -->
|
|
<vid:VideoPlayerPane Grid.Row="2" Grid.Column="1" Width="420" Margin="0,4,20,12" DataContext="{Binding Player}"
|
|
Visibility="{Binding DataContext.IsPlayerOpen, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource BoolToVisibility}}" />
|
|
|
|
<!-- The actions on the selection; Delete… stands apart at the far right, the destructive action last. -->
|
|
<Border Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource Border.Panel}" Padding="14,8,6,0" Margin="20,0,20,12" MinHeight="48"
|
|
Visibility="{Binding HasSelection, Converter={StaticResource BoolToVisibility}}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<WrapPanel VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding SelectionText}" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,12,8" Typography.NumeralAlignment="Tabular" />
|
|
<Border Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="0,0,12,8" />
|
|
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Videos.Play}" Command="{Binding PlayCommand}" ToolTip="{Binding PlayToolTip}" />
|
|
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Videos.ShowInFolder}" Command="{Binding ShowInFolderCommand}" ToolTip="{Binding ShowInFolderToolTip}" />
|
|
<Button Style="{StaticResource Button.Bar}" Content="{Binding CopyText}" Command="{Binding CopyCommand}" ToolTip="{Binding CopyToolTip}" />
|
|
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Videos.CopyOnServer}" Command="{Binding CopyOnServerCommand}" ToolTip="{Binding CopyOnServerToolTip}" />
|
|
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Videos.OpenInEdit}" Command="{Binding OpenInEditCommand}" ToolTip="{Binding OpenInEditToolTip}" />
|
|
<Button Style="{StaticResource Button.Subtle}" Height="30" Margin="0,0,8,8" Content="{l:Loc Library.Action.ClearSelection}" Command="{Binding ClearSelectionCommand}"
|
|
ToolTip="{l:Loc Tooltips.Library.ClearSelection}" />
|
|
</WrapPanel>
|
|
<Button Grid.Column="1" Style="{StaticResource Button.Destructive}" Height="30" Margin="8,0,8,8" VerticalAlignment="Top" Content="{l:Loc Videos.Delete}"
|
|
Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}" ToolTipService.ShowOnDisabled="True" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|