From: David ‘Bombe’ Roden Date: Fri, 31 Mar 2017 05:02:10 +0000 (+0200) Subject: Only show linked elements when they are loaded and not failed X-Git-Tag: 0.9.7^2~274 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3249f0c748b74751be5442d2591604f759202d90;p=Sone.git Only show linked elements when they are loaded and not failed --- diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index ed6e5cc..e3c9aec 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -37,13 +37,17 @@ <%if !shortText|match value=renderedText><%if !raw><%/if><%/if> <% parsedText|linked-elements sone=post.sone|store key==linkedElements> <% foreach linkedElements linkedElement> - <% first> -
- <%/first> - <% linkedElement|render-linked-element> - <% last> -
- <%/last> + <%if !linkedElement.loading> + <%if !linkedElement.failed> + <% first> +
+ <%/first> + <% linkedElement|render-linked-element> + <% last> +
+ <%/last> + <%/if> + <%/if> <%/foreach>
diff --git a/src/main/resources/templates/include/viewReply.html b/src/main/resources/templates/include/viewReply.html index 32fb73d..6aaf698 100644 --- a/src/main/resources/templates/include/viewReply.html +++ b/src/main/resources/templates/include/viewReply.html @@ -25,13 +25,17 @@ <%if !shortText|match value=renderedText><%if !raw><%/if><%/if> <% parsedText|linked-elements sone=reply.sone|store key==linkedElements> <% foreach linkedElements linkedElement> - <% first> -
- <%/first> - <% linkedElement|render-linked-element> - <% last> -
- <%/last> + <%if !linkedElement.loading> + <%if !linkedElement.failed> + <% first> +
+ <%/first> + <% linkedElement|render-linked-element> + <% last> +
+ <%/last> + <%/if> + <%/if> <%/foreach>