Skip to content

Commit

Permalink
Merge pull request #634 from ywmoyue/dev
Browse files Browse the repository at this point in the history
4.6.31
  • Loading branch information
ywmoyue authored May 19, 2024
2 parents 5136246 + 330e715 commit d4287f0
Show file tree
Hide file tree
Showing 56 changed files with 1,347 additions and 284 deletions.
14 changes: 14 additions & 0 deletions src/BiliLite.UWP/BiliLite.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
<Compile Include="Controls\UserFollowingTagsFlyout.xaml.cs">
<DependentUpon>UserFollowingTagsFlyout.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VideoListView.xaml.cs">
<DependentUpon>VideoListView.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\SendDynamicV2Dialog.xaml.cs">
<DependentUpon>SendDynamicV2Dialog.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -177,6 +180,9 @@
</Compile>
<Compile Include="Pages\IMainPage.cs" />
<Compile Include="Pages\IRefreshablePage.cs" />
<Compile Include="Models\Common\Video\VideoPlaylist.cs" />
<Compile Include="Models\Common\Video\VideoPlaylistItem.cs" />
<Compile Include="Player\MediaInfos\FFMpegInteropMssCollectInfoData.cs" />
<Compile Include="Services\PlayerToastService.cs" />
<Compile Include="Services\SettingsImportExportService.cs" />
<Compile Include="Services\ShortcutKeyService.cs" />
Expand Down Expand Up @@ -820,6 +826,10 @@
<Compile Include="Services\SearchService.cs" />
<Compile Include="ViewModels\Common\BaseViewModel.cs" />
<Compile Include="ViewModels\Download\DownloadDialogViewModel.cs" />
<Compile Include="Models\Common\Video\VideoListItem.cs" />
<Compile Include="Models\Common\Video\VideoListSection.cs" />
<Compile Include="ViewModels\Video\VideoListSectionViewModel.cs" />
<Compile Include="ViewModels\Video\VideoListViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\GeeTest\bili_gt.html" />
Expand Down Expand Up @@ -984,6 +994,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\VideoListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Dialogs\SendDynamicV2Dialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ DataTemplate SelectRowTemplate(UserDynamicItemDataTemplateSelector selector,
{ Constants.DynamicTypes.CUSTOM_ARTICLE, (selector, model) => selector.CustomArticleTemplate },
{ Constants.DynamicTypes.UGC_SEASON, (selector, model) => selector.UgcSeasonTemplate },
{ Constants.DynamicTypes.FOLD, (selector, model) => selector.FoldTemplate },
{ Constants.DynamicTypes.COUR_UP, (selector, model) => selector.CourUpTemplate },
};
}

