Browse Source

Hide empty attachments in mail details

Alexey Edelev 4 years ago
parent
commit
e92cfe2638
1 changed files with 2 additions and 0 deletions
  1. 2 0
      web/templates/details.html

+ 2 - 0
web/templates/details.html

@@ -11,12 +11,14 @@
             <img id="deleteIcon" class="iconBtn" style="width: 20px; margin-right: 10px;" onclick="removeMail({{.MailId}}, closeDetails);" src="/assets/remove.svg"/>
             <img class="iconBtn" style="width: 20px; height: 20px; margin-left:10px;" onclick="closeDetails();" src="/assets/back.svg"/>
         </div>
+        {{if len .Attachments}}
         <div class="noselect" style="width: 100%; display: flex; flex-direction: row;">
             <img id="attachementIcon" style="width: 20px; height: 20px; margin-top: auto; margin-bottom: auto; margin-right: 5px;" src="/assets/attachments.svg"/>
             {{range .Attachments}}
                 <div class="attachment" onclick="downloadAttachment({{.Id}}, {{.FileName}})">{{.FileName}}</div>
             {{end}}
         </div>
+        {{end}}
     </div>
     <div id="mailBody" class="contentArea horizontalPaddingBox">
         <div style="position: relative; max-width: 100%; max-height: 100%; width: 100%; height: 100%;">