New icons
Notifications improvements Featured channels list
@@ -5,9 +5,9 @@
|
||||
xmlns:local="using:FoxTube"
|
||||
RequestedTheme="Light">
|
||||
<Application.Resources>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<!--<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Height" Value="50"/>
|
||||
</Style>
|
||||
</Style>-->
|
||||
<Style TargetType="TextBlock" x:Key="ItemIcon">
|
||||
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 699 B |
|
Before Width: | Height: | Size: 1020 B After Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 785 B |
|
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 825 B After Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 1016 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -111,11 +111,14 @@
|
||||
<None Include="FoxTube_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AnnouncementThumb.png" />
|
||||
<Content Include="Assets\LargeTile.scale-100.png" />
|
||||
<Content Include="Assets\LargeTile.scale-125.png" />
|
||||
<Content Include="Assets\LargeTile.scale-150.png" />
|
||||
<Content Include="Assets\LargeTile.scale-200.png" />
|
||||
<Content Include="Assets\LargeTile.scale-400.png" />
|
||||
<Content Include="Assets\LogoAvatar.png" />
|
||||
<Content Include="Assets\NewsAvatar.png" />
|
||||
<Content Include="Assets\SmallTile.scale-100.png" />
|
||||
<Content Include="Assets\SmallTile.scale-125.png" />
|
||||
<Content Include="Assets\SmallTile.scale-150.png" />
|
||||
@@ -147,6 +150,7 @@
|
||||
<Content Include="Assets\StoreLogo.scale-150.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-200.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-400.png" />
|
||||
<Content Include="Assets\WhatsNewThumb.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-100.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-125.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-150.png" />
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
FontFamily="Segoe MDL2 Assets" Content="" Foreground="White"
|
||||
Width="50" Height="50" Background="#00000000" RelativePanel.LeftOf="searchField"/>
|
||||
<Line Grid.Column="4" Y1="40" Y2="10" StrokeThickness="1" Stroke="White" HorizontalAlignment="Center"/>
|
||||
<Button Name="refresh" Grid.Column="5" ToolTipService.ToolTip="Refresh"
|
||||
<Button Name="refresh" Grid.Column="5" ToolTipService.ToolTip="Refresh" Click="refresh_Click"
|
||||
FontFamily="Segoe MDL2 Assets" Content="" Foreground="White"
|
||||
Width="50" Height="50" Background="#00000000" RelativePanel.LeftOf="searchField"/>
|
||||
<Button Name="notificationMenu" Grid.Column="6" ToolTipService.ToolTip="Notifications" Click="notification_Click"
|
||||
@@ -53,10 +53,13 @@
|
||||
<StackPanel Name="notificationPanel" Visibility="Visible">
|
||||
<ListBox Width="350" Padding="0,0,0,10" Name="notificationArray">
|
||||
<ListBoxItem Padding="10" MinHeight="80">
|
||||
<StackPanel>
|
||||
<TextBlock FontSize="14" FontStyle="Italic" Foreground="Gray" Text="Channel name"/>
|
||||
<TextBlock TextWrapping="WrapWholeWords" Text="This is very long notification. One, two, three, four, five, six, seven, eight, nine, ten."/>
|
||||
<TextBlock Foreground="Gray" Text="HH:MM TT" FontSize="13"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PersonPicture Height="50" HorizontalAlignment="Left" Margin="0,0,10,0" VerticalAlignment="Top" ProfilePicture="Assets/LogoAvatar.png"/>
|
||||
<StackPanel MaxWidth="270">
|
||||
<TextBlock FontSize="14" FontStyle="Italic" Foreground="Gray" Text="Channel name"/>
|
||||
<TextBlock TextWrapping="WrapWholeWords" Text="This is very long notification. One, two, three, four, five, six, seven, eight, nine, ten."/>
|
||||
<TextBlock Foreground="Gray" Text="HH:MM TT" FontSize="13"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Padding="10" VerticalAlignment="Stretch" Background="LightGray" MinHeight="80" Height="100">
|
||||
@@ -211,12 +214,20 @@
|
||||
<Line Name="subsMenuStroke" X1="0" Y1="10" X2="165" Y2="10" Stroke="Gray" StrokeThickness="2"/>
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Height="60" IsEnabled="False" Name="subsLogErr">
|
||||
<ListBoxItem Height="60" IsEnabled="False" Name="subsLogErr" Visibility="Visible">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock FontFamily="Default, Segoe MDL2 Assets" Text="Press  and add an account to see your featured channels here" Width="225" Height="35" HorizontalTextAlignment="Center" Foreground="Gray" TextWrapping="WrapWholeWords"/>
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
<ListBox RelativePanel.Below="topHamburger" Visibility="Collapsed">
|
||||
<ListBoxItem>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PersonPicture Height="23" Margin="0,0,17,0" Padding="0"/>
|
||||
<TextBlock Style="{StaticResource MenuItem}" Text="Channel name"/>
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
<ListBox RelativePanel.AlignBottomWithPanel="True" SelectionChanged="bottomHaburgerSelectionChanged" Name="bottomHaburger">
|
||||
<ListBoxItem Name="channelMenu">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -230,7 +241,7 @@
|
||||
<TextBlock Style="{StaticResource MenuItem}" Text="Creator studio"/>
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Name="noadsMenu" Visibility="Collapsed">
|
||||
<ListBoxItem Name="noadsMenu" Visibility="Visible">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
||||
<TextBlock Style="{StaticResource MenuItem}" Text="Remove ads (2$)"/>
|
||||
|
||||
@@ -16,6 +16,8 @@ using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
using Windows.UI.Notifications;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
|
||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||
|
||||
@@ -51,7 +53,7 @@ namespace FoxTube
|
||||
private void menuButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
menu.IsPaneOpen = !menu.IsPaneOpen;
|
||||
AddNotification(new Notification("Internal notification", "Menu state has been changed", DateTime.Now, NotificationType.Update));
|
||||
//AddNotification(new Notification("Internal notification", "Menu state has been changed", DateTime.Now, NotificationType.Update));
|
||||
|
||||
if(menu.IsPaneOpen)
|
||||
{
|
||||
@@ -77,6 +79,16 @@ namespace FoxTube
|
||||
notifications.Add(notification);
|
||||
noNotifText.Visibility = Visibility.Collapsed;
|
||||
notificationPanel.Visibility = Visibility.Visible;
|
||||
StackPanel stack = new StackPanel();
|
||||
stack.Orientation = Orientation.Horizontal;
|
||||
stack.Children.Add(new PersonPicture()
|
||||
{
|
||||
Height = 50,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
Margin = new Thickness(0, 0, 10, 0),
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
ProfilePicture = new BitmapImage(new Uri(notification.Avatar))
|
||||
});
|
||||
StackPanel stackPanel = new StackPanel();
|
||||
//Channel
|
||||
stackPanel.Children.Add(new TextBlock()
|
||||
@@ -84,7 +96,7 @@ namespace FoxTube
|
||||
FontSize = 14,
|
||||
FontStyle = Windows.UI.Text.FontStyle.Italic,
|
||||
Foreground = new SolidColorBrush(Colors.Gray),
|
||||
Text = notification.author
|
||||
Text = notification.Header
|
||||
});
|
||||
//Content
|
||||
stackPanel.Children.Add(new TextBlock()
|
||||
@@ -99,16 +111,68 @@ namespace FoxTube
|
||||
Foreground = new SolidColorBrush(Colors.Gray),
|
||||
Text = notification.returnTimecode()
|
||||
});
|
||||
stack.Children.Add(stackPanel);
|
||||
|
||||
notificationArray.Items.Add(new ListBoxItem()
|
||||
{
|
||||
Padding = new Thickness(10),
|
||||
MinHeight = 80,
|
||||
Content = stackPanel
|
||||
Content = stack
|
||||
});
|
||||
|
||||
//Sending notification
|
||||
|
||||
if(needNotify)
|
||||
{
|
||||
if(notification.Type == NotificationType.Update)
|
||||
{
|
||||
ToastContent toast = new ToastContent()
|
||||
{
|
||||
Visual = new ToastVisual()
|
||||
{
|
||||
BindingGeneric = new ToastBindingGeneric()
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new AdaptiveText()
|
||||
{
|
||||
Text = notification.Header,
|
||||
HintMaxLines = 2
|
||||
},
|
||||
new AdaptiveText()
|
||||
{
|
||||
Text = notification.message
|
||||
}
|
||||
},
|
||||
HeroImage = new ToastGenericHeroImage()
|
||||
{
|
||||
Source = notification.Thumbnail
|
||||
},
|
||||
AppLogoOverride = new ToastGenericAppLogo()
|
||||
{
|
||||
Source = notification.Avatar,
|
||||
HintCrop = ToastGenericAppLogoCrop.Circle
|
||||
}
|
||||
}
|
||||
},
|
||||
Actions = new ToastActionsCustom()
|
||||
{
|
||||
Buttons =
|
||||
{
|
||||
new ToastButton("View full post", "action=viewupdatenotification")
|
||||
{
|
||||
ActivationType = ToastActivationType.Foreground
|
||||
},
|
||||
new ToastButton("Manage notifications", "action=notificationsettings")
|
||||
{
|
||||
ActivationType = ToastActivationType.Foreground
|
||||
}
|
||||
}
|
||||
},
|
||||
Launch = "action=viewupdatenotification"
|
||||
};
|
||||
ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(toast.GetXml()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -143,5 +207,10 @@ namespace FoxTube
|
||||
noNotifText.Visibility = Visibility.Visible;
|
||||
notificationPanel.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void refresh_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
content.UpdateLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
|
||||
namespace FoxTube
|
||||
{
|
||||
@@ -13,17 +15,21 @@ namespace FoxTube
|
||||
|
||||
public class Notification
|
||||
{
|
||||
public string author { get; set; }
|
||||
public string Header { get; set; }
|
||||
public string message { get; set; }
|
||||
public DateTime time { get; set; }
|
||||
public NotificationType Type { get; set; }
|
||||
public string Avatar { get; set; }
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
public Notification(string channelName, string content, DateTime date, NotificationType type)
|
||||
public Notification(string header, string content, DateTime date, NotificationType type, string avatar = "ms-appx:///Assets/NewsAvatar.png", string thumbnail = "ms-appx:///Assets/AnnouncementThumb.png")
|
||||
{
|
||||
author = channelName;
|
||||
Header = header;
|
||||
message = content;
|
||||
time = date;
|
||||
Type = type;
|
||||
Avatar = avatar;
|
||||
Thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public string returnTimecode(bool twelveFormat = true)
|
||||
|
||||