@@ -23,14 +23,19 @@
|
|||||||
<PersonPicture Tapped="avatar_Tapped" Name="avatar" Height="50" Margin="5" VerticalAlignment="Top"/>
|
<PersonPicture Tapped="avatar_Tapped" Name="avatar" Height="50" Margin="5" VerticalAlignment="Top"/>
|
||||||
<Grid Grid.Column="1" Margin="5">
|
<Grid Grid.Column="1" Margin="5">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Name="meta" TextWrapping="WrapWholeWords" Foreground="Gray" FontSize="13" Text="[Author's name] | [Published time span] [?](edited)"/>
|
<TextBlock Name="author" TextWrapping="WrapWholeWords" Foreground="Gray" FontSize="13" Text="[Author's name]"/>
|
||||||
<TextBlock Name="text" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords" Grid.Row="1" Text="[Content]"/>
|
<Border Name="authorBorder" HorizontalAlignment="Left" Background="Red" CornerRadius="5" Visibility="Collapsed">
|
||||||
|
<TextBlock Name="specialAuthor" TextWrapping="WrapWholeWords" Foreground="White" FontSize="13" Text="[Author's name]" Padding="2,0,2,2"/>
|
||||||
|
</Border>
|
||||||
|
<TextBlock Name="meta" Grid.Row="1" TextWrapping="WrapWholeWords" Foreground="Gray" FontSize="13" Text="[Published time span] [?](edited)"/>
|
||||||
|
<TextBlock Name="text" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords" Grid.Row="2" Text="[Content]"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="1" Name="editor" Visibility="Collapsed">
|
<StackPanel Grid.Row="2" Name="editor" Visibility="Collapsed">
|
||||||
<TextBox Name="editorText" Text="[Content]" AcceptsReturn="True" Height="Auto" TextChanged="editorText_TextChanged"/>
|
<TextBox Name="editorText" Text="[Content]" AcceptsReturn="True" Height="Auto" TextChanged="editorText_TextChanged"/>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,0,5">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,0,5">
|
||||||
<Button Name="editorClose" Content="Cancel" Click="editorClose_Click"/>
|
<Button Name="editorClose" Content="Cancel" Click="editorClose_Click"/>
|
||||||
@@ -39,7 +44,7 @@
|
|||||||
<ProgressBar Name="editorSending" Foreground="Red" IsIndeterminate="True" Visibility="Collapsed"/>
|
<ProgressBar Name="editorSending" Foreground="Red" IsIndeterminate="True" Visibility="Collapsed"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
<StackPanel Grid.Row="3" Orientation="Horizontal">
|
||||||
<TextBlock Name="upvote" Foreground="Gray" Padding="0"
|
<TextBlock Name="upvote" Foreground="Gray" Padding="0"
|
||||||
VerticalAlignment="Center" Margin="0,0,5,0"
|
VerticalAlignment="Center" Margin="0,0,5,0"
|
||||||
FontFamily="Segoe MDL2 Assets" Text="" FontSize="20"/>
|
FontFamily="Segoe MDL2 Assets" Text="" FontSize="20"/>
|
||||||
|
|||||||
@@ -57,9 +57,22 @@ namespace FoxTube.Controls
|
|||||||
rating.Text = comment.Snippet.TopLevelComment.Snippet.LikeCount.HasValue ? comment.Snippet.TopLevelComment.Snippet.LikeCount.ToString() : "";
|
rating.Text = comment.Snippet.TopLevelComment.Snippet.LikeCount.HasValue ? comment.Snippet.TopLevelComment.Snippet.LikeCount.ToString() : "";
|
||||||
|
|
||||||
if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == SecretsVault.AccountId)
|
if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == SecretsVault.AccountId)
|
||||||
|
{
|
||||||
|
specialAuthor.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
|
||||||
|
authorBorder.Visibility = Visibility.Visible;
|
||||||
|
author.Visibility = Visibility.Collapsed;
|
||||||
editBtn.Visibility = Visibility.Visible;
|
editBtn.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == Methods.MainPage.GetCurrentItem().Snippet.ChannelId)
|
||||||
|
{
|
||||||
|
specialAuthor.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
|
||||||
|
authorBorder.Visibility = Visibility.Visible;
|
||||||
|
author.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
author.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
|
||||||
|
|
||||||
meta.Text = string.Format("{0} | {1} {2}", comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.TopLevelComment.Snippet.PublishedAt.Value), comment.Snippet.TopLevelComment.Snippet.UpdatedAt != comment.Snippet.TopLevelComment.Snippet.PublishedAt ? "(edited)" : "");
|
meta.Text = string.Format("{0} {1}", Methods.GetAgo(comment.Snippet.TopLevelComment.Snippet.PublishedAt.Value), comment.Snippet.TopLevelComment.Snippet.UpdatedAt != comment.Snippet.TopLevelComment.Snippet.PublishedAt ? "(edited)" : "");
|
||||||
Methods.FormatText(ref text, comment.Snippet.TopLevelComment.Snippet.TextDisplay);
|
Methods.FormatText(ref text, comment.Snippet.TopLevelComment.Snippet.TextDisplay);
|
||||||
|
|
||||||
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.TopLevelComment.Snippet.AuthorProfileImageUrl)); }
|
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.TopLevelComment.Snippet.AuthorProfileImageUrl)); }
|
||||||
@@ -89,7 +102,23 @@ namespace FoxTube.Controls
|
|||||||
else
|
else
|
||||||
rating.Text = comment.Snippet.LikeCount.HasValue ? comment.Snippet.LikeCount.ToString() : "";
|
rating.Text = comment.Snippet.LikeCount.HasValue ? comment.Snippet.LikeCount.ToString() : "";
|
||||||
|
|
||||||
meta.Text = string.Format("{0} | {1} {2}", comment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.PublishedAt.Value), comment.Snippet.UpdatedAt.Value != comment.Snippet.PublishedAt.Value ? "(edited)" : "");
|
if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == SecretsVault.AccountId)
|
||||||
|
{
|
||||||
|
specialAuthor.Text = comment.Snippet.AuthorDisplayName;
|
||||||
|
authorBorder.Visibility = Visibility.Visible;
|
||||||
|
author.Visibility = Visibility.Collapsed;
|
||||||
|
editBtn.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == Methods.MainPage.GetCurrentItem().Snippet.ChannelId)
|
||||||
|
{
|
||||||
|
specialAuthor.Text = comment.Snippet.AuthorDisplayName;
|
||||||
|
authorBorder.Visibility = Visibility.Visible;
|
||||||
|
author.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
author.Text = comment.Snippet.AuthorDisplayName;
|
||||||
|
|
||||||
|
meta.Text = string.Format("{0} {1}", comment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.PublishedAt.Value), comment.Snippet.UpdatedAt.Value != comment.Snippet.PublishedAt.Value ? "(edited)" : "");
|
||||||
Methods.FormatText(ref text, comment.Snippet.TextDisplay);
|
Methods.FormatText(ref text, comment.Snippet.TextDisplay);
|
||||||
|
|
||||||
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.AuthorProfileImageUrl)); }
|
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.AuthorProfileImageUrl)); }
|
||||||
|
|||||||
@@ -144,6 +144,12 @@ namespace FoxTube
|
|||||||
SetTitleBar();
|
SetTitleBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Video GetCurrentItem()
|
||||||
|
{
|
||||||
|
try { return (videoPlaceholder.Content as VideoPage).item; }
|
||||||
|
catch { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
public void SetTitleBar()
|
public void SetTitleBar()
|
||||||
{
|
{
|
||||||
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
||||||
@@ -307,6 +313,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
public void GoToSearch(SearchParameters args)
|
public void GoToSearch(SearchParameters args)
|
||||||
{
|
{
|
||||||
|
nav.IsPaneOpen = false;
|
||||||
MinimizeAsInitializer();
|
MinimizeAsInitializer();
|
||||||
content.Navigate(typeof(Search), args);
|
content.Navigate(typeof(Search), args);
|
||||||
}
|
}
|
||||||
@@ -318,6 +325,8 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async void GoToVideo(string id, string playlistId = null)
|
public async void GoToVideo(string id, string playlistId = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
|
var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
|
||||||
if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
|
if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
|
||||||
@@ -340,6 +349,8 @@ namespace FoxTube
|
|||||||
if (cancel)
|
if (cancel)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
nav.IsPaneOpen = false;
|
nav.IsPaneOpen = false;
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace FoxTube.Pages
|
|||||||
|
|
||||||
public string videoId;
|
public string videoId;
|
||||||
string playlistId = null;
|
string playlistId = null;
|
||||||
Video item;
|
public Video item;
|
||||||
|
|
||||||
List<string> downloads = new List<string>();
|
List<string> downloads = new List<string>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user