forked from xiaoyaocz/biliuwp-lite
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
745 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/BiliLite.UWP/Models/Common/UserDynamic/IUserDynamicCommands.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Windows.Input; | ||
|
||
namespace BiliLite.Models.Common.UserDynamic | ||
{ | ||
public interface IUserDynamicCommands | ||
{ | ||
public ICommand LaunchUrlCommand { get; set; } | ||
|
||
public ICommand RepostCommand { get; set; } | ||
|
||
public ICommand LikeCommand { get; set; } | ||
|
||
public ICommand CommentCommand { get; set; } | ||
|
||
public ICommand UserCommand { get; set; } | ||
|
||
public ICommand LoadMoreCommand { get; } | ||
|
||
public ICommand WebDetailCommand { get; set; } | ||
|
||
public ICommand DetailCommand { get; set; } | ||
|
||
public ICommand ImageCommand { get; set; } | ||
|
||
public ICommand WatchLaterCommand { get; set; } | ||
|
||
public ICommand CopyDynCommand { get; set; } | ||
|
||
public ICommand TagCommand { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<Page | ||
x:Class="BiliLite.Pages.Home.UserDynamicAllPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:BiliLite.Pages.Home" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:user="using:BiliLite.Modules.User" | ||
mc:Ignorable="d" | ||
xmlns:controls="using:BiliLite.Controls" | ||
xmlns:dynamic="using:BiliLite.Controls.Dynamic" | ||
xmlns:fa="using:FontAwesome5" | ||
xmlns:converters="using:BiliLite.Converters" | ||
xmlns:controls1="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
Background="{ThemeResource TopPaneBackground}"> | ||
<Page.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="/Controls/Dynamic/DynamicV2Template.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
|
||
<Style TargetType="HyperlinkButton"> | ||
<Setter Property="Foreground" Value="#178bcf" /> | ||
</Style> | ||
<ItemsPanelTemplate x:Key="GridPanel"> | ||
<controls1:StaggeredPanel DesiredColumnWidth="500" | ||
HorizontalAlignment="Stretch" | ||
ColumnSpacing="-12" | ||
RowSpacing="8" /> | ||
</ItemsPanelTemplate> | ||
<ItemsPanelTemplate x:Key="ListPanel"> | ||
<ItemsStackPanel /> | ||
</ItemsPanelTemplate> | ||
|
||
<Storyboard x:Name="HideComment"> | ||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommentPanel" Storyboard.TargetProperty="(UIElement.Opacity)"> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00.5100000" Value="0"/> | ||
</DoubleAnimationUsingKeyFrames> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CommentPanel" Storyboard.TargetProperty="(UIElement.Visibility)"> | ||
<DiscreteObjectKeyFrame KeyTime="00:00:00.5000000"> | ||
<DiscreteObjectKeyFrame.Value> | ||
<Visibility>Visible</Visibility> | ||
</DiscreteObjectKeyFrame.Value> | ||
</DiscreteObjectKeyFrame> | ||
<DiscreteObjectKeyFrame KeyTime="00:00:00.5100000"> | ||
<DiscreteObjectKeyFrame.Value> | ||
<Visibility>Collapsed</Visibility> | ||
</DiscreteObjectKeyFrame.Value> | ||
</DiscreteObjectKeyFrame> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
|
||
<Storyboard x:Name="ShowComment"> | ||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommentPanel" Storyboard.TargetProperty="(UIElement.Opacity)"> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00.0100000" Value="0"/> | ||
<EasingDoubleKeyFrame KeyTime="00:00:00.5100000" Value="1"/> | ||
</DoubleAnimationUsingKeyFrames> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CommentPanel" Storyboard.TargetProperty="(UIElement.Visibility)"> | ||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> | ||
<DiscreteObjectKeyFrame.Value> | ||
<Visibility>Collapsed</Visibility> | ||
</DiscreteObjectKeyFrame.Value> | ||
</DiscreteObjectKeyFrame> | ||
<DiscreteObjectKeyFrame KeyTime="00:00:00.0100000"> | ||
<DiscreteObjectKeyFrame.Value> | ||
<Visibility>Visible</Visibility> | ||
</DiscreteObjectKeyFrame.Value> | ||
</DiscreteObjectKeyFrame> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
</ResourceDictionary> | ||
</Page.Resources> | ||
<Grid > | ||
<!--背景图--> | ||
<Image Visibility="Collapsed" Stretch="UniformToFill" Source="https://i0.hdslb.com/bfs/album/[email protected]"></Image> | ||
<Grid > | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
<Grid x:Name="gridTopBar" MaxWidth="800" Margin="8 0"> | ||
<Border x:Name="borderTopBar" Margin="12 4" CornerRadius="4" Background="{ThemeResource CardColor}"> | ||
<Pivot x:Name="pivot" SelectionChanged="Pivot_OnSelectionChanged"> | ||
<Pivot.RightHeader> | ||
<StackPanel Orientation="Horizontal"> | ||
|
||
<Button Command="{x:Bind Path=m_viewModel.RepostCommand,Mode=OneWay}" Background="Transparent" Margin="8 0"> | ||
<StackPanel Orientation="Horizontal"> | ||
<FontIcon FontSize="14" FontFamily="Segoe MDL2 Assets" Glyph="" /> | ||
<TextBlock Margin="8 0 0 0">发表动态</TextBlock> | ||
</StackPanel> | ||
</Button> | ||
</StackPanel> | ||
|
||
</Pivot.RightHeader> | ||
<PivotItem> | ||
<PivotItem.Header> | ||
<TextBlock FontSize="15">全部</TextBlock> | ||
</PivotItem.Header> | ||
</PivotItem> | ||
<PivotItem> | ||
<PivotItem.Header> | ||
<TextBlock FontSize="15">投稿视频</TextBlock> | ||
</PivotItem.Header> | ||
</PivotItem> | ||
<PivotItem> | ||
<PivotItem.Header> | ||
<TextBlock FontSize="15">追番追剧</TextBlock> | ||
</PivotItem.Header> | ||
</PivotItem> | ||
<PivotItem> | ||
<PivotItem.Header> | ||
<TextBlock FontSize="15">专栏</TextBlock> | ||
</PivotItem.Header> | ||
</PivotItem> | ||
</Pivot> | ||
</Border> | ||
</Grid> | ||
<controls:MyListView SelectionMode="None" | ||
IsItemClickEnabled="false" | ||
x:Name="ListDyn" | ||
ItemsSource="{x:Bind Path=m_viewModel.DynamicItems,Mode=OneWay}" | ||
CanLoadMore="{x:Bind Path=m_viewModel.CanLoadMore,Mode=OneWay}" | ||
LoadMoreBottomOffset="0" | ||
LoadMoreCommand="{x:Bind Path=m_viewModel.LoadMoreCommand}" | ||
Padding="4" | ||
Grid.Row="1" | ||
ItemTemplateSelector="{StaticResource DynamicTemplateSelector}" | ||
HorizontalContentAlignment="Center"> | ||
<controls:MyListView.ItemContainerStyle> | ||
<Style TargetType="ListViewItem"> | ||
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> | ||
<Setter Property="MaxWidth" Value="800"></Setter> | ||
<Setter Property="Margin" Value="4"></Setter> | ||
</Style> | ||
</controls:MyListView.ItemContainerStyle> | ||
|
||
</controls:MyListView> | ||
<ProgressRing Grid.Row="1" VerticalAlignment="Bottom" Margin="8" IsActive="True" HorizontalAlignment="Center" Visibility="{x:Bind Path=m_viewModel.Loading,Mode=OneWay}"></ProgressRing> | ||
<StackPanel Orientation="Vertical" Grid.Row="1" VerticalAlignment="Bottom" Margin="20 12" HorizontalAlignment="Right"> | ||
<controls:RoundButton x:Name="BtnGrid" ToolTipService.ToolTip="切换为瀑布流" Click="BtnGrid_OnClick" Margin="0 0 0 8" Padding="12"> | ||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" Foreground="White"/> | ||
</controls:RoundButton> | ||
<controls:RoundButton x:Name="BtnList" Visibility="Collapsed" ToolTipService.ToolTip="切换为列表" Click="BtnList_OnClick" Margin="0 0 0 8" Padding="12"> | ||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" Foreground="White"/> | ||
</controls:RoundButton> | ||
<controls:RoundButton x:Name="BtnTop" Click="BtnTop_OnClick" ToolTipService.ToolTip="返回顶部" Margin="0 0 0 8" Padding="12"> | ||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" Foreground="White"/> | ||
</controls:RoundButton> | ||
<controls:RoundButton x:Name="BtnRefresh" Click="BtnRefreshDynamic_OnClick" Padding="12"> | ||
<SymbolIcon Symbol="Refresh" Foreground="White"></SymbolIcon> | ||
</controls:RoundButton> | ||
</StackPanel> | ||
<Grid x:Name="CommentPanel" | ||
Visibility="Collapsed" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Background="{ThemeResource HalfTransparentBackground}"> | ||
<Grid | ||
Tapped="CommentPanel_OnTapped" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Background="Transparent"></Grid> | ||
<Grid HorizontalAlignment="Right" | ||
Background="{ThemeResource ApplicationBackground}" | ||
Width="{x:Bind m_viewModel.CommentControlWidth}" | ||
VerticalAlignment="Stretch"> | ||
<controls:CommentControl x:Name="Comment"></controls:CommentControl> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
</Page> |
Oops, something went wrong.