add notification for new post in thread

This commit is contained in:
2025-05-28 04:01:51 +03:00
parent 8ea9afd39d
commit 1a96612544
10 changed files with 195 additions and 12 deletions

View File

@ -0,0 +1,10 @@
<div id="new-post-notification" class="new-concept-notification hidden">
<div class="new-notification-content">
<p>New post in thread!</p>
<span class="notification-buttons">
<button id="dismiss-new-post-button">Dismiss</button>
<a class="linkbutton" id="go-to-new-post-button">View post</a>
<button id="unsub-new-post-button">Stop updates</button>
</span>
</div>
</div>

View File

@ -55,4 +55,6 @@
</span>
</div>
</dialog>
<input type="hidden" id="thread-subscribe-endpoint" value="<%= url_for("sse_thread_updates", {thread_id = thread.id}) %>">
<% render("views.threads.new-post-notification") %>
<script src="/static/js/thread.js"></script>