Archived
1
0

Anyway, I am the only one who reads this, right?

This commit is contained in:
Michael Gordeev
2019-12-02 16:52:49 +03:00
parent acd63a948e
commit bfc8689136
40 changed files with 8722 additions and 178 deletions
+13
View File
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FoxTube.Core.Models
{
public interface IRefreshable
{
void RefreshPage();
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
namespace FoxTube.Core.Models.Inbox
{
public class Changelog : InboxItem
{
public override string DefaultIcon => "\xE728";
public override string Title => "What's new in version " + Id;
public override string Type => "Changelog";
public Changelog(string version, string content, string description, DateTime timeStamp)
{
Id = version;
Content = content;
Description = description;
TimeStamp = timeStamp;
}
}
}
@@ -0,0 +1,22 @@
using System;
namespace FoxTube.Core.Models.Inbox
{
public class DeveloperMessage : InboxItem
{
public override string DefaultIcon => "\xE119";
public override string Title => _title;
string _title;
public override string Type => "Message from developers";
public DeveloperMessage(string id, string title, string content, DateTime timeStamp, string avatar)
{
Id = id;
_title = title;
Content = content;
Description = content;
TimeStamp = timeStamp;
Avatar = avatar;
}
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
namespace FoxTube.Core.Models
{
public abstract class InboxItem
{
public string Id { get; set; }
public abstract string DefaultIcon { get; }
public string Avatar { get; set; }
public abstract string Title { get; }
public string Description { get; set; }
public string Content { get; set; }
public DateTime TimeStamp { get; set; }
public abstract string Type { get; }
}
}
+27
View File
@@ -0,0 +1,27 @@
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);
}
}
}