Neighbourhood.omg.lol/Models/Status.cs
Gordon Pedersen df05e8a819 Made the api a singleton and got a share intent working
The result of the share intent needs more work, though.
2024-06-14 17:20:04 +10:00

39 lines
1,016 B
C#

using Markdig;
using Microsoft.AspNetCore.Components;
namespace Neighbourhood.omg.lol.Models {
public class Status {
public string Id { get; set; }
public string Address { get; set; }
public string Created { get; set; }
public string RelativeTime { get; set; }
public string Emoji { get; set; }
public string Background { get; set; }
public string BackgroundColor { get => Background; set => Background = "#" + value; }
public string Content { get; set; }
public string RenderedMarkdown { get; set; }
public string ExternalUrl { get; set; }
public string EmojiOrDefault {
get {
return string.IsNullOrEmpty(Emoji) ? "✨" : Emoji;
}
}
public MarkupString HtmlContent {
get => Utilities.MdToHtmlMarkup(Content);
}
public string Url {
get {
return $"https://status.lol/{Address}/{Id}";
}
}
public string UserUrl {
get {
return $"https://status.lol/{Address}";
}
}
}
}