diff --git a/Components/NewEphemeral.razor b/Components/NewEphemeral.razor
new file mode 100644
index 0000000..bb0b235
--- /dev/null
+++ b/Components/NewEphemeral.razor
@@ -0,0 +1,58 @@
+@inject IJSRuntime JS
+@inject State State
+@inject RestService api
+@inject NavigationManager navigationManager
+
+
+
+
+@code {
+ [Parameter]
+ public string id { get; set; }
+ [Parameter]
+ public bool Active { get; set; }
+ [Parameter]
+ public string Content { get; set; } = string.Empty;
+
+ private bool loading = false;
+
+ public async Task PostEphemeral() {
+ loading = true;
+ await InvokeAsync(StateHasChanged);
+ var result = await api.PostEphemeral(Content);
+ if (result != null) {
+ await State.RefreshStatuses();
+ State.SendRefresh();
+ await InvokeAsync(StateHasChanged);
+ }
+
+ this.Active = false;
+ await JS.InvokeVoidAsync("ui", "#" + id);
+ Content = string.Empty;
+ loading = false;
+ }
+}
diff --git a/Components/Pages/Ephemeral.razor b/Components/Pages/Ephemeral.razor
index 1255c8f..364c93d 100644
--- a/Components/Pages/Ephemeral.razor
+++ b/Components/Pages/Ephemeral.razor
@@ -9,6 +9,15 @@
Eph.emer.al is a place for fleeting thoughts. Everything on this page will disappear after a while.
+
+
+
+
+
+
+
@if (messages != null) {
diff --git a/Models/EphemeralData.cs b/Models/EphemeralData.cs
new file mode 100644
index 0000000..81d96e7
--- /dev/null
+++ b/Models/EphemeralData.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Neighbourhood.omg.lol.Models {
+ public class EphemeralData {
+ public string Content { get; set; }
+ }
+}
diff --git a/Models/EphemeralResponseData.cs b/Models/EphemeralResponseData.cs
new file mode 100644
index 0000000..ed106cd
--- /dev/null
+++ b/Models/EphemeralResponseData.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Neighbourhood.omg.lol.Models {
+ public class EphemeralResponseData : IOmgLolResponseData {
+ public string Message { get; set; }
+ public List
Content { get; set; }
+ }
+}
diff --git a/Models/State.cs b/Models/State.cs
index 677806e..d3f8934 100644
--- a/Models/State.cs
+++ b/Models/State.cs
@@ -6,7 +6,7 @@ using System.Text.Json;
namespace Neighbourhood.omg.lol.Models {
public class State : INotifyPropertyChanged {
// Feature flags
- public bool FeatureFollowing { get; } = true;
+ public bool FeatureFollowing { get; } = false;
// Main data lists
public List? Statuses { get; set; }
public List? Pics { get; set; }
diff --git a/RestService.cs b/RestService.cs
index 540bfb6..01a5dec 100644
--- a/RestService.cs
+++ b/RestService.cs
@@ -219,7 +219,13 @@ namespace Neighbourhood.omg.lol {
public async Task PostNowPage(string address, string content, bool listed) =>
await Post($"/address/{address}/now", new NowContentData { Content = content, Listed = listed ? 1 : 0 });
- public async Task> Ephemeral() {
+ public async Task> Ephemeral() =>
+ (await Get($"/ephemeral"))?.Content?.Select(s => (MarkupString)s)?.ToList() ?? new List();
+
+ public async Task PostEphemeral(string content) =>
+ await Post("/ephemeral", new EphemeralData { Content = content });
+
+ public async Task> EphemeralScrape() {
List notes = new List();
Uri Uri = new Uri($"https://eph.emer.al/");
try {