89 lines
5.2 KiB
XML
89 lines
5.2 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="clr-namespace:CRD.ViewModels"
|
|
xmlns:ui="clr-namespace:CRD.Utils.UI"
|
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
|
x:DataType="vm:HistoryPageViewModel"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="CRD.Views.HistoryPageView">
|
|
|
|
<UserControl.Resources>
|
|
<ui:UiIntToVisibilityConverter x:Key="UiIntToVisibilityConverter" />
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="20 0 0 0 ">
|
|
<Button Command="{Binding RefreshAll}" Margin="10" IsEnabled="{Binding !FetchingData}">Refresh All</Button>
|
|
<Button Command="{Binding AddMissingToQueue}" Margin="10" IsEnabled="{Binding !FetchingData}">Add To Queue</Button>
|
|
<ToggleButton IsChecked="{Binding EditMode}" Margin="10" IsEnabled="{Binding !FetchingData}">Edit</ToggleButton>
|
|
</StackPanel>
|
|
|
|
<ListBox Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedSeries}" Margin="5">
|
|
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="250" Width="250"
|
|
MaxHeight="400" Height="400" Margin="5">
|
|
<Grid>
|
|
<Image Source="{Binding ThumbnailImage}" Width="240" Height="360"></Image>
|
|
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Right" IsVisible="{Binding NewEpisodes, Converter={StaticResource UiIntToVisibilityConverter}}">
|
|
<TextBlock VerticalAlignment="Center" TextAlignment="Center" Margin="0 0 5 0" Width="30" Height="30"
|
|
Background="Black" Opacity="0.8" Text="{Binding NewEpisodes}"
|
|
Padding="0,5,0,0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
<TextBlock HorizontalAlignment="Center" Text="{Binding SeriesTitle}" TextWrapping="NoWrap" MaxWidth="240"
|
|
Margin="4,0,4,0">
|
|
</TextBlock>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="250" Width="250"
|
|
MaxHeight="400" Height="400" Background="#90000000" IsVisible="{Binding $parent[UserControl].((vm:HistoryPageViewModel)DataContext).EditMode}">
|
|
<Button MaxWidth="250" Width="250" MaxHeight="400" Height="400" FontStyle="Italic"
|
|
VerticalAlignment="Center"
|
|
Command="{Binding $parent[UserControl].((vm:HistoryPageViewModel)DataContext).RemoveSeries}"
|
|
CommandParameter="{Binding SeriesId}"
|
|
IsEnabled="{Binding !$parent[UserControl].((vm:HistoryPageViewModel)DataContext).FetchingData}"
|
|
>
|
|
<ToolTip.Tip>
|
|
<TextBlock Text="Remove Series" FontSize="15" />
|
|
</ToolTip.Tip>
|
|
<StackPanel Orientation="Horizontal">
|
|
<controls:SymbolIcon Symbol="Delete" FontSize="32" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="250" Width="250"
|
|
MaxHeight="400" Height="400" Background="#90000000" IsVisible="{Binding FetchingData}">
|
|
<!-- <ProgressBar IsIndeterminate="{Binding FetchingData}" -->
|
|
<!-- MaxWidth="100"> -->
|
|
<!-- </ProgressBar> -->
|
|
<controls:ProgressRing Width="100" Height="100"></controls:ProgressRing>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
|
|
</UserControl> |