75 lines
No EOL
2.4 KiB
Text
75 lines
No EOL
2.4 KiB
Text
<%- include("../base/header", { title: "Account Dashboard", session }) %>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"></li>
|
|
<li class="breadcrumb-item" aria-current="page">Dashboard</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!-- Recent Uploads -->
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col text-start">Recent Uploads</div>
|
|
<div class="col text-end"><a aria-label="View All Uploads" href="/account/media">View All >></a></div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row row-cols-1">
|
|
<% for (const upload of recentUploads) { %>
|
|
<div class="col">
|
|
<div class="row flex-nowrap">
|
|
<div class="col-auto">
|
|
<% if (upload.MediaType.startsWith("image/")) { %>
|
|
<img src="<%= domains[upload.DomainId].HasHttps ? "https" : "http" %>://<%= domains[upload.DomainId].Domain %>/<%= upload.MediaTag %>" height="30" width="50">
|
|
<% } else { %>
|
|
<i class="bi bi-file-earmark"></i>
|
|
<% } %>
|
|
</div>
|
|
<div class="col"><a href="<%= domains[upload.DomainId].HasHttps ? "https" : "http" %>://<%= domains[upload.DomainId].Domain %>/<%= upload.MediaTag %>" target="_blank"><%= upload.FileName %></a></div>
|
|
</div>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Stats -->
|
|
<div class="col">
|
|
<div class="card mb-3">
|
|
<div class="card-header">Account</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col">
|
|
<a class="btn btn-primary" href="/account/information">Account Information</a>
|
|
<a class="btn btn-primary" href="/account/api">API</a>
|
|
<a class="btn btn-primary" href="/account/domains">Domains</a>
|
|
<a class="btn btn-primary" href="/account/media">Media</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">Stats</div>
|
|
<div class="card-body">
|
|
<p>Total Media: <%= FormattingUtility.NumberHumanReadable(mediaCount) %></p>
|
|
<p>Media By Type:</p>
|
|
<ol>
|
|
<% for (const mediaCount of mediaCounts) { %>
|
|
<li><b><%= mediaCount.Type %></b>: <%= FormattingUtility.NumberHumanReadable(mediaCount.Count) %></li>
|
|
<% } %>
|
|
</ol>
|
|
<p>Total size of Media: <%= FormattingUtility.NumberAsFileSize(mediaSize) %></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%- include("../base/footer") %> |