Expand Down Expand Up @@ -74,6 +75,8 @@ DataTemplate SelectRowTemplate(UserDynamicItemDataTemplateSelector selector,

public DataTemplate FoldTemplate { get; set; }

public DataTemplate CourUpTemplate { get; set; }

public DataTemplate CustomSeasonTemplate { get; set; }

public DataTemplate CustomArticleTemplate { get; set; }
Expand Down
10 changes: 5 additions & 5 deletions src/BiliLite.UWP/Controls/Dynamic/DynamicItemV2Control.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</Grid.ColumnDefinitions>
<HyperlinkButton Padding="0"
Command="{x:Bind Path=ViewModel.Parent.UserCommand,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel.Author.Mid,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel,Mode=OneWay}"
Visibility="{x:Bind ViewModel.IsRepost,Converter={StaticResource display},Mode=OneWay}"
VerticalAlignment="Top">
<Grid >
Expand All @@ -43,14 +43,14 @@
<HyperlinkButton
Grid.Column="1"
Command="{x:Bind Path=ViewModel.Parent.UserCommand,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel.Author.Mid,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel,Mode=OneWay}"
Visibility="{x:Bind ViewModel.IsRepost,Converter={StaticResource display},Mode=OneWay}"
Padding="12,0,0,0" VerticalAlignment="Top" >
<Grid Height="56" >
<StackPanel VerticalAlignment="Center" >
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{x:Bind Path=ViewModel.Author.Author.Name,Mode=OneWay}" Foreground="DeepPink" Opacity=".8" Visibility="{x:Bind Path=ViewModel.Author.Author.Vip.Status,Converter={StaticResource display},ConverterParameter=1,Mode=OneWay}"></TextBlock>
<TextBlock Text="{x:Bind Path=ViewModel.Author.Author.Name,Mode=OneWay}" Foreground="{ThemeResource TextColor}" Visibility="{x:Bind Path=ViewModel.Author.Author.Vip.Status,Mode=OneWay,Converter={StaticResource display},ConverterParameter=0}"></TextBlock>
<TextBlock Text="{x:Bind Path=ViewModel.Author.Author.Name,Mode=OneWay}" Foreground="DeepPink" Opacity=".8" Visibility="{x:Bind ViewModel.AuthorIsVip,Mode=OneWay}"></TextBlock>
<TextBlock Text="{x:Bind Path=ViewModel.Author.Author.Name,Mode=OneWay}" Foreground="{ThemeResource TextColor}" Visibility="{x:Bind ViewModel.AuthorIsVip,Mode=OneWay,Converter={StaticResource display}}"></TextBlock>
</StackPanel>
<TextBlock Margin="0 4 0 0" FontSize="12" Foreground="Gray" Text="{x:Bind Path=ViewModel.Author.PtimeLabelText,Mode=OneWay}"></TextBlock>
</StackPanel>
Expand Down Expand Up @@ -98,7 +98,7 @@
HorizontalAlignment="Stretch"
Grid.ColumnSpan="2"
Command="{x:Bind Path=ViewModel.Parent.UserCommand,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel.AuthorForward.Uid,Mode=OneWay}"
CommandParameter="{x:Bind Path=ViewModel,Mode=OneWay}"
Visibility="{x:Bind Path=ViewModel.IsRepost,Mode=OneWay}"
Padding="0" >
<Grid >
Expand Down
115 changes: 90 additions & 25 deletions src/BiliLite.UWP/Controls/Dynamic/DynamicV2Template.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
LiveTemplate="{StaticResource DynamicLiveRcmd}"
UgcSeasonTemplate="{StaticResource DynamicUgcSeason}"
FoldTemplate="{StaticResource DynamicFold}"
CourUpTemplate="{StaticResource DynamicCourUp}"
CustomSeasonTemplate="{StaticResource DynamicCustomSeason}"
CustomArticleTemplate="{StaticResource DynamicCustomArticle}">
</dataTemplateSelectors:UserDynamicItemV2DataTemplateSelector>
Expand Down Expand Up @@ -81,34 +82,66 @@
<DataTemplate x:Key="DynamicPgc">
<local:DynamicItemV2Control ViewModel="{Binding}">
<local:DynamicItemV2Control.CardContent>
<Button HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Padding="0"
Background="Transparent"
Command="{Binding Path=Parent.LaunchUrlCommand}"
CommandParameter="{Binding Path=Dynamic.DynPgc.Uri}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Button HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Padding="0"
Background="Transparent"
Visibility="{Binding Dynamic.DynPgc,Converter={StaticResource display}}"
Command="{Binding Path=Parent.LaunchUrlCommand}"
CommandParameter="{Binding Path=Dynamic.DynPgc.Uri}">
<Grid>
<Border CornerRadius="4">
<Image Source="{Binding Path=Dynamic.DynPgc.Cover}" Width="{Binding Path=CoverWidth}"></Image>
</Border>
<Border Background="#C8FF69B4" CornerRadius="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="番剧"></TextBlock>
</Border>
<Border Background="#C8000000" CornerRadius="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="{Binding Path=Dynamic.DynArchive.CoverLeftText1}"></TextBlock>
</Border>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Border CornerRadius="4">
<Image Source="{Binding Path=Dynamic.DynPgc.Cover}" Width="{Binding Path=CoverWidth}"></Image>
</Border>
<Border Background="#C8FF69B4" CornerRadius="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="番剧"></TextBlock>
</Border>
<Border Background="#C8000000" CornerRadius="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="{Binding Path=Dynamic.DynArchive.CoverLeftText1}"></TextBlock>
</Border>
</Grid>

<StackPanel HorizontalAlignment="Stretch" Grid.Column="1" Margin="8 4 8 0">
<TextBlock Text="{Binding Path=Dynamic.DynPgc.Title}" Foreground="{ThemeResource TextColor}" TextTrimming="CharacterEllipsis" MaxLines="2" TextWrapping="Wrap"></TextBlock>
</StackPanel>
</Grid>
</Button>
<Button HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Padding="0"
Background="Transparent"
Visibility="{Binding Dynamic.DynArchive,Converter={StaticResource display}}"
Command="{Binding Path=Parent.LaunchUrlCommand}"
CommandParameter="{Binding Path=Dynamic.DynArchive.Uri}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Border CornerRadius="4">
<Image Source="{Binding Path=Dynamic.DynArchive.Cover}" Width="{Binding Path=CoverWidth}"></Image>
</Border>
<Border Background="#C8FF69B4" CornerRadius="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="番剧"></TextBlock>
</Border>
<Border Background="#C8000000" CornerRadius="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="{Binding Path=Dynamic.DynArchive.CoverLeftText1}"></TextBlock>
</Border>
</Grid>

<StackPanel HorizontalAlignment="Stretch" Grid.Column="1" Margin="8 4 8 0">
<TextBlock Text="{Binding Path=Dynamic.DynPgc.Title}" Foreground="{ThemeResource TextColor}" TextTrimming="CharacterEllipsis" MaxLines="2" TextWrapping="Wrap"></TextBlock>
</StackPanel>
</Grid>
</Button>
<StackPanel HorizontalAlignment="Stretch" Grid.Column="1" Margin="8 4 8 0">
<TextBlock Text="{Binding Path=Dynamic.DynArchive.Title}" Foreground="{ThemeResource TextColor}" TextTrimming="CharacterEllipsis" MaxLines="2" TextWrapping="Wrap"></TextBlock>
</StackPanel>
</Grid>
</Button>
</Grid>
</local:DynamicItemV2Control.CardContent>
</local:DynamicItemV2Control>
</DataTemplate>
Expand Down Expand Up @@ -400,6 +433,38 @@
</Border>
</DataTemplate>

<DataTemplate x:Key="DynamicCourUp">
<local:DynamicItemV2Control ViewModel="{Binding}">
<local:DynamicItemV2Control.CardContent>
<Button HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Padding="0" Background="Transparent"
Command="{Binding Path=Parent.LaunchUrlCommand}"
CommandParameter="{Binding Path=Extend.CardUrl}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Border CornerRadius="4">
<Image Source="{Binding Path=Dynamic.DynCourBatchUp.Cover}" Width="160"></Image>
</Border>
<Border Background="#C8FF69B4" CornerRadius="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4">
<TextBlock Margin="4 2" Foreground="White" FontSize="12" Text="课堂"></TextBlock>
</Border>
</Grid>

<StackPanel HorizontalAlignment="Stretch" Grid.Column="1" Margin="8 4 8 0">
<TextBlock Text="{Binding Path=Dynamic.DynCourBatchUp.Title}" Foreground="{ThemeResource TextColor}" TextTrimming="CharacterEllipsis" MaxLines="2" TextWrapping="Wrap"></TextBlock>
<TextBlock Margin="0 8 0 0" FontSize="14" Foreground="Gray">
<Run Text="{Binding Dynamic.DynCourBatchUp.Text1}"></Run>
</TextBlock>
</StackPanel>
</Grid>
</Button>
</local:DynamicItemV2Control.CardContent>
</local:DynamicItemV2Control>
</DataTemplate>

<DataTemplate x:Key="DynamicCustomSeason">
<StackPanel CornerRadius="8" Padding="12" Background="{ThemeResource CardColor}">
<Button HorizontalAlignment="Stretch"
Expand Down
Loading

0 comments on commit d4287f0

Please sign in to comment.