Submission candidate #1 (ver. 0.3)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using Google.Apis.Services;
|
using Google.Apis.Services;
|
||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
|
using Microsoft.AppCenter.Analytics;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -16,7 +17,7 @@ namespace FoxTube.Background
|
|||||||
public sealed class BackgroundProcessor : IBackgroundTask
|
public sealed class BackgroundProcessor : IBackgroundTask
|
||||||
{
|
{
|
||||||
private DateTime lastCheck = DateTime.Now;
|
private DateTime lastCheck = DateTime.Now;
|
||||||
private ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
private readonly ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
||||||
private YouTubeService Service => new YouTubeService(new BaseClientService.Initializer()
|
private YouTubeService Service => new YouTubeService(new BaseClientService.Initializer()
|
||||||
{
|
{
|
||||||
ApiKey = "AIzaSyBgHrCnrlzlVmk0cJKL8RqP9Y8x6XSuk_0",
|
ApiKey = "AIzaSyBgHrCnrlzlVmk0cJKL8RqP9Y8x6XSuk_0",
|
||||||
@@ -29,6 +30,7 @@ namespace FoxTube.Background
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
def = taskInstance.GetDeferral();
|
def = taskInstance.GetDeferral();
|
||||||
|
taskInstance.Canceled += new BackgroundTaskCanceledEventHandler(OnCanceled);
|
||||||
|
|
||||||
if (settings.Values["lastCheck"] == null)
|
if (settings.Values["lastCheck"] == null)
|
||||||
{
|
{
|
||||||
@@ -45,7 +47,6 @@ namespace FoxTube.Background
|
|||||||
if (notificationsSettings[1])
|
if (notificationsSettings[1])
|
||||||
await CheckAccount();
|
await CheckAccount();
|
||||||
}
|
}
|
||||||
catch { }
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
settings.Values["lastCheck"] = DateTime.Now.ToString();
|
settings.Values["lastCheck"] = DateTime.Now.ToString();
|
||||||
@@ -53,6 +54,15 @@ namespace FoxTube.Background
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)
|
||||||
|
{
|
||||||
|
Analytics.TrackEvent("Background task caneled", new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "Reason", reason.ToString() }
|
||||||
|
});
|
||||||
|
settings.Values["lastCheck"] = DateTime.Now.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
async Task CheckAccount()
|
async Task CheckAccount()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -127,6 +127,9 @@
|
|||||||
<PackageReference Include="Google.Apis.YouTube.v3">
|
<PackageReference Include="Google.Apis.YouTube.v3">
|
||||||
<Version>1.29.2.1006</Version>
|
<Version>1.29.2.1006</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.AppCenter.Analytics">
|
||||||
|
<Version>1.13.0</Version>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||||
<Version>6.1.5</Version>
|
<Version>6.1.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Windows.ApplicationModel.Resources;
|
|
||||||
using Windows.Data.Xml.Dom;
|
using Windows.Data.Xml.Dom;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
using Windows.UI.Notifications;
|
using Windows.UI.Notifications;
|
||||||
|
|||||||
+18
-7
@@ -1,5 +1,8 @@
|
|||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
|
using Microsoft.AppCenter;
|
||||||
|
using Microsoft.AppCenter.Analytics;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
@@ -42,6 +45,9 @@ namespace FoxTube
|
|||||||
ApplicationLanguages.PrimaryLanguageOverride = SettingsStorage.Language;
|
ApplicationLanguages.PrimaryLanguageOverride = SettingsStorage.Language;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Suspending += OnSuspending;
|
Suspending += OnSuspending;
|
||||||
|
UnhandledException += UnhandledError;
|
||||||
|
AppCenter.Start("45774462-9ea7-438a-96fc-03982666f39e", typeof(Analytics));
|
||||||
|
AppCenter.SetCountryCode(SettingsStorage.Region);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -51,11 +57,9 @@ namespace FoxTube
|
|||||||
/// <param name="e">Details about the launch request and process.</param>
|
/// <param name="e">Details about the launch request and process.</param>
|
||||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||||
{
|
{
|
||||||
Frame rootFrame = Window.Current.Content as Frame;
|
|
||||||
|
|
||||||
// Do not repeat app initialization when the Window already has content,
|
// Do not repeat app initialization when the Window already has content,
|
||||||
// just ensure that the window is active
|
// just ensure that the window is active
|
||||||
if (rootFrame == null)
|
if (!(Window.Current.Content is Frame rootFrame))
|
||||||
{
|
{
|
||||||
// Create a Frame to act as the navigation context and navigate to the first page
|
// Create a Frame to act as the navigation context and navigate to the first page
|
||||||
rootFrame = new Frame();
|
rootFrame = new Frame();
|
||||||
@@ -180,13 +184,11 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
base.OnActivated(e);
|
base.OnActivated(e);
|
||||||
|
|
||||||
Frame rootFrame = Window.Current.Content as Frame;
|
if (!(Window.Current.Content is Frame rootFrame))
|
||||||
|
|
||||||
if (rootFrame == null)
|
|
||||||
{
|
{
|
||||||
rootFrame = new Frame();
|
rootFrame = new Frame();
|
||||||
rootFrame.NavigationFailed += OnNavigationFailed;
|
rootFrame.NavigationFailed += OnNavigationFailed;
|
||||||
|
|
||||||
Window.Current.Content = rootFrame;
|
Window.Current.Content = rootFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,5 +250,14 @@ namespace FoxTube
|
|||||||
DownloadAgent.QuitPrompt();
|
DownloadAgent.QuitPrompt();
|
||||||
deferral.Complete();
|
deferral.Complete();
|
||||||
}
|
}
|
||||||
|
private void UnhandledError(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
Analytics.TrackEvent("The app crashed", new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "Exception", e.Exception.GetType().ToString() },
|
||||||
|
{ "Class", e.ToString() },
|
||||||
|
{ "Details", e.Message }
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 562 B |
Binary file not shown.
|
After Width: | Height: | Size: 667 B |
Binary file not shown.
|
After Width: | Height: | Size: 672 B |
Binary file not shown.
|
After Width: | Height: | Size: 804 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -1,5 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<items>
|
<items>
|
||||||
|
<item time="2019-02-02" version="0.3">
|
||||||
|
<content>
|
||||||
|
<en-US>### What's new:
|
||||||
|
|
||||||
|
- Small fixes
|
||||||
|
- First public pre-release version
|
||||||
|
- Some content was cut out due to its incompleteness
|
||||||
|
</en-US>
|
||||||
|
<ru-RU>### Что нового:
|
||||||
|
|
||||||
|
- Мелкие исправления багов
|
||||||
|
- Эта версия является первой пред-релизной публичной версией
|
||||||
|
- Некотроые функции были вырезаны из-за их незавершенности
|
||||||
|
</ru-RU>
|
||||||
|
</content>
|
||||||
|
</item>
|
||||||
<item time="2019-01-05" version="0.2.19012">
|
<item time="2019-01-05" version="0.2.19012">
|
||||||
<content>
|
<content>
|
||||||
<en-US>### What's new:
|
<en-US>### What's new:
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using FoxTube.Classes;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using YoutubeExplode.Models.MediaStreams;
|
using YoutubeExplode.Models.MediaStreams;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
using System.Diagnostics;
|
|
||||||
using FoxTube.Controls;
|
using FoxTube.Controls;
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Windows.Storage;
|
|
||||||
|
|
||||||
namespace FoxTube.Classes
|
namespace FoxTube.Classes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Xml;
|
|
||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
|
|
||||||
namespace FoxTube.Classes
|
namespace FoxTube.Classes
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using FoxTube.Controls.Adverts;
|
using FoxTube.Pages;
|
||||||
using FoxTube.Pages;
|
|
||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Microsoft.Advertising.WinRT.UI;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@@ -223,41 +221,6 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public static string QualityToString(YouTubeQuality quality)
|
|
||||||
{
|
|
||||||
switch(quality)
|
|
||||||
{
|
|
||||||
case YouTubeQuality.NotAvailable:
|
|
||||||
return "N/A";
|
|
||||||
case YouTubeQuality.Quality1080P:
|
|
||||||
return "1080p";
|
|
||||||
case YouTubeQuality.Quality144P:
|
|
||||||
return "144p";
|
|
||||||
case YouTubeQuality.Quality2160P:
|
|
||||||
return "2160p";
|
|
||||||
case YouTubeQuality.Quality240P:
|
|
||||||
return "240p";
|
|
||||||
case YouTubeQuality.Quality270P:
|
|
||||||
return "270p";
|
|
||||||
case YouTubeQuality.Quality360P:
|
|
||||||
return "360p";
|
|
||||||
case YouTubeQuality.Quality480P:
|
|
||||||
return "480p";
|
|
||||||
case YouTubeQuality.Quality520P:
|
|
||||||
return "520p";
|
|
||||||
case YouTubeQuality.Quality720P:
|
|
||||||
return "720p";
|
|
||||||
case YouTubeQuality.QualityHigh:
|
|
||||||
return "[Audio only] High quality";
|
|
||||||
case YouTubeQuality.QualityLow:
|
|
||||||
return "[Audio only] Low quality";
|
|
||||||
case YouTubeQuality.QualityMedium:
|
|
||||||
return "[Audio only] Medium quality";
|
|
||||||
default:
|
|
||||||
return "Unknown";
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public async static void ProcessLink(string url)
|
public async static void ProcessLink(string url)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
//User info
|
//User info
|
||||||
public static bool IsAuthorized => Credential != null;
|
public static bool IsAuthorized => Credential != null;
|
||||||
private static UserCredential Credential { get; set; }
|
public static UserCredential Credential { get; set; }
|
||||||
|
|
||||||
public static string AccountId => UserChannel?.Id;
|
public static string AccountId => UserChannel?.Id;
|
||||||
public static Channel UserChannel { get; private set; }
|
public static Channel UserChannel { get; private set; }
|
||||||
@@ -61,7 +61,7 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
if (!IsAuthorized)
|
if (!IsAuthorized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(Subscriptions.Exists(x => x.Snippet.ResourceId.ChannelId == id))
|
if(Subscriptions.Exists(x => x.Snippet.ResourceId.ChannelId == id))
|
||||||
{
|
{
|
||||||
Subscription s = Subscriptions.Find(x => x.Snippet.ResourceId.ChannelId == id);
|
Subscription s = Subscriptions.Find(x => x.Snippet.ResourceId.ChannelId == id);
|
||||||
|
|||||||
+24
-27
@@ -17,12 +17,11 @@
|
|||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
|
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
|
||||||
<PackageCertificateKeyFile>
|
<PackageCertificateKeyFile>FoxTube_StoreKey.pfx</PackageCertificateKeyFile>
|
||||||
</PackageCertificateKeyFile>
|
<PackageCertificateThumbprint>50B93E6A246058D555BA65CD203D7A02064A7409</PackageCertificateThumbprint>
|
||||||
<PackageCertificateThumbprint>E888C12EC9A02B902D03CDA4515BDBE9F5E71F1F</PackageCertificateThumbprint>
|
|
||||||
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
||||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||||
<AppxPackageDir>C:\Users\Michael Gordeev\Downloads\FoxTube dists\0.2.1901-1\</AppxPackageDir>
|
<AppxPackageDir>D:\XFox\Documents\FoxTube builds\0.3\</AppxPackageDir>
|
||||||
<AppxBundle>Always</AppxBundle>
|
<AppxBundle>Always</AppxBundle>
|
||||||
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
|
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
|
||||||
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
|
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
|
||||||
@@ -137,6 +136,9 @@
|
|||||||
<Compile Include="Controls\ShowMore.xaml.cs">
|
<Compile Include="Controls\ShowMore.xaml.cs">
|
||||||
<DependentUpon>ShowMore.xaml</DependentUpon>
|
<DependentUpon>ShowMore.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Pages\Browser.xaml.cs">
|
||||||
|
<DependentUpon>Browser.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Pages\ChannelPage.xaml.cs">
|
<Compile Include="Pages\ChannelPage.xaml.cs">
|
||||||
<DependentUpon>ChannelPage.xaml</DependentUpon>
|
<DependentUpon>ChannelPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -201,6 +203,11 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Assets\AnnouncementThumb.png" />
|
<Content Include="Assets\AnnouncementThumb.png" />
|
||||||
|
<Content Include="Assets\BadgeLogo.scale-100.png" />
|
||||||
|
<Content Include="Assets\BadgeLogo.scale-125.png" />
|
||||||
|
<Content Include="Assets\BadgeLogo.scale-150.png" />
|
||||||
|
<Content Include="Assets\BadgeLogo.scale-200.png" />
|
||||||
|
<Content Include="Assets\BadgeLogo.scale-400.png" />
|
||||||
<Content Include="Assets\ChannelCoverTemplate.png" />
|
<Content Include="Assets\ChannelCoverTemplate.png" />
|
||||||
<Content Include="Assets\Data\Patchnotes.xml" />
|
<Content Include="Assets\Data\Patchnotes.xml" />
|
||||||
<Content Include="Assets\FoxGame.png" />
|
<Content Include="Assets\FoxGame.png" />
|
||||||
@@ -250,25 +257,8 @@
|
|||||||
<Content Include="Assets\Wide310x150Logo.scale-125.png" />
|
<Content Include="Assets\Wide310x150Logo.scale-125.png" />
|
||||||
<Content Include="Assets\Wide310x150Logo.scale-150.png" />
|
<Content Include="Assets\Wide310x150Logo.scale-150.png" />
|
||||||
<Content Include="Assets\Wide310x150Logo.scale-400.png" />
|
<Content Include="Assets\Wide310x150Logo.scale-400.png" />
|
||||||
<Content Include="Notifications\Comment.xml">
|
<None Include="FoxTube_StoreKey.pfx" />
|
||||||
<SubType>Designer</SubType>
|
<None Include="Package.StoreAssociation.xml" />
|
||||||
</Content>
|
|
||||||
<Content Include="Notifications\Download.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Notifications\DownloadComplete.xml" />
|
|
||||||
<Content Include="Notifications\downloadHistorySample.xml" />
|
|
||||||
<Content Include="Notifications\Internal.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Notifications\NotificationsHistorySample.xml" />
|
|
||||||
<Content Include="Notifications\Post.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Notifications\ServerLogSamlpe.xml" />
|
|
||||||
<Content Include="Notifications\Video.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Properties\Default.rd.xml" />
|
<Content Include="Properties\Default.rd.xml" />
|
||||||
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
||||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||||
@@ -318,6 +308,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Pages\Browser.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Pages\ChannelPage.xaml">
|
<Page Include="Pages\ChannelPage.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -411,7 +405,10 @@
|
|||||||
<Version>1.29.2.1006</Version>
|
<Version>1.29.2.1006</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Advertising.XAML">
|
<PackageReference Include="Microsoft.Advertising.XAML">
|
||||||
<Version>10.1805.7001</Version>
|
<Version>10.1811.22001</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.AppCenter.Analytics">
|
||||||
|
<Version>1.13.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||||
<Version>6.1.9</Version>
|
<Version>6.1.9</Version>
|
||||||
@@ -420,13 +417,13 @@
|
|||||||
<Version>5.0.0</Version>
|
<Version>5.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
|
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
|
||||||
<Version>4.0.0</Version>
|
<Version>5.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="runtime.win10-arm64.runtime.native.System.IO.Compression">
|
<PackageReference Include="runtime.win10-arm64.runtime.native.System.IO.Compression">
|
||||||
<Version>4.3.2</Version>
|
<Version>4.3.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="YoutubeExplode">
|
<PackageReference Include="YoutubeExplode">
|
||||||
<Version>4.6.1</Version>
|
<Version>4.6.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="YoutubeExtractor">
|
<PackageReference Include="YoutubeExtractor">
|
||||||
<Version>0.10.11</Version>
|
<Version>0.10.11</Version>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
|
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
|
||||||
<Identity Name="foxtube-5d1cba1f-d7d5-472b-acb7-beb360bab268" Publisher="CN=Michael Gordeev" Version="0.2.19012.0" />
|
<Identity Name="53949MichaelXFoxGordeev.FoxTube" Publisher="CN=FD7A34DD-FE4D-4D7D-9D33-2DA9EBBE7725" Version="0.3.4.0" />
|
||||||
<mp:PhoneIdentity PhoneProductId="5d1cba1f-d7d5-472b-acb7-beb360bab268" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
<mp:PhoneIdentity PhoneProductId="04fd81c1-6473-4174-afd7-4ac71dd85721" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>FoxTube</DisplayName>
|
<DisplayName>FoxTube</DisplayName>
|
||||||
<PublisherDisplayName>Michael Gordeev</PublisherDisplayName>
|
<PublisherDisplayName>Michael "XFox" Gordeev</PublisherDisplayName>
|
||||||
<Logo>Assets\StoreLogo.png</Logo>
|
<Logo>Assets\StoreLogo.png</Logo>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Dependencies>
|
<Dependencies>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</Resources>
|
</Resources>
|
||||||
<Applications>
|
<Applications>
|
||||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="FoxTube.App" ResourceGroup="foxtube">
|
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="FoxTube.App" ResourceGroup="foxtube">
|
||||||
<uap:VisualElements DisplayName="FoxTube" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="YouTube Client" BackgroundColor="skyBlue">
|
<uap:VisualElements DisplayName="FoxTube" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="YouTube Client for Windows 10" BackgroundColor="skyBlue">
|
||||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="FoxTube" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
|
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="FoxTube" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
|
||||||
<uap:ShowNameOnTiles>
|
<uap:ShowNameOnTiles>
|
||||||
<uap:ShowOn Tile="square150x150Logo" />
|
<uap:ShowOn Tile="square150x150Logo" />
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
</uap:ShowNameOnTiles>
|
</uap:ShowNameOnTiles>
|
||||||
</uap:DefaultTile>
|
</uap:DefaultTile>
|
||||||
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#282828" />
|
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#282828" />
|
||||||
|
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\BadgeLogo.png"/>
|
||||||
</uap:VisualElements>
|
</uap:VisualElements>
|
||||||
<Extensions>
|
<Extensions>
|
||||||
<Extension Category="windows.backgroundTasks" EntryPoint="FoxTube.Background.BackgroundProcessor">
|
<Extension Category="windows.backgroundTasks" EntryPoint="FoxTube.Background.BackgroundProcessor">
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<Page
|
||||||
|
x:Class="FoxTube.Pages.Browser"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:FoxTube.Pages"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:Windows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<AutoSuggestBox Grid.ColumnSpan="2" Text="https://youtube.com/" QueryIcon="Forward" QuerySubmitted="Adress_QuerySubmitted" Name="adress"/>
|
||||||
|
<ScrollViewer Grid.Row="1">
|
||||||
|
<TextBlock TextWrapping="Wrap" Name="code" IsTextSelectionEnabled="True"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
<WebView Name="view" Grid.Row="1" Grid.Column="1"/>
|
||||||
|
</Grid>
|
||||||
|
</Page>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using Google.Apis.Http;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
|
using Windows.Foundation;
|
||||||
|
using Windows.Foundation.Collections;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Controls.Primitives;
|
||||||
|
using Windows.UI.Xaml.Data;
|
||||||
|
using Windows.UI.Xaml.Input;
|
||||||
|
using Windows.UI.Xaml.Media;
|
||||||
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
|
||||||
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
||||||
|
|
||||||
|
namespace FoxTube.Pages
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||||
|
/// </summary>
|
||||||
|
public sealed partial class Browser : Page
|
||||||
|
{
|
||||||
|
public Browser()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async void Initialize()
|
||||||
|
{
|
||||||
|
/*Debug.WriteLine(SecretsVault.Credential.Token.AccessToken);
|
||||||
|
WebClient client = new WebClient();
|
||||||
|
client.Headers.Add(HttpRequestHeader.Cookie, "SID=9wYUCqAm2D7AmC_Vi8uNGjYZAf6Js2hasI1gCEhznMjJbYqnt0J6m1sthArcXG_pMMadnQ.; HSID=AhyajPo6nPBx7VB-0; SSID=AaaOvEW6jZVcc4Asp; APISID=tXeMRBKErzlt6KOo/Aapw7Rv4U_HG1A0CQ; SAPISID=FGp4Ff7MMF8Yq0X4/AOdNjGueWyCkkK7C5; LOGIN_INFO=AFmmF2swRAIgZln6SD5aFUlABb9pBEq9uAwLBISe7sYR1NWVXyaDTY4CIBLo_KAFcoo4wtlW0ZPmJnHaa-xVhsA7MzdGm7-vvgX-:QUQ3MjNmekJTZ3M2dXJNaFh3M3NfTFVDS0RIaUM3WlJNWlRJbk5sZUE1eHR3bHkwckhQeEppazkyekhDb0ljcXpacDdwQXlIanhSbnpSWkUyZVFpdWtiT243Rzhad0N4aGZwUXJDZ1Mxd0tFTS0wVDdudk9xaFJDdTNYUWtnQlE3VXhQdVl5MjB2MGdEdl9keElDaS1yX0tmQWowS041ZWF1VU9tV0c3bTRVbWNGSHFjWHRDVTIw;");*/
|
||||||
|
HttpClient client = new HttpClient();
|
||||||
|
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "BQcUCusfz2zKN_ejHc3Xu15ahz8eEEaKouKJydqBAVKxWxcqfhht1zVux-G9bRf0KSTFBw");
|
||||||
|
/*SecretsVault.Credential.ToString();
|
||||||
|
string url = $"https://www.youtube.com/list_ajax?style=json&action_get_list=1&list=HL&hl=en";
|
||||||
|
string response = client.DownloadString(url.ToUri());
|
||||||
|
HttpClient c = new HttpClient();*/
|
||||||
|
string response = await SecretsVault.Service.HttpClient.GetStringAsync("https://www.youtube.com/list_ajax?style=xml&action_get_list=1&list=HL");
|
||||||
|
//HttpResponseMessage res = await c.GetAsync("");
|
||||||
|
Debug.WriteLine(response);
|
||||||
|
|
||||||
|
/*new Google.Apis.Oauth2.v2.Oauth2Service.Initializer();
|
||||||
|
code.Text = response;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Adress_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
|
||||||
|
{
|
||||||
|
Initialize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Pivot SelectedIndex="0" Name="content" IsHeaderItemsCarouselEnabled="False" SelectionChanged="content_SelectionChanged">
|
<Pivot SelectedIndex="0" Name="content" IsHeaderItemsCarouselEnabled="False" SelectionChanged="Content_SelectionChanged">
|
||||||
<PivotItem x:Uid="/Channel/videos" Header="Videos">
|
<PivotItem x:Uid="/Channel/videos" Header="Videos">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Name="videos">
|
<StackPanel Name="videos">
|
||||||
@@ -39,11 +39,11 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<Grid Visibility="Collapsed" Grid.Column="2" VerticalAlignment="Bottom" Margin="10" Name="subscriptionPane" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Visibility="Collapsed" Grid.Column="2" VerticalAlignment="Bottom" Margin="10" Name="subscriptionPane" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<Button x:Uid="/Cards/subscribe" Click="subscribe_Click" Name="subscribe" Width="250" Height="50" Background="Red" Foreground="White" FontSize="18" FontWeight="SemiBold" Content="Subscirbe"/>
|
<Button x:Uid="/Cards/subscribe" Click="Subscribe_Click" Name="subscribe" Width="250" Height="50" Background="Red" Foreground="White" FontSize="18" FontWeight="SemiBold" Content="Subscirbe"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<pages:VideoGrid/>
|
<pages:VideoGrid/>
|
||||||
<controls:ShowMore Clicked="videoMore_Clicked"/>
|
<controls:ShowMore Clicked="VideoMore_Clicked"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<StackPanel Margin="10" Visibility="Visible">
|
<StackPanel Margin="10" Visibility="Visible">
|
||||||
<TextBlock x:Uid="/Channel/playlistTitle" FontSize="28" Text="Playlists"/>
|
<TextBlock x:Uid="/Channel/playlistTitle" FontSize="28" Text="Playlists"/>
|
||||||
<pages:VideoGrid/>
|
<pages:VideoGrid/>
|
||||||
<controls:ShowMore Clicked="showMorePlaylists_Click"/>
|
<controls:ShowMore Clicked="ShowMorePlaylists_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<local:LoadingPage Visibility="Collapsed"/>
|
<local:LoadingPage Visibility="Collapsed"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -104,9 +104,9 @@
|
|||||||
</Pivot>
|
</Pivot>
|
||||||
|
|
||||||
<CommandBar Grid.Row="1" VerticalAlignment="Bottom" Name="commandBar">
|
<CommandBar Grid.Row="1" VerticalAlignment="Bottom" Name="commandBar">
|
||||||
<AppBarButton x:Uid="/Channel/openWeb" Icon="Globe" Label="Open in browser" Name="inBrowser" Click="inBrowser_Click"/>
|
<AppBarButton x:Uid="/Channel/openWeb" Icon="Globe" Label="Open in browser" Name="inBrowser" Click="InBrowser_Click"/>
|
||||||
<AppBarButton x:Uid="/Channel/refresh" Icon="Refresh" Label="Refresh" Name="refresh" Click="refresh_Click"/>
|
<AppBarButton x:Uid="/Channel/refresh" Icon="Refresh" Label="Refresh" Name="refresh" Click="Refresh_Click"/>
|
||||||
<AppBarButton x:Uid="/Channel/share" Icon="Share" Label="Share" Name="share" Click="share_Click"/>
|
<AppBarButton x:Uid="/Channel/share" Icon="Share" Label="Share" Name="share" Click="Share_Click"/>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
|
|
||||||
<local:LoadingPage Grid.RowSpan="2" Visibility="Collapsed"/>
|
<local:LoadingPage Grid.RowSpan="2" Visibility="Collapsed"/>
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ using Windows.ApplicationModel.DataTransfer;
|
|||||||
using Windows.System;
|
using Windows.System;
|
||||||
using Windows.UI;
|
using Windows.UI;
|
||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
|
using Microsoft.AppCenter.Analytics;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace FoxTube.Pages
|
namespace FoxTube.Pages
|
||||||
{
|
{
|
||||||
@@ -21,14 +23,14 @@ namespace FoxTube.Pages
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class ChannelPage : Page
|
public sealed partial class ChannelPage : Page
|
||||||
{
|
{
|
||||||
ResourceLoader resources = ResourceLoader.GetForCurrentView("Cards");
|
readonly ResourceLoader resources = ResourceLoader.GetForCurrentView("Cards");
|
||||||
|
|
||||||
public string channelId;
|
public string channelId;
|
||||||
public Channel item;
|
public Channel item;
|
||||||
|
|
||||||
LoadingPage loading, playlistLoading;
|
readonly LoadingPage loading, playlistLoading;
|
||||||
VideoGrid videoList, playlistList;
|
readonly VideoGrid videoList, playlistList;
|
||||||
ShowMore videoMore, playlistMore;
|
readonly ShowMore videoMore, playlistMore;
|
||||||
|
|
||||||
SearchResource.ListRequest videoRequest, playlistRequest;
|
SearchResource.ListRequest videoRequest, playlistRequest;
|
||||||
|
|
||||||
@@ -48,7 +50,7 @@ namespace FoxTube.Pages
|
|||||||
videoMore = videos.Children[3] as ShowMore;
|
videoMore = videos.Children[3] as ShowMore;
|
||||||
playlistMore = (playlists.Children[0] as StackPanel).Children[2] as ShowMore;
|
playlistMore = (playlists.Children[0] as StackPanel).Children[2] as ShowMore;
|
||||||
|
|
||||||
loading.RefreshPage += refresh_Click;
|
loading.RefreshPage += Refresh_Click;
|
||||||
DataTransferManager.GetForCurrentView().DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(Share);
|
DataTransferManager.GetForCurrentView().DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(Share);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +73,7 @@ namespace FoxTube.Pages
|
|||||||
{
|
{
|
||||||
channelId = id;
|
channelId = id;
|
||||||
if (Methods.NeedToResponse)
|
if (Methods.NeedToResponse)
|
||||||
Methods.MainPage.content_Navigated(this, null);
|
Methods.MainPage.Content_Navigated(this, null);
|
||||||
|
|
||||||
ChannelsResource.ListRequest request = SecretsVault.Service.Channels.List("snippet,statistics,brandingSettings");
|
ChannelsResource.ListRequest request = SecretsVault.Service.Channels.List("snippet,statistics,brandingSettings");
|
||||||
request.Id = id;
|
request.Id = id;
|
||||||
@@ -138,6 +140,12 @@ namespace FoxTube.Pages
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
loading.Error(e.GetType().ToString(), e.Message);
|
loading.Error(e.GetType().ToString(), e.Message);
|
||||||
|
Analytics.TrackEvent("Channel loading error", new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "Exception", e.GetType().ToString() },
|
||||||
|
{ "Message", e.Message },
|
||||||
|
{ "Channel ID", channelId }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +175,7 @@ namespace FoxTube.Pages
|
|||||||
else
|
else
|
||||||
playlistMore.Visibility = Visibility.Collapsed;
|
playlistMore.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
playlistLoaded = true;
|
||||||
playlistLoading.Close();
|
playlistLoading.Close();
|
||||||
}
|
}
|
||||||
catch (System.Net.Http.HttpRequestException)
|
catch (System.Net.Http.HttpRequestException)
|
||||||
@@ -179,13 +188,13 @@ namespace FoxTube.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void content_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Content_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (content.SelectedIndex == 1 && !playlistLoaded)
|
if (content.SelectedIndex == 1 && !playlistLoaded)
|
||||||
LoadPlaylist();
|
LoadPlaylist();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void showMorePlaylists_Click()
|
private async void ShowMorePlaylists_Click()
|
||||||
{
|
{
|
||||||
playlistRequest.PageToken = playlistToken;
|
playlistRequest.PageToken = playlistToken;
|
||||||
SearchListResponse response = await playlistRequest.ExecuteAsync();
|
SearchListResponse response = await playlistRequest.ExecuteAsync();
|
||||||
@@ -205,7 +214,7 @@ namespace FoxTube.Pages
|
|||||||
playlistMore.Complete(true);
|
playlistMore.Complete(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void videoMore_Clicked()
|
private async void VideoMore_Clicked()
|
||||||
{
|
{
|
||||||
videoRequest.PageToken = videoToken;
|
videoRequest.PageToken = videoToken;
|
||||||
SearchListResponse response = await videoRequest.ExecuteAsync();
|
SearchListResponse response = await videoRequest.ExecuteAsync();
|
||||||
@@ -225,7 +234,7 @@ namespace FoxTube.Pages
|
|||||||
videoMore.Complete(true);
|
videoMore.Complete(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void subscribe_Click(object sender, RoutedEventArgs e)
|
private async void Subscribe_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if(await SecretsVault.ChangeSubscriptionState(channelId))
|
if(await SecretsVault.ChangeSubscriptionState(channelId))
|
||||||
{
|
{
|
||||||
@@ -265,12 +274,12 @@ namespace FoxTube.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refresh_Click(object sender, RoutedEventArgs e)
|
private void Refresh_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Methods.MainPage.GoToChannel(channelId);
|
Methods.MainPage.GoToChannel(channelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void inBrowser_Click(object sender, RoutedEventArgs e)
|
private async void InBrowser_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(item.Snippet.CustomUrl))
|
if (!string.IsNullOrWhiteSpace(item.Snippet.CustomUrl))
|
||||||
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/user/{item.Snippet.CustomUrl}"));
|
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/user/{item.Snippet.CustomUrl}"));
|
||||||
@@ -278,7 +287,7 @@ namespace FoxTube.Pages
|
|||||||
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/channel/{item.Id}"));
|
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/channel/{item.Id}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void share_Click(object sender, RoutedEventArgs e)
|
private void Share_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
DataTransferManager.ShowShareUI();
|
DataTransferManager.ShowShareUI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
x:Class="FoxTube.Pages.Downloads"
|
x:Class="FoxTube.Pages.Downloads"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube.Pages"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="using:FoxTube.Controls"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,13 @@
|
|||||||
using FoxTube.Controls;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.Storage.Pickers;
|
|
||||||
using Windows.System;
|
using Windows.System;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube.Pages
|
namespace FoxTube.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// Downloads page
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Downloads : Page
|
public sealed partial class Downloads : Page
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:local="using:FoxTube.Pages"
|
xmlns:local="using:FoxTube.Pages"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="using:FoxTube.Controls"
|
|
||||||
xmlns:foxtube="using:FoxTube"
|
xmlns:foxtube="using:FoxTube"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
using FoxTube.Controls;
|
using System;
|
||||||
using System;
|
|
||||||
using Windows.System;
|
using Windows.System;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube.Pages
|
namespace FoxTube.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// YouTube history page
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class History : Page
|
public sealed partial class History : Page
|
||||||
{
|
{
|
||||||
@@ -34,7 +31,7 @@ namespace FoxTube.Pages
|
|||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
loading.Refresh();
|
loading.Refresh();
|
||||||
|
|
||||||
loading.Close();
|
loading.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
using Windows.Storage;
|
|
||||||
using FoxTube.Controls;
|
using FoxTube.Controls;
|
||||||
using FoxTube.Pages;
|
using FoxTube.Pages;
|
||||||
using System.Globalization;
|
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
@@ -17,6 +14,7 @@ namespace FoxTube
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Home : Page
|
public sealed partial class Home : Page
|
||||||
{
|
{
|
||||||
|
// TODO: Refactor home page
|
||||||
private bool trendLoaded = false;
|
private bool trendLoaded = false;
|
||||||
|
|
||||||
VideoGrid trendGrid;
|
VideoGrid trendGrid;
|
||||||
@@ -75,9 +73,9 @@ namespace FoxTube
|
|||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
if(SecretsVault.IsAuthorized)
|
/*if(SecretsVault.IsAuthorized)
|
||||||
LoadRecommendations();
|
LoadRecommendations();
|
||||||
else
|
else*/
|
||||||
{
|
{
|
||||||
pivot.Items.Remove(recommended);
|
pivot.Items.Remove(recommended);
|
||||||
pivot.Items.Remove(subscriptions);
|
pivot.Items.Remove(subscriptions);
|
||||||
|
|||||||
+11
-10
@@ -10,7 +10,7 @@
|
|||||||
PreviewKeyUp="Page_PreviewKeyUp">
|
PreviewKeyUp="Page_PreviewKeyUp">
|
||||||
|
|
||||||
<Grid Name="grid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Name="grid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<NavigationView Header="Home" SelectedItem="toHome" Windows10version1803:BackRequested="nav_BackRequested" Windows10version1803:PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" SelectionChanged="nav_SelectionChanged">
|
<NavigationView Header="Home" SelectedItem="toHome" Windows10version1803:BackRequested="Nav_BackRequested" Windows10version1803:PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" SelectionChanged="Nav_SelectionChanged">
|
||||||
|
|
||||||
<NavigationView.MenuItems>
|
<NavigationView.MenuItems>
|
||||||
<NavigationViewItem x:Uid="/Main/home" Icon="Home" Content="Home" Name="toHome"/>
|
<NavigationViewItem x:Uid="/Main/home" Icon="Home" Content="Home" Name="toHome"/>
|
||||||
@@ -30,7 +30,8 @@
|
|||||||
|
|
||||||
<NavigationView.PaneFooter>
|
<NavigationView.PaneFooter>
|
||||||
<NavigationViewList>
|
<NavigationViewList>
|
||||||
<NavigationViewItem x:Uid="/Main/feedback" Name="feedback" Content="Give a feedback" Tapped="feedback_Click">
|
<NavigationViewItem Name="openWeb" Tapped="Web_Tapped" Icon="Globe" Content="Browser" Visibility="Collapsed"/>
|
||||||
|
<NavigationViewItem x:Uid="/Main/feedback" Name="feedback" Content="Give a feedback" Tapped="Feedback_Click">
|
||||||
<NavigationViewItem.Icon>
|
<NavigationViewItem.Icon>
|
||||||
<FontIcon Glyph=""/>
|
<FontIcon Glyph=""/>
|
||||||
</NavigationViewItem.Icon>
|
</NavigationViewItem.Icon>
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
</NavigationViewItem.Icon>
|
</NavigationViewItem.Icon>
|
||||||
</NavigationViewItem>
|
</NavigationViewItem>
|
||||||
|
|
||||||
<NavigationViewItem Name="account" Tapped="openContext">
|
<NavigationViewItem Name="account" Tapped="OpenContext">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<FontIcon Glyph="" FontSize="16" Margin="0,0,16,0"/>
|
<FontIcon Glyph="" FontSize="16" Margin="0,0,16,0"/>
|
||||||
<TextBlock x:Uid="/Main/signIn" Text="Add account"/>
|
<TextBlock x:Uid="/Main/signIn" Text="Add account"/>
|
||||||
@@ -50,13 +51,13 @@
|
|||||||
|
|
||||||
<NavigationViewItem.ContextFlyout>
|
<NavigationViewItem.ContextFlyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
<MenuFlyoutItem x:Uid="/Main/signEx" Text="Sign in with existing account" Name="signIn" Click="signIn_Click"/>
|
<MenuFlyoutItem x:Uid="/Main/signEx" Text="Sign in with existing account" Name="signIn" Click="SignIn_Click"/>
|
||||||
<MenuFlyoutItem x:Uid="/Main/signNew" Text="Create new Google account" Name="createAccount" Click="createAccount_Click"/>
|
<MenuFlyoutItem x:Uid="/Main/signNew" Text="Create new Google account" Name="createAccount" Click="CreateAccount_Click"/>
|
||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</NavigationViewItem.ContextFlyout>
|
</NavigationViewItem.ContextFlyout>
|
||||||
</NavigationViewItem>
|
</NavigationViewItem>
|
||||||
|
|
||||||
<NavigationViewItem Visibility="Collapsed" Name="avatar" Tapped="openContext" Padding="-5">
|
<NavigationViewItem Visibility="Collapsed" Name="avatar" Tapped="OpenContext" Padding="-5">
|
||||||
<StackPanel Orientation="Horizontal" Padding="5">
|
<StackPanel Orientation="Horizontal" Padding="5">
|
||||||
<PersonPicture Height="20" Margin="-5,0,15,0"/>
|
<PersonPicture Height="20" Margin="-5,0,15,0"/>
|
||||||
<TextBlock Name="myName" Text="My account"/>
|
<TextBlock Name="myName" Text="My account"/>
|
||||||
@@ -64,9 +65,9 @@
|
|||||||
|
|
||||||
<NavigationViewItem.ContextFlyout>
|
<NavigationViewItem.ContextFlyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
<MenuFlyoutItem x:Uid="/Main/myChannelContext" Text="My channel" Name="myChannel" Click="myChannel_Click"/>
|
<MenuFlyoutItem x:Uid="/Main/myChannelContext" Text="My channel" Name="myChannel" Click="MyChannel_Click"/>
|
||||||
<MenuFlyoutSeparator/>
|
<MenuFlyoutSeparator/>
|
||||||
<MenuFlyoutItem x:Uid="/Main/signOut" Text="Log out" Name="logout" Click="logout_Click"/>
|
<MenuFlyoutItem x:Uid="/Main/signOut" Text="Log out" Name="logout" Click="Logout_Click"/>
|
||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</NavigationViewItem.ContextFlyout>
|
</NavigationViewItem.ContextFlyout>
|
||||||
</NavigationViewItem>
|
</NavigationViewItem>
|
||||||
@@ -74,11 +75,11 @@
|
|||||||
</NavigationView.PaneFooter>
|
</NavigationView.PaneFooter>
|
||||||
|
|
||||||
<NavigationView.AutoSuggestBox>
|
<NavigationView.AutoSuggestBox>
|
||||||
<AutoSuggestBox x:Name="search" QueryIcon="Find" QuerySubmitted="search_QuerySubmitted" TextChanged="search_TextChanged" x:Uid="/Main/searchPlaceholder" PlaceholderText="Search"/>
|
<AutoSuggestBox x:Name="search" QueryIcon="Find" QuerySubmitted="Search_QuerySubmitted" TextChanged="Search_TextChanged" x:Uid="/Main/searchPlaceholder" PlaceholderText="Search"/>
|
||||||
</NavigationView.AutoSuggestBox>
|
</NavigationView.AutoSuggestBox>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Frame Name="content" Navigated="content_Navigated"/>
|
<Frame Name="content" Navigated="Content_Navigated"/>
|
||||||
<Frame Name="videoPlaceholder"/>
|
<Frame Name="videoPlaceholder"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,10 @@ namespace FoxTube
|
|||||||
/// Main app's layout
|
/// Main app's layout
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class MainPage : Page
|
public sealed partial class MainPage : Page
|
||||||
{
|
{
|
||||||
|
// TODO: Refactor main page
|
||||||
Sender s = Sender.None;
|
Sender s = Sender.None;
|
||||||
ResourceLoader resources = ResourceLoader.GetForCurrentView("Main");
|
readonly ResourceLoader resources = ResourceLoader.GetForCurrentView("Main");
|
||||||
public MainPage()
|
public MainPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -185,9 +186,9 @@ namespace FoxTube
|
|||||||
toChannel.Visibility = Visibility.Visible;
|
toChannel.Visibility = Visibility.Visible;
|
||||||
toSubscriptions.Visibility = Visibility.Visible;
|
toSubscriptions.Visibility = Visibility.Visible;
|
||||||
libHeader.Visibility = Visibility.Visible;
|
libHeader.Visibility = Visibility.Visible;
|
||||||
toHistory.Visibility = Visibility.Visible;
|
//toHistory.Visibility = Visibility.Visible;
|
||||||
toLiked.Visibility = Visibility.Visible;
|
toLiked.Visibility = Visibility.Visible;
|
||||||
toLater.Visibility = Visibility.Visible;
|
//toLater.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
if (SecretsVault.Subscriptions.Count > 0)
|
if (SecretsVault.Subscriptions.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -229,9 +230,9 @@ namespace FoxTube
|
|||||||
toChannel.Visibility = Visibility.Collapsed;
|
toChannel.Visibility = Visibility.Collapsed;
|
||||||
toSubscriptions.Visibility = Visibility.Collapsed;
|
toSubscriptions.Visibility = Visibility.Collapsed;
|
||||||
libHeader.Visibility = Visibility.Collapsed;
|
libHeader.Visibility = Visibility.Collapsed;
|
||||||
toHistory.Visibility = Visibility.Collapsed;
|
//toHistory.Visibility = Visibility.Collapsed;
|
||||||
toLiked.Visibility = Visibility.Collapsed;
|
toLiked.Visibility = Visibility.Collapsed;
|
||||||
toLater.Visibility = Visibility.Collapsed;
|
//toLater.Visibility = Visibility.Collapsed;
|
||||||
subsHeader.Visibility = Visibility.Collapsed;
|
subsHeader.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
subsHeader.Visibility = Visibility.Collapsed;
|
subsHeader.Visibility = Visibility.Collapsed;
|
||||||
@@ -264,27 +265,27 @@ namespace FoxTube
|
|||||||
GoToVideo((videoPlaceholder.Content as VideoPage).videoId);
|
GoToVideo((videoPlaceholder.Content as VideoPage).videoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void feedback_Click(object sender, TappedRoutedEventArgs e)
|
private async void Feedback_Click(object sender, TappedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
await Launcher.LaunchUriAsync(new Uri("feedback-hub:"));
|
await Launcher.LaunchUriAsync(new Uri("feedback-hub:"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void createAccount_Click(object sender, RoutedEventArgs e)
|
private async void CreateAccount_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
await Launcher.LaunchUriAsync(new Uri("https://accounts.google.com/signup/v2/webcreateaccount?ManageAccount&flowName=GlifWebSignIn&flowEntry=SignUp"));
|
await Launcher.LaunchUriAsync(new Uri("https://accounts.google.com/signup/v2/webcreateaccount?ManageAccount&flowName=GlifWebSignIn&flowEntry=SignUp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void signIn_Click(object sender, RoutedEventArgs e)
|
private void SignIn_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SecretsVault.Authorize();
|
SecretsVault.Authorize();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void myChannel_Click(object sender, RoutedEventArgs e)
|
private void MyChannel_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
GoToChannel(SecretsVault.AccountId);
|
GoToChannel(SecretsVault.AccountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logout_Click(object sender, RoutedEventArgs e)
|
private void Logout_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
SecretsVault.Deauthenticate();
|
SecretsVault.Deauthenticate();
|
||||||
}
|
}
|
||||||
@@ -512,13 +513,13 @@ namespace FoxTube
|
|||||||
nav.IsBackEnabled = false;
|
nav.IsBackEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
|
private void Search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(search.Text))
|
if(!string.IsNullOrWhiteSpace(search.Text))
|
||||||
GoToSearch(new SearchParameters(search.Text));
|
GoToSearch(new SearchParameters(search.Text));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void search_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
|
private void Search_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
|
||||||
{
|
{
|
||||||
if (search.Text.Length > 2 && args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
|
if (search.Text.Length > 2 && args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
|
||||||
{
|
{
|
||||||
@@ -541,7 +542,7 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
private void Nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.WriteLine("Menu selection changed");
|
Debug.WriteLine("Menu selection changed");
|
||||||
try
|
try
|
||||||
@@ -577,7 +578,7 @@ namespace FoxTube
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void content_Navigated(object sender, NavigationEventArgs e)
|
public void Content_Navigated(object sender, NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
Dictionary<Type, Action> switchCase = new Dictionary<Type, Action>()
|
Dictionary<Type, Action> switchCase = new Dictionary<Type, Action>()
|
||||||
{
|
{
|
||||||
@@ -735,7 +736,7 @@ namespace FoxTube
|
|||||||
MinimizeAsInitializer();
|
MinimizeAsInitializer();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nav_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
|
private void Nav_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
|
||||||
{
|
{
|
||||||
if (videoPlaceholder.Content != null)
|
if (videoPlaceholder.Content != null)
|
||||||
{
|
{
|
||||||
@@ -757,7 +758,7 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openContext(object sender, TappedRoutedEventArgs e)
|
private void OpenContext(object sender, TappedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
((NavigationViewItem)sender).ContextFlyout.ShowAt((NavigationViewItem)sender);
|
((NavigationViewItem)sender).ContextFlyout.ShowAt((NavigationViewItem)sender);
|
||||||
}
|
}
|
||||||
@@ -766,5 +767,10 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
SecretsVault.GetAdblock();
|
SecretsVault.GetAdblock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Web_Tapped(object sender, TappedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.Navigate(typeof(Browser));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:foxtube="using:FoxTube"
|
xmlns:foxtube="using:FoxTube"
|
||||||
xmlns:ui="using:Microsoft.Advertising.WinRT.UI"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@
|
|||||||
|
|
||||||
<CommandBar Grid.Row="2" Grid.ColumnSpan="2">
|
<CommandBar Grid.Row="2" Grid.ColumnSpan="2">
|
||||||
<AppBarButton x:Uid="/Playlist/openWeb" Icon="Globe" Label="Open in browser" Name="inBrowser" Click="inBrowser_Click"/>
|
<AppBarButton x:Uid="/Playlist/openWeb" Icon="Globe" Label="Open in browser" Name="inBrowser" Click="inBrowser_Click"/>
|
||||||
<AppBarButton x:Uid="/Playlist/addTo" Icon="Add" Label="Add to" IsEnabled="False">
|
<AppBarButton x:Uid="/Playlist/addTo" Icon="Add" Label="Add to" IsEnabled="False" Visibility="Collapsed">
|
||||||
<AppBarButton.Flyout>
|
<AppBarButton.Flyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using FoxTube.Controls;
|
using FoxTube.Controls;
|
||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
|
using Microsoft.AppCenter.Analytics;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
@@ -50,7 +52,7 @@ namespace FoxTube.Pages
|
|||||||
{
|
{
|
||||||
playlistId = id;
|
playlistId = id;
|
||||||
if (Methods.NeedToResponse)
|
if (Methods.NeedToResponse)
|
||||||
Methods.MainPage.content_Navigated(this, null);
|
Methods.MainPage.Content_Navigated(this, null);
|
||||||
|
|
||||||
PlaylistsResource.ListRequest request = SecretsVault.Service.Playlists.List("snippet,contentDetails");
|
PlaylistsResource.ListRequest request = SecretsVault.Service.Playlists.List("snippet,contentDetails");
|
||||||
request.Id = id;
|
request.Id = id;
|
||||||
@@ -98,9 +100,15 @@ namespace FoxTube.Pages
|
|||||||
{
|
{
|
||||||
loading.Error("System.Net.Http.HttpRequestException", "Unable to connect to Google servers.", true);
|
loading.Error("System.Net.Http.HttpRequestException", "Unable to connect to Google servers.", true);
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
loading.Error();
|
loading.Error(e.GetType().ToString(), e.Message);
|
||||||
|
Analytics.TrackEvent("Playlist loading error", new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "Exception", e.GetType().ToString() },
|
||||||
|
{ "Message", e.Message },
|
||||||
|
{ "Playlist ID", playlistId }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<TextBlock Name="searchTerm" Text="Search results for: [searchTerm]" FontSize="28"/>
|
<TextBlock Name="searchTerm" Text="Search results for: [searchTerm]" FontSize="28"/>
|
||||||
<TextBlock Name="resultsCount" Text="Found: [resultCount] item(s)" FontSize="14" Foreground="Gray"/>
|
<TextBlock Name="resultsCount" Text="Found: [resultCount] item(s)" FontSize="14" Foreground="Gray"/>
|
||||||
|
|
||||||
<HyperlinkButton x:Uid="/Search/filters" Name="toggleFilters" Click="toggleFilters_Click" Content="Show filters " FontFamily="Default, Segoe MDL2 Assets" Visibility="Visible"/>
|
<HyperlinkButton x:Uid="/Search/filters" Name="toggleFilters" Click="ToggleFilters_Click" Content="Show filters " FontFamily="Default, Segoe MDL2 Assets" Visibility="Visible"/>
|
||||||
<StackPanel Name="filters" Visibility="Collapsed">
|
<StackPanel Name="filters" Visibility="Collapsed">
|
||||||
<GridView Padding="5" SelectionMode="None">
|
<GridView Padding="5" SelectionMode="None">
|
||||||
<ComboBox x:Uid="/Search/order" Name="order" Header="Sort by" Width="150" SelectedIndex="0">
|
<ComboBox x:Uid="/Search/order" Name="order" Header="Sort by" Width="150" SelectedIndex="0">
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<ComboBoxItem x:Uid="/Search/rating" Content="Rating"/>
|
<ComboBoxItem x:Uid="/Search/rating" Content="Rating"/>
|
||||||
<ComboBoxItem x:Uid="/Search/title" Content="Title"/>
|
<ComboBoxItem x:Uid="/Search/title" Content="Title"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ComboBox x:Uid="/Search/type" Name="type" Header="Type" Width="150" SelectedIndex="0" SelectionChanged="type_SelectionChanged">
|
<ComboBox x:Uid="/Search/type" Name="type" Header="Type" Width="150" SelectedIndex="0" SelectionChanged="Type_SelectionChanged">
|
||||||
<ComboBoxItem x:Uid="/Search/all" Content="All"/>
|
<ComboBoxItem x:Uid="/Search/all" Content="All"/>
|
||||||
<ComboBoxItem x:Uid="/Search/video" Content="Video"/>
|
<ComboBoxItem x:Uid="/Search/video" Content="Video"/>
|
||||||
<ComboBoxItem x:Uid="/Search/channel" Content="Channel"/>
|
<ComboBoxItem x:Uid="/Search/channel" Content="Channel"/>
|
||||||
@@ -64,16 +64,16 @@
|
|||||||
</Flyout>
|
</Flyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Uid="/Search/apply" Content="Apply" Margin="10,0,0,10" Name="apply" Click="apply_Click"/>
|
<Button x:Uid="/Search/apply" Content="Apply" Margin="10,0,0,10" Name="apply" Click="Apply_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<pages:VideoGrid/>
|
<pages:VideoGrid/>
|
||||||
<controls:ShowMore Clicked="more_Clicked"/>
|
<controls:ShowMore Clicked="More_Clicked"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
<CommandBar Grid.Row="1" DefaultLabelPosition="Right">
|
<CommandBar Grid.Row="1" DefaultLabelPosition="Right">
|
||||||
<AppBarButton Label="Open in browser" Icon="Globe" Name="inBrowser" Click="inBrowser_Click"/>
|
<AppBarButton Label="Open in browser" Icon="Globe" Name="inBrowser" Click="InBrowser_Click"/>
|
||||||
<AppBarButton Label="Refresh" Icon="Refresh" Click="AppBarButton_Click"/>
|
<AppBarButton Label="Refresh" Icon="Refresh" Click="AppBarButton_Click"/>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using FoxTube.Pages;
|
|||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
using System;
|
using System;
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
@@ -17,16 +16,15 @@ namespace FoxTube
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Search : Page
|
public sealed partial class Search : Page
|
||||||
{
|
{
|
||||||
ResourceLoader resources = ResourceLoader.GetForCurrentView("Search");
|
readonly ResourceLoader resources = ResourceLoader.GetForCurrentView("Search");
|
||||||
|
|
||||||
public SearchParameters Parameters;
|
public SearchParameters Parameters;
|
||||||
SearchResource.ListRequest request;
|
SearchResource.ListRequest request;
|
||||||
string nextToken;
|
string nextToken;
|
||||||
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
|
||||||
|
|
||||||
VideoGrid list;
|
readonly VideoGrid list;
|
||||||
LoadingPage loading;
|
readonly LoadingPage loading;
|
||||||
ShowMore more;
|
readonly ShowMore more;
|
||||||
|
|
||||||
public Search()
|
public Search()
|
||||||
{
|
{
|
||||||
@@ -155,7 +153,7 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleFilters_Click(object sender, RoutedEventArgs e)
|
private void ToggleFilters_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if(filters.Visibility == Visibility.Collapsed)
|
if(filters.Visibility == Visibility.Collapsed)
|
||||||
{
|
{
|
||||||
@@ -174,7 +172,7 @@ namespace FoxTube
|
|||||||
Methods.MainPage.GoToSearch(Parameters);
|
Methods.MainPage.GoToSearch(Parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void more_Clicked()
|
private async void More_Clicked()
|
||||||
{
|
{
|
||||||
request.PageToken = nextToken;
|
request.PageToken = nextToken;
|
||||||
SearchListResponse response = await request.ExecuteAsync();
|
SearchListResponse response = await request.ExecuteAsync();
|
||||||
@@ -190,7 +188,7 @@ namespace FoxTube
|
|||||||
more.Complete(true);
|
more.Complete(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void type_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Type_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -210,12 +208,12 @@ namespace FoxTube
|
|||||||
catch (NullReferenceException) { }
|
catch (NullReferenceException) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void inBrowser_Click(object sender, RoutedEventArgs e)
|
private async void InBrowser_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/results?search_query={searchTerm}"));
|
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/results?search_query={searchTerm}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void apply_Click(object sender, RoutedEventArgs e)
|
private void Apply_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Parameters.Filter.HD = features.SelectedItems.Contains(features.Items[0]);
|
Parameters.Filter.HD = features.SelectedItems.Contains(features.Items[0]);
|
||||||
Parameters.Filter.Is3D = features.SelectedItems.Contains(features.Items[1]);
|
Parameters.Filter.Is3D = features.SelectedItems.Contains(features.Items[1]);
|
||||||
|
|||||||
@@ -2,15 +2,13 @@
|
|||||||
x:Class="FoxTube.Settings"
|
x:Class="FoxTube.Settings"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pages="using:FoxTube.Pages"
|
|
||||||
xmlns:settingspages="using:FoxTube.Pages.SettingsPages"
|
xmlns:settingspages="using:FoxTube.Pages.SettingsPages"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<Pivot SelectedIndex="0" Name="pivot" IsHeaderItemsCarouselEnabled="False" SelectionChanged="pivot_SelectionChanged">
|
<Pivot SelectedIndex="0" Name="pivot" IsHeaderItemsCarouselEnabled="False" SelectionChanged="Pivot_SelectionChanged">
|
||||||
<PivotItem Header="General" x:Uid="/Settings/general">
|
<PivotItem Header="General" x:Uid="/Settings/general">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<settingspages:General/>
|
<settingspages:General/>
|
||||||
@@ -21,11 +19,6 @@
|
|||||||
<settingspages:About/>
|
<settingspages:About/>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<!--<PivotItem Header="Help us translate this app" x:Uid="/Settings/helpTranslate">
|
|
||||||
<ScrollViewer>
|
|
||||||
<settingspages:Translate/>
|
|
||||||
</ScrollViewer>
|
|
||||||
</PivotItem>-->
|
|
||||||
<PivotItem Header="Inbox" x:Uid="/Settings/inbox">
|
<PivotItem Header="Inbox" x:Uid="/Settings/inbox">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<settingspages:Inbox/>
|
<settingspages:Inbox/>
|
||||||
|
|||||||
@@ -1,29 +1,11 @@
|
|||||||
using System;
|
using Windows.UI.Xaml.Controls;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using Windows.ApplicationModel;
|
|
||||||
using System.Globalization;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.UI.Text;
|
|
||||||
using Windows.UI.Xaml;
|
|
||||||
using Windows.UI.Xaml.Controls;
|
|
||||||
using Windows.UI.Xaml.Controls.Primitives;
|
|
||||||
using Windows.UI.Xaml.Data;
|
|
||||||
using Windows.UI.Xaml.Input;
|
|
||||||
using Windows.UI.Xaml.Media;
|
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
using FoxTube.Pages.SettingsPages;
|
using FoxTube.Pages.SettingsPages;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// Settings tabs placeholder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Settings : Page
|
public sealed partial class Settings : Page
|
||||||
{
|
{
|
||||||
@@ -31,7 +13,7 @@ namespace FoxTube
|
|||||||
string inboxId = null;
|
string inboxId = null;
|
||||||
public Settings()
|
public Settings()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
@@ -45,20 +27,12 @@ namespace FoxTube
|
|||||||
inboxId = e.Parameter as string;
|
inboxId = e.Parameter as string;
|
||||||
pivot.SelectedIndex = 2;
|
pivot.SelectedIndex = 2;
|
||||||
}
|
}
|
||||||
else
|
else if ((e.Parameter as string) == "about")
|
||||||
switch(e.Parameter as string)
|
pivot.SelectedIndex = 1;
|
||||||
{
|
|
||||||
case "about":
|
|
||||||
pivot.SelectedIndex = 1;
|
|
||||||
break;
|
|
||||||
/*case "translate":
|
|
||||||
pivot.SelectedIndex = 3;
|
|
||||||
break;*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (pivot.SelectedIndex == 2 && !inboxLoaded)
|
if (pivot.SelectedIndex == 2 && !inboxLoaded)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="FoxTube.Pages.SettingsPages.About"
|
x:Class="FoxTube.Pages.SettingsPages.About"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube.Pages.SettingsPages"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
<TextBlock x:Uid="/About/contacts" Text="Contacts" FontSize="22" FontWeight="SemiBold"/>
|
<TextBlock x:Uid="/About/contacts" Text="Contacts" FontSize="22" FontWeight="SemiBold"/>
|
||||||
<TextBlock><Run x:Uid="/About/twitter">Twitter:</Run> <Hyperlink NavigateUri="https://twitter.com/XFox_Mike">@XFox_Mike</Hyperlink></TextBlock>
|
<TextBlock><Run x:Uid="/About/twitter">Twitter:</Run> <Hyperlink NavigateUri="https://twitter.com/XFox_Mike">@XFox_Mike</Hyperlink></TextBlock>
|
||||||
<TextBlock><Run x:Uid="/About/vk">Vkontakte:</Run> <Hyperlink NavigateUri="https://vk.com/XFox.Mike">@XFox.Mike</Hyperlink></TextBlock>
|
<TextBlock><Run x:Uid="/About/vk">Vkontakte:</Run> <Hyperlink NavigateUri="https://vk.com/XFox.Mike">@XFox.Mike</Hyperlink></TextBlock>
|
||||||
<TextBlock>YouTube: <Hyperlink NavigateUri="https://youtube.com/c/FoxGameStudioChannel">@FoxGameStudioChannel</Hyperlink></TextBlock>
|
<TextBlock Visibility="Collapsed">YouTube: <Hyperlink NavigateUri="https://youtube.com/c/FoxGameStudioChannel">@FoxGameStudioChannel</Hyperlink></TextBlock>
|
||||||
<TextBlock>E-mail: <Hyperlink NavigateUri="mailto:michael.xfox@outlook.com">michael.xfox@outlook.com</Hyperlink></TextBlock>
|
<TextBlock>E-mail: <Hyperlink NavigateUri="mailto:michael.xfox@outlook.com">michael.xfox@outlook.com</Hyperlink></TextBlock>
|
||||||
<TextBlock Visibility="Collapsed" Margin="0,0,0,10"> <Run x:Uid="/About/myBlog">My blog (Russian language only):</Run> <Hyperlink NavigateUri="https://michael-xfox.com">https://michael-xfox.com</Hyperlink></TextBlock>
|
<TextBlock Visibility="Collapsed" Margin="0,0,0,10"> <Run x:Uid="/About/myBlog">My blog (Russian language only):</Run> <Hyperlink NavigateUri="https://michael-xfox.com">https://michael-xfox.com</Hyperlink></TextBlock>
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Controls.Primitives;
|
|
||||||
using Windows.UI.Xaml.Data;
|
|
||||||
using Windows.UI.Xaml.Input;
|
|
||||||
using Windows.UI.Xaml.Media;
|
|
||||||
using Windows.UI.Xaml.Navigation;
|
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube.Pages.SettingsPages
|
namespace FoxTube.Pages.SettingsPages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// Page with general information about the app
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class About : Page
|
public sealed partial class About : Page
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="FoxTube.Pages.SettingsPages.General"
|
x:Class="FoxTube.Pages.SettingsPages.General"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube.Pages.SettingsPages"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="FoxTube.Pages.SettingsPages.Inbox"
|
x:Class="FoxTube.Pages.SettingsPages.Inbox"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube.Pages"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||||
@@ -101,7 +100,7 @@
|
|||||||
<Grid Grid.Column="1" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Name="block">
|
<Grid Grid.Column="1" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Name="block">
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="70" Foreground="Gray" Margin="10"/>
|
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="70" Foreground="Gray" Margin="10"/>
|
||||||
<TextBlock x:Uid="/Inbox/select" Text="Select item from list" FontSize="30" VerticalAlignment="Center" Foreground="Gray"/>
|
<TextBlock x:Uid="/Inbox/select" Text="Select item from list" FontSize="30" VerticalAlignment="Center" TextWrapping="WrapWholeWords" Foreground="Gray"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="FoxTube.Pages.Subscriptions"
|
x:Class="FoxTube.Pages.Subscriptions"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube.Pages"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:foxtube="using:FoxTube"
|
xmlns:foxtube="using:FoxTube"
|
||||||
|
|||||||
@@ -1,32 +1,19 @@
|
|||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Controls.Primitives;
|
|
||||||
using Windows.UI.Xaml.Data;
|
|
||||||
using Windows.UI.Xaml.Input;
|
|
||||||
using Windows.UI.Xaml.Media;
|
|
||||||
using Windows.UI.Xaml.Navigation;
|
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube.Pages
|
namespace FoxTube.Pages
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// User's subscriptions page
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Subscriptions : Page
|
public sealed partial class Subscriptions : Page
|
||||||
{
|
{
|
||||||
List<Subscription> list = SecretsVault.Subscriptions;
|
readonly List<Subscription> list = SecretsVault.Subscriptions;
|
||||||
public Subscriptions()
|
public Subscriptions()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e)
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="FoxTube.Pages.VideoGrid"
|
x:Class="FoxTube.Pages.VideoGrid"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using FoxTube.Controls.Adverts;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml;
|
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Navigation;
|
|
||||||
|
|
||||||
namespace FoxTube.Pages
|
namespace FoxTube.Pages
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
<MenuFlyout x:Name="downloadSelector"/>
|
<MenuFlyout x:Name="downloadSelector"/>
|
||||||
</AppBarButton.Flyout>
|
</AppBarButton.Flyout>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
<AppBarButton x:Uid="/VideoPage/addTo" Name="addTo" Label="Add to" Icon="Add">
|
<AppBarButton x:Uid="/VideoPage/addTo" Name="addTo" Label="Add to" Icon="Add" Visibility="Collapsed">
|
||||||
<AppBarButton.Flyout>
|
<AppBarButton.Flyout>
|
||||||
<Flyout>
|
<Flyout>
|
||||||
<ScrollViewer Margin="-12" MaxHeight="300">
|
<ScrollViewer Margin="-12" MaxHeight="300">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using FoxTube.Controls;
|
using FoxTube.Controls;
|
||||||
using FoxTube.Controls.Adverts;
|
|
||||||
using Google.Apis.YouTube.v3;
|
using Google.Apis.YouTube.v3;
|
||||||
using Google.Apis.YouTube.v3.Data;
|
using Google.Apis.YouTube.v3.Data;
|
||||||
|
using Microsoft.AppCenter.Analytics;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@@ -10,7 +10,6 @@ using System.Linq;
|
|||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
using Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.System;
|
using Windows.System;
|
||||||
using Windows.UI;
|
using Windows.UI;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
@@ -139,6 +138,12 @@ namespace FoxTube.Pages
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
loading.Error(e.GetType().ToString(), e.Message);
|
loading.Error(e.GetType().ToString(), e.Message);
|
||||||
|
Analytics.TrackEvent("Video loading error", new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "Exception", e.GetType().ToString() },
|
||||||
|
{ "Message", e.Message },
|
||||||
|
{ "Video ID", videoId }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user