Added support for viewing messages on web

This commit is contained in:
Jemma
2023-12-29 22:22:31 -06:00
parent 249b417db8
commit b794fcd5a7
3 changed files with 719 additions and 454 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -7,9 +7,31 @@
<h2 id="title" class="page-header"><%= userMap.get(user2.pid) %></h2>
<%- include('partials/nav_bar', { selection: 3, pid: pid }); %>
<div id="toast"></div>
<div id="wrapper" style="height: 80%;padding: 2em;text-align:center">
<h2>Messages are not quite ready yet. Check back soon!</h2>
<div id="wrapper">
<div class="body-content message-post-list" id="message-page">
<% messages.forEach(function(message) { %>
<div id="message-<%= message.post_id%>" class="post scroll <%if(message.pid === pid) {%>my-post<%} else {%>other-post<%}%>">
<a href="/users/show?pid=<%= message.pid %>" data-pjax="#body" class="scroll-focus mii-icon-container">
<img src="https://pretendo-cdn.b-cdn.net<%= message.mii_face_url.substring(message.mii_face_url.lastIndexOf('/mii')) %>" class="mii-icon">
</a>
<div class="post-body">
<%if(message.screenshot) {%>
<img class="message-viewer-bubble-sent-screenshot" src="https://pretendo-cdn.b-cdn.net<%= message.screenshot %>">
<%}%>
<%if(message.painting) {%>
<img class="message-viewer-bubble-sent-memo" src="https://pretendo-cdn.b-cdn.net/paintings/<%=message.pid%>/<%=message.id%>.png">
<%}else {%>
<p class="post-content"><%= message.body %></p>
<%}%>
</div>
<footer>
<span class="timestamp"><%= moment(message.created_at).fromNow()%></span>
</footer>
</div>
<%});%>
</div>
</div>
<img src="" onerror="setTimeout(function() { window.scrollTo(0, 50000); }, 500)">
</div>
</body>
</html>