Integrate vanishing messages with patchwork private messages

This commit is contained in:
Rogerio Chaves 2020-04-08 19:48:19 +02:00
parent d207b512a3
commit 20d5e83994
No known key found for this signature in database
GPG Key ID: E6AF5440509B1D94
4 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,6 @@ router.post("/publish", async (req, res) => {
router.post("/profile/:id/publish", async (req, res) => {
const id = req.params.id;
const visibility = req.body.visibility;
console.log("req.body", req.body);
if (visibility == "vanishing") {
await ssbServer.private.publish(

View File

@ -145,7 +145,6 @@ const getVanishingMessages = (ssbServer, profile) =>
{
$filter: {
value: {
author: profile.id,
private: true,
content: {
type: "post",

View File

@ -131,13 +131,14 @@ button.vanishing-message {
padding: 10px;
cursor: pointer;
color: #000;
margin-right: 8px;
}
.overlay {
display: none;
position: fixed;
z-index: 1;
background: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.4);
top: 0;
left: 0;
width: 100%;
@ -153,6 +154,7 @@ button.vanishing-message {
left: 50%;
transform: translate(-50%, -50%);
min-width: 400px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}
.modal-header {

View File

@ -25,7 +25,7 @@
<% if (vanishingMessages.length > 0) { %>
<div class="vanishing-messages" style="padding-bottom: 20px">
<h2>Vanishing Messages</h2>
<% vanishingMessages.map(post => { %>
<% vanishingMessages.reverse().map(post => { %>
<span>
<button class="vanishing-message">
<div><img src="<%= profileImageUrl(post.authorProfile) %>" class="post-profile-pic" /></div>