feedless/web/views/mobile/secrets.ejs

62 lines
2.9 KiB
Plaintext

<div class="yellow-background <%= secretMessages.length > 0 ? "" : "no-secrets" %>">
<div class="column-side-padding" style="margin: 25px 0 20px 0; <%= secretMessages.length > 0 ? "display: none" : "" %>">
<div style="font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;">
<div style="font-size: 50px">🤫</div>
<div style="padding-top: 20px; font-size: 16px">You don't have any secret messages yet</div>
</div>
</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" style="display: none"></div>
<div class="modal" style="display: none">
<% 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="js-modal-confirm">Close</button>
<% } else { %>
<span></span>
<button class="js-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 modal-body-center">
<div class="modal-center-message"><%= message.value.content.text %></div>
</div>
</div>
<% }) %>
</div>
</div>
</div>
<% }) %>
<%- include('secrets/_compose_multiple') %>
</div>