193 lines
8.6 KiB
XML
193 lines
8.6 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:BetterRaid.ViewModels"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ai="using:AsyncImageLoader"
|
|
xmlns:betterRaid="clr-namespace:BetterRaid"
|
|
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="800"
|
|
Width="600"
|
|
Height="800"
|
|
x:Class="BetterRaid.Views.MainWindow"
|
|
x:DataType="vm:MainWindowViewModel"
|
|
Icon="/Assets/logo.png"
|
|
Title="BetterRaid"
|
|
Background="DarkSlateGray">
|
|
|
|
<Design.DataContext>
|
|
<vm:MainWindowViewModel/>
|
|
</Design.DataContext>
|
|
|
|
<Grid HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Menu Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.Row="0">
|
|
|
|
<MenuItem Header="File">
|
|
<MenuItem Header="About"
|
|
CommandParameter="{Binding $parent[Window]}"
|
|
Command="{Binding ShowAboutWindow}" />
|
|
<Separator />
|
|
<MenuItem Header="Exit"
|
|
Command="{Binding ExitApplication}" />
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<StackPanel Grid.Column="1"
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5">
|
|
|
|
<Button Command="{Binding LoginWithTwitch}"
|
|
IsVisible="{Binding !IsLoggedIn, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
|
|
|
|
<Button.Styles>
|
|
<Style Selector="Button">
|
|
<Setter Property="Background" Value="#6441a5" />
|
|
</Style>
|
|
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="#b9a3e3" />
|
|
</Style>
|
|
</Button.Styles>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Login"
|
|
Foreground="#f1f1f1"
|
|
FontSize="14" />
|
|
<Image Source="avares://BetterRaid/Assets/glitch_flat_white.png"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="5, 0, 0, 0" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<CheckBox Content="Only Online"
|
|
IsChecked="{Binding Database.OnlyOnline, Mode=TwoWay}" />
|
|
|
|
<TextBox Grid.Column="1"
|
|
Grid.Row="0"
|
|
Width="200"
|
|
Margin="2"
|
|
Watermark="Filter Channels"
|
|
Text="{Binding Filter, Mode=TwoWay}"
|
|
HorizontalAlignment="Right" />
|
|
|
|
</StackPanel>
|
|
|
|
<TextBlock Text="Please login first!"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.Row="1"
|
|
IsVisible="{Binding !IsLoggedIn, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
TextAlignment="Center"
|
|
FontSize="24"
|
|
Foreground="#f1f1f1" />
|
|
|
|
<ScrollViewer Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.Row="1"
|
|
IsVisible="{Binding IsLoggedIn, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
|
|
<ScrollViewer.GestureRecognizers>
|
|
<ScrollGestureRecognizer CanHorizontallyScroll="False"
|
|
CanVerticallyScroll="True"
|
|
IsScrollInertiaEnabled="True" />
|
|
</ScrollViewer.GestureRecognizers>
|
|
|
|
<ListBox ItemsSource="{Binding Channels}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid ColumnDefinitions="200,*"
|
|
RowDefinitions="200">
|
|
|
|
<ai:AdvancedImage Grid.Column="0"
|
|
Grid.Row="0"
|
|
Source="{Binding ThumbnailUrl, TargetNullValue={x:Static betterRaid:App.ChannelPlaceholderImageUrl}}" />
|
|
|
|
<Border Grid.Column="0"
|
|
Grid.Row="0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Height="20"
|
|
MinWidth="20"
|
|
CornerRadius="10"
|
|
Background="#FFFFFF"
|
|
Padding="3"
|
|
Margin="0, 0, 10, 10">
|
|
<TextBlock Text="{Binding ViewerCount, TargetNullValue='-'}"/>
|
|
</Border>
|
|
|
|
<Grid Grid.Column="1"
|
|
Grid.Row="0"
|
|
ColumnDefinitions="30*, 70*"
|
|
RowDefinitions="40, 40, 40, 40, 40">
|
|
<TextBlock Grid.Column="0"
|
|
Grid.Row="0"
|
|
Grid.ColumnSpan="2"
|
|
FontWeight="Bold"
|
|
TextDecorations="Underline"
|
|
Text="{Binding DisplayName, TargetNullValue='???'}" />
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Grid.Row="1"
|
|
Text="Category:"
|
|
FontWeight="SemiBold" />
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Grid.Row="2"
|
|
Text="Title:"
|
|
FontWeight="SemiBold" />
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Grid.Row="3"
|
|
Text="Last Raided:"
|
|
FontWeight="SemiBold" />
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Grid.Row="4"
|
|
Text=""
|
|
FontWeight="SemiBold" />
|
|
|
|
<TextBlock Grid.Column="1"
|
|
Grid.Row="1"
|
|
Text="{Binding Category, TargetNullValue='-'}" />
|
|
|
|
<TextBlock Grid.Column="1"
|
|
Grid.Row="2"
|
|
Text="{Binding Title, TargetNullValue='-'}" />
|
|
|
|
<TextBlock Grid.Column="1"
|
|
Grid.Row="3"
|
|
Text="{Binding LastRaided, TargetNullValue='Never Raided'}" />
|
|
|
|
<TextBlock Grid.Column="1"
|
|
Grid.Row="4"
|
|
Text="" />
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|