v2: WZ01112 admin toggle
This commit is contained in:
+10
-1
@@ -11,7 +11,16 @@
|
||||
</style></head><body>
|
||||
<div class="bar">
|
||||
<span><strong>V2 IP WhiteList</strong> <small>v<%= version %></small></span>
|
||||
<span><%= user.email %> <% if (user.isAdmin) { %>| <a href="/v2/admin">ADMIN</a><% } %></span>
|
||||
<span>
|
||||
<% if (typeof canAdmin !== 'undefined' && canAdmin) { %>
|
||||
<form method="POST" action="/v2/toggle-admin" style="display:inline">
|
||||
<button style="font-size:.8rem;padding:.2rem .6rem;border:1px solid #ccc;border-radius:4px;background:<%= adminMode ? '#2563eb' : '#fff' %>;color:<%= adminMode ? '#fff' : '#333' %>;cursor:pointer;">
|
||||
<%= adminMode ? 'Выйти из админки' : 'Администратор' %>
|
||||
</button>
|
||||
</form>
|
||||
<% } %>
|
||||
<%= user.email %>
|
||||
</span>
|
||||
<span>
|
||||
<form method="GET" action="/v2/app" style="display:inline">
|
||||
<select name="switchTo" onchange="this.form.submit()">
|
||||
|
||||
Reference in New Issue
Block a user