Add missing pending for terminal template

This commit is contained in:
lowlighter
2020-10-24 00:51:39 +02:00
parent ca0a6d559e
commit a19988f63e
3 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -58,8 +58,7 @@ Last generated: <%= new Date().toGMTString() %>
<b><%= `${user.watching.totalCount}`.padStart(5) %></b> repositor<%= s(user.watching.totalCount, "y") %> watched <b><%= `${user.watching.totalCount}`.padStart(5) %></b> repositor<%= s(user.watching.totalCount, "y") %> watched
<% if (computed.plugins.lines) { -%><% if (computed.plugins.lines.error) { -%> <% if (computed.plugins.lines) { -%><% if (computed.plugins.lines.error) { -%>
<span class="diff error">@@ <%= computed.plugins.lines.error %> @@</span> <span class="diff error">@@ <%= computed.plugins.lines.error %> @@</span><% } else { -%>
<% } else { -%>
<span class="diff">@@ -<%= computed.plugins.lines.deleted %> +<%= computed.plugins.lines.added %> @@</span> <span class="diff">@@ -<%= computed.plugins.lines.deleted %> +<%= computed.plugins.lines.added %> @@</span>
<% }} -%></div> <% }} -%></div>

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -6,19 +6,20 @@
//Common //Common
await common(...arguments) await common(...arguments)
const computed = data.computed const computed = data.computed
await Promise.all(pending)
//Compute image size //Compute image size
computed.svg = {height:640, width:480} computed.svg = {height:640, width:480}
if (computed.plugins.followup) if (computed.plugins.followup)
computed.svg.height += 100 + 32 computed.svg.height += 100
if (computed.plugins.lines) if (computed.plugins.lines)
computed.svg.height += 30 + 32 computed.svg.height += 30
if (computed.plugins.traffic) if (computed.plugins.traffic)
computed.svg.height += 16 + 32 computed.svg.height += 16
if (computed.plugins.pagespeed) if (computed.plugins.pagespeed)
computed.svg.height += 136 + 32 computed.svg.height += 136
if (computed.plugins.languages) if (computed.plugins.languages)
computed.svg.height += 170 + 32 computed.svg.height += 170
//Compute registration date //Compute registration date
const diff = (Date.now()-(new Date(data.user.createdAt)).getTime())/(365*24*60*60*1000) const diff = (Date.now()-(new Date(data.user.createdAt)).getTime())/(365*24*60*60*1000)