History page markup, search suggestions fix (now YouTube targeted)
This commit is contained in:
@@ -5,10 +5,22 @@
|
||||
xmlns:local="using:FoxTube.Pages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:controls="using:FoxTube.Controls"
|
||||
xmlns:foxtube="using:FoxTube"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid Name="grid">
|
||||
<ScrollViewer Margin="0,0,0,50">
|
||||
<StackPanel Name="stack">
|
||||
<local:VideoGrid/>
|
||||
<controls:ShowMore Clicked="ShowMore_Clicked"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<CommandBar VerticalAlignment="Bottom">
|
||||
<AppBarButton Label="Open in browser" Icon="Globe" Name="toBrowser" Click="toBrowser_Click"/>
|
||||
<AppBarButton Label="Refresh" Icon="Refresh" Name="refresh" Click="refresh_Click"/>
|
||||
</CommandBar>
|
||||
<foxtube:LoadingPage Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using FoxTube.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -22,9 +23,41 @@ namespace FoxTube.Pages
|
||||
/// </summary>
|
||||
public sealed partial class History : Page
|
||||
{
|
||||
LoadingPage loading;
|
||||
ShowMore more;
|
||||
VideoGrid list;
|
||||
|
||||
public History()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
loading = grid.Children[2] as LoadingPage;
|
||||
more = stack.Children[1] as ShowMore;
|
||||
list = stack.Children[0] as VideoGrid;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
loading.Refresh();
|
||||
|
||||
more.Complete(true);
|
||||
|
||||
loading.Block();
|
||||
}
|
||||
|
||||
private void ShowMore_Clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void toBrowser_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void refresh_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace FoxTube
|
||||
try
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load($"http://suggestqueries.google.com/complete/search?output=toolbar&hl={(settings.Values["region"] as string).Remove(2)}&q={search.Text}");
|
||||
doc.Load($"http://suggestqueries.google.com/complete/search?ds=yt&output=toolbar&hl={CultureInfo.CurrentUICulture.TwoLetterISOLanguageName}&q={search.Text}");
|
||||
|
||||
List<string> suggestions = new List<string>();
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace FoxTube
|
||||
if (args.SelectedItem == toHome)
|
||||
content.Navigate(typeof(Home));
|
||||
else if (args.SelectedItem == toHistory)
|
||||
content.Navigate(typeof(Settings));
|
||||
content.Navigate(typeof(History));
|
||||
else if (args.SelectedItem == toLiked)
|
||||
content.Navigate(typeof(PlaylistPage), SecretsVault.UserChannel.ContentDetails.RelatedPlaylists.Likes);
|
||||
else if (args.SelectedItem == toLater)
|
||||
|
||||
Reference in New Issue
Block a user