62 lines
2.4 KiB
Text
62 lines
2.4 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title><%= user.username %> - <%- config["meta"]["name"] %></title>
|
|
<meta property="og:site_name" content="<%= config.meta.name %>">
|
|
|
|
<meta name="title" content="<%= user.username %>'s files on <%= config.meta.name %>">
|
|
<meta property="og:title" content="<%= user.username %>'s files on <%= config.meta.name %>">
|
|
<meta property="twitter:title" content="<%= user.username %>'s files on <%= config.meta.name %>">
|
|
|
|
<meta property="og:type" content="website">
|
|
<%- include("../partial/html-head")%>
|
|
</head>
|
|
<body>
|
|
<%- include("../partial/header") %>
|
|
<div class="modal">
|
|
<% if (config.alert) { %>
|
|
<div class="err"><p><%-config.alert%></p></div>
|
|
<% } %>
|
|
<h2 class="nm"><%= user.username %></h2>
|
|
<% if (user.admin == true) { %>
|
|
<p class="nm">Admin</p>
|
|
<% } %>
|
|
<h2 class="nmb">Uploads</h2>
|
|
<% if (!uploads[0]) { %>
|
|
<p class="nm">No uploads.</p>
|
|
<% } %>
|
|
<% for (var c in uploads) { %>
|
|
<div class="oneliner">
|
|
<p class="nm">
|
|
<a href="/f/<%= uploads[c].id %>"><%= uploads[c].name %></a>
|
|
<% if (!uploads[c].privacy || uploads[c].privacy == 0) { %>
|
|
(Unlisted)
|
|
<% } else { %>
|
|
(Public)
|
|
<% } %>
|
|
</p>
|
|
</div>
|
|
<% } %>
|
|
<% if (typeof account == "object" && account !== null) { %>
|
|
<div style="margin-top: 5px; width: 100%;">
|
|
<br>
|
|
<% if (account.admin) { %>
|
|
<h2 class="nm">Admin Actions</h2>
|
|
<a href="/admin/kill/<%= user.username %>"><button>Kill account</button></a>
|
|
<% if (user.admin !== true) { %>
|
|
<a href="/admin/promote/<%= user.username %>"><button>Make this user an admin</button></a>
|
|
<% } else { %>
|
|
<a href="/admin/demote/<%= user.username %>"><button>Demote this user to a regular user</button></a>
|
|
<% } %>
|
|
<% } %>
|
|
<% if (account._id.toString() == user._id.toString() && !account.admin) { %>
|
|
<h2 class="nm">Account Actions</h2>
|
|
<a href="/account/delete"><button>Delete your account</button></a>
|
|
<a href="/account/rename"><button>Rename your account</button></a>
|
|
<% } %>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
<%- include("../partial/footer") %>
|
|
</body>
|
|
</html> |