From 6ca46028e9b5a916dc7f3b83b596c670310b3ff8 Mon Sep 17 00:00:00 2001
From: mrilyew <99399973+mrilyew@users.noreply.github.com>
Date: Mon, 24 Mar 2025 21:54:43 +0300
Subject: [PATCH] do not show content if deleted (fave)

---
 Web/Presenters/templates/User/Fave.xml | 40 +++++++++++++++-----------
 Web/static/css/audios.css              |  1 -
 Web/static/css/main.css                |  4 +++
 3 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/Web/Presenters/templates/User/Fave.xml b/Web/Presenters/templates/User/Fave.xml
index 50ead41f..29814c39 100644
--- a/Web/Presenters/templates/User/Fave.xml
+++ b/Web/Presenters/templates/User/Fave.xml
@@ -36,24 +36,30 @@
                         </style>
                         {if $count > 0}
                             {foreach $data as $dat}
-                                {if $section == "posts"}
-                                    <div class="scroll_node">
-                                        {include "../components/post.xml", post => $dat, commentSection => true}
-                                    </div>
-                                {elseif $section == "comments"}
-                                    <div class="scroll_node">
-                                        {include "../components/comment.xml", comment => $dat, correctLink => true, no_reply_button => true}
-                                    </div>
-                                {elseif $section == "photos"}
-                                    <div class="album-photo scroll_node" onclick="OpenMiniature(event, {$dat->getURLBySizeId('larger')}, null, {$dat->getPrettyId()}, null)">
-                                        <a href="/photo{$dat->getPrettyId()}">
-                                            <img class="album-photo--image" src="{$dat->getURLBySizeId('tinier')}" alt="{$dat->getDescription()}"  loading="lazy" />
-                                        </a>
-                                    </div>
-                                {elseif $section == "videos"}
-                                    <div class="scroll_node">
-                                        {include "../components/video.xml", video => $dat}
+                                {if $dat->isDeleted()}
+                                    <div n:class="deleted_mark, $section == 'photos' ? album-photo : deleted_mark_average">
+                                        <span>[deleted]</span>
                                     </div>
+                                {else}
+                                    {if $section == "posts"}
+                                        <div class="scroll_node">
+                                            {include "../components/post.xml", post => $dat, commentSection => true}
+                                        </div>
+                                    {elseif $section == "comments"}
+                                        <div class="scroll_node">
+                                            {include "../components/comment.xml", comment => $dat, correctLink => true, no_reply_button => true}
+                                        </div>
+                                    {elseif $section == "photos"}
+                                        <div class="album-photo scroll_node" onclick="OpenMiniature(event, {$dat->getURLBySizeId('larger')}, null, {$dat->getPrettyId()}, null)">
+                                            <a href="/photo{$dat->getPrettyId()}">
+                                                <img class="album-photo--image" src="{$dat->getURLBySizeId('tinier')}" alt="{$dat->getDescription()}"  loading="lazy" />
+                                            </a>
+                                        </div>
+                                    {elseif $section == "videos"}
+                                        <div class="scroll_node">
+                                            {include "../components/video.xml", video => $dat}
+                                        </div>
+                                    {/if}
                                 {/if}
                             {/foreach}
                         {else}
diff --git a/Web/static/css/audios.css b/Web/static/css/audios.css
index 69e194b9..89bce6f5 100644
--- a/Web/static/css/audios.css
+++ b/Web/static/css/audios.css
@@ -52,7 +52,6 @@
     height: 46px;
 }
 
-/* кто прочитал тому не завидую */
 .bigPlayer .bigPlayerWrapper .absoluteButtons {
     position: absolute;
     bottom: 0;
diff --git a/Web/static/css/main.css b/Web/static/css/main.css
index ac2e5457..c4d0b6c0 100644
--- a/Web/static/css/main.css
+++ b/Web/static/css/main.css
@@ -4282,3 +4282,7 @@ hr {
     height: 30px;
     background-position-y: 9px;
 }
+
+.deleted_mark_average {
+    padding: 5px 61px;
+}