54 lines
2.4 KiB
Plaintext
54 lines
2.4 KiB
Plaintext
<div class="column-side-padding" style="margin: 25px 0 20px 0; font-size: 14px; <%= secretMessages.length > 0 ? "display: none" : "" %>">
|
|
🤫 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('_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="js-step" <%- index > 0 ? 'style="display: none"' : "" %>>
|
|
<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">
|
|
<%= message.value.content.text %>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<% if (index == chat.messages.length - 1) { %>
|
|
after you close this box the message will be gone forever
|
|
<button class="js-modal-confirm">Close</button>
|
|
<% } else { %>
|
|
<span></span>
|
|
<button class="js-modal-confirm">Next</button>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
<% }) %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% }) %> |