36 lines
929 B
C#
36 lines
929 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 Content { get; set; }
|
|||
|
public string RenderedMarkdown { get; set; }
|
|||
|
public string ExternalUrl { get; set; }
|
|||
|
|
|||
|
public MarkupString HtmlContent {
|
|||
|
get {
|
|||
|
if(!string.IsNullOrEmpty(RenderedMarkdown)) return (MarkupString)RenderedMarkdown;
|
|||
|
else return (MarkupString)Markdown.ToHtml(Content);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string Url {
|
|||
|
get {
|
|||
|
return $"https://status.lol/{Address}/{Id}";
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string UserUrl {
|
|||
|
get {
|
|||
|
return $"https://status.lol/{Address}";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|