28 lines
1.2 KiB
C#
28 lines
1.2 KiB
C#
using Windows.Data.Xml.Dom;
|
|
using Windows.UI.Notifications;
|
|
|
|
namespace FoxTube.Core.Models
|
|
{
|
|
public static class Notifications
|
|
{
|
|
public static ToastNotification GetChangelogToast(string version)
|
|
{
|
|
XmlDocument template = new XmlDocument();
|
|
|
|
// TODO: Add backend
|
|
template.LoadXml($@"<toast activationType='foreground' launch='changelog|{version}'>
|
|
<visual>
|
|
<binding template='ToastGeneric'>
|
|
<image placement='hero' src='https://xfox111.net/FoxTube/Thumbnails/Changelog?ver={version}'/>
|
|
<image placement='appLogoOverride' hint-crop='circle' src='https://xfox111.net/FoxTube/Avatars/Changelog'/>
|
|
<text>Changelog</text>
|
|
<text>See what's new in {version}</text>
|
|
</binding>
|
|
</visual>
|
|
</toast>");
|
|
|
|
return new ToastNotification(template);
|
|
}
|
|
}
|
|
}
|