UI adjustment

This commit is contained in:
2020-05-07 12:46:31 +08:00
parent a0607993e9
commit 84aecdf39b
21 changed files with 593 additions and 86 deletions

View File

@@ -7,7 +7,6 @@
xmlns:r="clr-namespace:Pixiview.Resources"
x:Class="Pixiview.Illust.MainPage"
util:Screen.StatusBarStyle="{DynamicResource StatusBarStyle}"
Shell.NavBarHasShadow="True"
BackgroundColor="{DynamicResource WindowColor}"
Title="{r:Text Follow}">
<ContentPage.ToolbarItems>

View File

@@ -6,7 +6,6 @@
xmlns:util="clr-namespace:Pixiview.Utils"
x:Class="Pixiview.Illust.RankingPage"
util:Screen.StatusBarStyle="{DynamicResource StatusBarStyle}"
Shell.NavBarHasShadow="True"
BackgroundColor="{DynamicResource WindowColor}">
<Grid>
<ScrollView HorizontalOptions="Fill">

View File

@@ -5,11 +5,10 @@
xmlns:u="clr-namespace:Pixiview.UI"
xmlns:util="clr-namespace:Pixiview.Utils"
xmlns:r="clr-namespace:Pixiview.Resources"
x:Class="Pixiview.Illust.NewsPage"
x:Class="Pixiview.Illust.RecommendsPage"
util:Screen.StatusBarStyle="{DynamicResource StatusBarStyle}"
Shell.NavBarHasShadow="True"
BackgroundColor="{DynamicResource WindowColor}"
Title="{r:Text News}">
Title="{r:Text Recommends}">
<Grid>
<ScrollView HorizontalOptions="Fill">
<u:FlowLayout ItemsSource="{Binding Illusts}"

View File

@@ -1,11 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using Pixiview.Utils;
namespace Pixiview.Illust
{
public partial class NewsPage : IllustCollectionPage
public partial class RecommendsPage : IllustCollectionPage
{
public NewsPage()
public bool ByUser { get; set; }
public RecommendsPage()
{
Resources.Add("cardView", GetCardViewTemplate());
InitializeComponent();
@@ -15,7 +18,14 @@ namespace Pixiview.Illust
protected override IEnumerable<string> DoGetIllustList(IllustData data)
{
return data.body.page.newPost;
if (ByUser)
{
return data.body.page.recommendUser.SelectMany(i => i.illustIds);
}
else
{
return data.body.page.recommend;
}
}
protected override IllustData DoLoadIllustData(bool force)

View File

@@ -9,7 +9,6 @@
util:Screen.StatusBarStyle="{DynamicResource StatusBarStyle}"
ios:Page.UseSafeArea="False"
Shell.TabBarIsVisible="False"
Shell.NavBarHasShadow="True"
BackgroundColor="{DynamicResource WindowColor}"
Title="{Binding IllustItem.Title}">
<ContentPage.ToolbarItems>