Some checks failed
LANCommander Release / prep (push) Failing after 1m10s
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
259 lines
14 KiB
XML
259 lines
14 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:LANCommander.Launcher.ViewModels"
|
|
xmlns:enums="using:LANCommander.Launcher.Settings.Enums"
|
|
xmlns:local="using:LANCommander.Launcher.Views"
|
|
x:Class="LANCommander.Launcher.Views.GamesListView"
|
|
x:DataType="vm:GamesCollectionViewModel">
|
|
|
|
<UserControl.Styles>
|
|
<Style Selector="Button.viewToggle">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Padding" Value="8,6" />
|
|
</Style>
|
|
<Style Selector="Button.viewToggle.active">
|
|
<Setter Property="Background" Value="{DynamicResource SystemAccentColor}" />
|
|
</Style>
|
|
</UserControl.Styles>
|
|
|
|
<DockPanel>
|
|
|
|
<!-- ── Filter Bar ──────────────────────────────────────────────────── -->
|
|
<StackPanel DockPanel.Dock="Bottom"
|
|
Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}">
|
|
|
|
<!-- Advanced panel — expands upward above the quick row -->
|
|
<Border IsVisible="{Binding IsAdvancedFilterOpen}"
|
|
Padding="12,10,12,4"
|
|
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
|
BorderThickness="0,0,0,1">
|
|
<WrapPanel Orientation="Horizontal" ItemWidth="180">
|
|
|
|
<!-- Sort -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Sort" FontSize="11" Opacity="0.6" />
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<ComboBox Grid.Column="0"
|
|
SelectedItem="{Binding SelectedSortBy}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.Items>
|
|
<enums:SortBy>Title</enums:SortBy>
|
|
<enums:SortBy>DateReleased</enums:SortBy>
|
|
</ComboBox.Items>
|
|
</ComboBox>
|
|
<Button Grid.Column="1"
|
|
Command="{Binding ToggleSortDirectionCommand}"
|
|
Padding="8,6" Margin="4,0,0,0">
|
|
<Panel>
|
|
<Icon Type="Regular" Value="ArrowUp" Width="12" Height="12" IsVisible="{Binding SortAscending}" />
|
|
<Icon Type="Regular" Value="ArrowDown" Width="12" Height="12" IsVisible="{Binding !SortAscending}" />
|
|
</Panel>
|
|
</Button>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<!-- Group by -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Group By" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailableGroupByOptions}"
|
|
SelectedItem="{Binding SelectedGroupBy}"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Genre -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Genre" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailableGenres}"
|
|
SelectedItem="{Binding SelectedGenre}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Name}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
|
|
<!-- Collection -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Collection" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailableCollections}"
|
|
SelectedItem="{Binding SelectedCollection}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Tags -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Tag" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailableTags}"
|
|
SelectedItem="{Binding SelectedTag}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Developer -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Developer" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailableDevelopers}"
|
|
SelectedItem="{Binding SelectedDeveloper}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Publisher -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Publisher" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{Binding AvailablePublishers}"
|
|
SelectedItem="{Binding SelectedPublisher}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Multiplayer -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Multiplayer" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{x:Static vm:GamesCollectionViewModel.AvailableMultiplayerTypes}"
|
|
SelectedItem="{Binding SelectedMultiplayerType}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Player Count -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8">
|
|
<TextBlock Text="Min Players" FontSize="11" Opacity="0.6" />
|
|
<ComboBox ItemsSource="{x:Static vm:GamesCollectionViewModel.AvailablePlayerCounts}"
|
|
SelectedItem="{Binding SelectedMinPlayers}"
|
|
PlaceholderText="Any"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- In Library (depot only) -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8"
|
|
IsVisible="{Binding ShowInLibraryFilter}">
|
|
<TextBlock Text="Ownership" FontSize="11" Opacity="0.6" />
|
|
<ToggleButton IsChecked="{Binding ShowInLibraryOnly}"
|
|
Content="In Library Only"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
<!-- Installed (library only) -->
|
|
<StackPanel Spacing="4" Margin="0,0,12,8"
|
|
IsVisible="{Binding ShowInstalledFilter}">
|
|
<TextBlock Text="Status" FontSize="11" Opacity="0.6" />
|
|
<ToggleButton IsChecked="{Binding ShowInstalledOnly}"
|
|
Content="Installed Only"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
|
|
</WrapPanel>
|
|
</Border>
|
|
|
|
<!-- Quick row -->
|
|
<Border Padding="12,8">
|
|
<Grid ColumnDefinitions="*,Auto,Auto,Auto">
|
|
|
|
<TextBox Grid.Column="0"
|
|
Watermark="Search games..."
|
|
Text="{Binding SearchText}"
|
|
Margin="0,0,8,0" />
|
|
|
|
<!-- View type toggle -->
|
|
<Border Grid.Column="1"
|
|
CornerRadius="2"
|
|
Margin="0,0,8,0"
|
|
Padding="4"
|
|
Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Classes="viewToggle"
|
|
Classes.active="{Binding IsGridView}"
|
|
ToolTip.Tip="Grid view"
|
|
Click="GridViewButton_Click">
|
|
<Icon Type="Regular" Value="SquaresFour" Width="14" Height="14" />
|
|
</Button>
|
|
<Button Classes="viewToggle"
|
|
Classes.active="{Binding IsListView}"
|
|
ToolTip.Tip="List view"
|
|
Click="ListViewButton_Click">
|
|
<Icon Type="Regular" Value="Rows" Width="14" Height="14" />
|
|
</Button>
|
|
<Button Classes="viewToggle"
|
|
Classes.active="{Binding IsHorizontalView}"
|
|
ToolTip.Tip="Horizontal view"
|
|
Click="HorizontalViewButton_Click">
|
|
<Icon Type="Regular" Value="ArrowsHorizontal" Width="14" Height="14" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Advanced toggle -->
|
|
<ToggleButton Grid.Column="2"
|
|
Classes="Text"
|
|
IsChecked="{Binding IsAdvancedFilterOpen}"
|
|
Padding="8,6"
|
|
Margin="0,0,8,0"
|
|
ToolTip.Tip="Advanced filters">
|
|
<Icon Type="Regular" Value="FunnelSimple" Width="14" Height="14" />
|
|
</ToggleButton>
|
|
|
|
<Button Grid.Column="3"
|
|
Command="{Binding ClearFiltersCommand}"
|
|
Content="✕"
|
|
Classes="Text Error"
|
|
Padding="8,6" />
|
|
|
|
</Grid>
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
<!-- ── Loading ─────────────────────────────────────────────────────── -->
|
|
<Border DockPanel.Dock="Top"
|
|
IsVisible="{Binding IsLoading}"
|
|
Padding="16,54,16,10"
|
|
HorizontalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
|
|
<ProgressBar IsIndeterminate="True" Width="120" Height="3" />
|
|
<TextBlock Text="Loading..." VerticalAlignment="Center" Opacity="0.6" FontSize="13" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- ── Error ──────────────────────────────────────────────────────── -->
|
|
<Border DockPanel.Dock="Top"
|
|
IsVisible="{Binding HasError}"
|
|
Padding="12"
|
|
Margin="16,44,16,0"
|
|
CornerRadius="0">
|
|
<TextBlock Text="{Binding StatusMessage}" TextWrapping="Wrap" Foreground="IndianRed" />
|
|
</Border>
|
|
|
|
<!-- ── Sub-views ──────────────────────────────────────────────────── -->
|
|
<Grid>
|
|
<local:GamesGridView IsVisible="{Binding IsGridViewFlat}" />
|
|
<local:GamesRowView IsVisible="{Binding IsListViewFlat}" />
|
|
<local:LibraryRowView IsVisible="{Binding IsLibraryListViewFlat}" />
|
|
<local:GamesShelfView IsVisible="{Binding IsHorizontalViewFlat}" />
|
|
<local:GamesGroupedView IsVisible="{Binding IsGrouped}" />
|
|
|
|
<!-- ── Empty state ─────────────────────────────────────────── -->
|
|
<StackPanel Spacing="12"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<StackPanel.IsVisible>
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
<Binding Path="!IsLoading" />
|
|
<Binding Path="!HasGames" />
|
|
<Binding Path="!HasError" />
|
|
</MultiBinding>
|
|
</StackPanel.IsVisible>
|
|
<Icon Type="Regular" Value="GameController" Width="32" Height="32" HorizontalAlignment="Center" Opacity="0.4" />
|
|
<TextBlock Text="No Games Found" FontSize="16" Opacity="0.5" HorizontalAlignment="Center" />
|
|
<TextBlock Text="Try adjusting your filters or search terms."
|
|
FontSize="13" Opacity="0.4" HorizontalAlignment="Center" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</DockPanel>
|
|
</UserControl>
|