This repository has been archived on 2023-05-12. You can view files and clone it, but cannot push or open issues or pull requests.
media-host/views/partial/file-metadata-block.ejs

32 lines
2 KiB
Text

<div class="metadata">
<h2 class="nm"><%= name %></h2>
<% if (uploaderName !== "Anonymous") { %>
<h3 class="nm">Uploader: <a href="/u/<%= uploaderName %>"><%= uploaderName %></a></h3>
<% } else { %>
<% if (config["store-anon-ips"] == true && file.ip && account?.admin == true) { %>
<h3 class="nm">Uploader: Anonymous - IP: <code><%= file.ip %></code> [<a target="_blank" href="https://ip.me/ip/<%= file.ip %>">IP Information</a>] [<a href="/admin/block/ip?ip=<%= file.ip %>&reason=Uploaded%20content%20that%20violated%20TOS">Block IP</a>]</h3>
<% } else if (config["store-anon-ips"] == true && account?.admin == true) { %>
<h3 class="nm">Uploader: Anonymous - IP: <code>Unavailable</code></h3>
<% } else { %>
<h3 class="nm">Uploader: Anonymous</h3>
<% } %>
<% } %>
<noscript>
<h3 class="nm">
Upload Date:
<%= (new Date(file.date).getUTCMonth() + 1) %>/<%= new Date(file.date).getUTCDate() %>/<%= new Date(file.date).getUTCFullYear() %>
@
<% if (new Date(file.date).getUTCHours() >= 9) { %><%= new Date(file.date).getUTCHours() %>:<% } else { %>0<%= new Date(file.date).getUTCHours() %>:<% } %><% if (new Date(file.date).getUTCMinutes() >= 9) { %><%= new Date(file.date).getUTCMinutes() %>:<% } else { %>0<%= new Date(file.date).getUTCMinutes() %>:<% } %><% if (new Date(file.date).getUTCSeconds() >= 9) { %><%= new Date(file.date).getUTCSeconds() %><% } else { %>0<%= new Date(file.date).getUTCSeconds() %><% } %> (UTC)
</h3>
</noscript>
<h3 id="date" class="require-script nm" data-date="<%= file.date %>"></h3>
<h3 class="nm">Size: <%= file.humanSize %></h3><br>
<a href="/f/<%= file.id %>/raw"><button>Raw</button></a>
<a href="/f/<%= file.id %>/dl"><button>Download</button></a>
<% if (isOwned == true) { %>
<a href="/f/<%= file.id %>/rename"><button>Rename</button></a>
<a href="/f/<%= file.id %>/delete"><button>Remove</button></a>
<% } else { %>
<a href="/report?upload=<%= file.id %>"><button>Report</button></a>
<% } %>
</div>