feedless/app/views/mobile/secrets.ejs

58 lines
2.5 KiB
Plaintext

<div class="secret-chat">
<div class="column-side-padding" <%= secretMessages.length > 0 ? "hidden" : "" %> style="margin: 25px 0 20px 0; font-size: 14px;">
👻 You don't have any secret messages yet
</div>
<% secretMessages.map(chat => { %>
<div>
<div>
<button class="secret-button js-compose-secret-message" style="<%= chat.messages.length == 0 ? "" : "display: none" %>" data-url="<%= profileUrl(chat.authorProfile.id, "/publish_secret") %>">
<img class="link-profile-pic" src="<%= profileImageUrl(chat.authorProfile) %>" class="post-profile-pic" />
<div style="flex-grow: 1;">
<%= chat.authorProfile.name %> <br />
<small>
No new secrets
</small>
</div>
</button>
<%- include('../secrets/_compose_single', { profile: chat.authorProfile }) %>
</div>
<div>
<button class="secret-button js-secret-message" style="<%= chat.messages.length == 0 ? "display: none" : "" %>" data-keys="<%= chat.messages.map(m => m.key).join(",") %>">
<img class="link-profile-pic" src="<%= profileImageUrl(chat.authorProfile) %>" class="post-profile-pic" />
<div style="flex-grow: 1;">
<%= chat.authorProfile.name %> <br />
<small>
👁 <%= chat.messages.length == 1 ? "1 new message" : chat.messages.length + " new messages" %>
</small>
</div>
</button>
<div class="overlay" hidden></div>
<div class="modal" hidden>
<% chat.messages.reverse().map((message, index) => { %>
<div class="modal-group js-step" <%- index > 0 ? 'style="display: none"' : "" %>>
<div class="modal-footer">
<% if (index == chat.messages.length - 1) { %>
<span></span>
<button class="modal-confirm">Close</button>
<% } else { %>
<span></span>
<button class="modal-confirm">Next</button>
<% } %>
</div>
<a href="<%= profileUrl(chat.authorProfile.id) %>" class="modal-header">
<img src="<%= profileImageUrl(chat.authorProfile) %>" class="post-profile-pic" />
<div style="padding-left: 10px"><%= chat.authorProfile.name %></div>
</a>
<div class="modal-body">
<div style="margin-top: -60px"><%= message.value.content.text %></div>
</div>
</div>
<% }) %>
</div>
</div>
</div>
<% }) %>
</div>