Merge pull request #1012 from BlackDex/admin-interface

Updated js/css libraries and fixed smallscreen err
pull/1014/head 1.15.0
Daniel García 5 years ago committed by GitHub
commit 1aa5e0d4dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,40 +1,26 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="robots" content="noindex,nofollow" />
<title>Bitwarden_rs Admin Panel</title> <title>Bitwarden_rs Admin Panel</title>
<link rel="stylesheet" href="{{urlpath}}/bwrs_static/bootstrap.css" /> <link rel="stylesheet" href="{{urlpath}}/bwrs_static/bootstrap.css" />
<script src="{{urlpath}}/bwrs_static/bootstrap-native-v4.js"></script>
<script src="{{urlpath}}/bwrs_static/md5.js"></script>
<script src="{{urlpath}}/bwrs_static/identicon.js"></script>
<style> <style>
body { body {
padding-top: 70px; padding-top: 75px;
}
@media (max-width:768px) {
body {
padding-top: 190px;
}
.container {
max-width: 100%;
}
} }
img { img {
width: 48px; width: 48px;
height: 48px; height: 48px;
} }
.navbar img { .navbar img {
height: 24px; height: 24px;
width: auto; width: auto;
} }
</style> </style>
<script src="{{urlpath}}/bwrs_static/md5.js"></script>
<script src="{{urlpath}}/bwrs_static/identicon.js"></script>
<script> <script>
function reload() { window.location.reload(); } function reload() { window.location.reload(); }
function msg(text, reload_page = true) { function msg(text, reload_page = true) {
@ -86,11 +72,16 @@
</head> </head>
<body class="bg-light"> <body class="bg-light">
<nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top shadow mb-4"> <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4 shadow fixed-top">
<div class="container"> <div class="container">
<a class="navbar-brand" href="{{urlpath}}/admin"><img class="pr-1" src="{{urlpath}}/bwrs_static/shield-white.png">Bitwarden_rs Admin</a> <a class="navbar-brand" href="{{urlpath}}/admin"><img class="pr-1" src="{{urlpath}}/bwrs_static/shield-white.png">Bitwarden_rs Admin</a>
<div class="navbar-collapse"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
<ul class="navbar-nav"> aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
{{#if logged_in}}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{urlpath}}/admin">Settings</a> <a class="nav-link" href="{{urlpath}}/admin">Settings</a>
</li> </li>
@ -103,30 +94,22 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{urlpath}}/admin/diagnostics">Diagnostics</a> <a class="nav-link" href="{{urlpath}}/admin/diagnostics">Diagnostics</a>
</li> </li>
{{/if}}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{urlpath}}/">Vault</a> <a class="nav-link" href="{{urlpath}}/">Vault</a>
</li> </li>
</ul> </ul>
</div>
<ul class="navbar-nav">
{{#if version}}
<li class="nav-item">
<span class="navbar-text mr-2">Version: {{version}}</span>
</li>
{{/if}}
{{#if logged_in}} {{#if logged_in}}
<li class="nav-item rounded btn-secondary"> <a class="btn btn-sm btn-secondary" href="{{urlpath}}/admin/logout">Log Out</a>
<a class="nav-link" href="{{urlpath}}/admin/logout">Log Out</a>
</li>
{{/if}} {{/if}}
</ul> </div>
</div> </div>
</nav> </nav>
{{> (page_content) }} {{> (page_content) }}
<!-- This script needs to be at the bottom, else it will fail! -->
<script> <script>
// get current URL path and assign 'active' class to the correct nav-item // get current URL path and assign 'active' class to the correct nav-item
(function () { (function () {
@ -138,6 +121,7 @@
} }
})(); })();
</script> </script>
<!-- This script needs to be at the bottom, else it will fail! -->
<script src="{{urlpath}}/bwrs_static/bootstrap-native-v4.js"></script>
</body> </body>
</html> </html>

@ -2,57 +2,61 @@
<div id="users-block" class="my-3 p-3 bg-white rounded shadow"> <div id="users-block" class="my-3 p-3 bg-white rounded shadow">
<h6 class="border-bottom pb-2 mb-0">Registered Users</h6> <h6 class="border-bottom pb-2 mb-0">Registered Users</h6>
<div id="users-list">
<div class="table-responsive-xl small">
<table class="table table-sm table-striped table-hover">
<thead>
<tr>
<th style="width: 24px;">User</th>
<th></th>
<th style="width:90px; min-width: 90px;">Items</th>
<th style="min-width: 140px;">Organizations</th>
<th style="width: 140px; min-width: 140px;">Actions</th>
</tr>
</thead>
<tbody>
{{#each users}} {{#each users}}
<div class="media pt-3"> <tr>
<img class="mr-2 rounded identicon" data-src="{{Email}}"> <td><img class="mr-2 rounded identicon" data-src="{{Email}}"></td>
<div class="media-body pb-3 mb-0 small border-bottom"> <td>
<div class="row justify-content-between">
<div class="col">
<strong>{{Name}}</strong> <strong>{{Name}}</strong>
<span class="d-block">{{Email}}</span>
<span class="d-block">
{{#if TwoFactorEnabled}} {{#if TwoFactorEnabled}}
<span class="badge badge-success ml-2">2FA</span> <span class="badge badge-success mr-2" title="2FA is enabled">2FA</span>
{{/if}} {{/if}}
{{#case _Status 1}} {{#case _Status 1}}
<span class="badge badge-warning ml-2">Invited</span> <span class="badge badge-warning mr-2" title="User is invited">Invited</span>
{{/case}} {{/case}}
<span class="d-block">{{Email}}
{{#if EmailVerified}} {{#if EmailVerified}}
<span class="badge badge-success ml-2">Verified</span> <span class="badge badge-success mr-2" title="Email has been verified">Verified</span>
{{/if}} {{/if}}
</span> </span>
</div> </td>
<div class="col"> <td>
<strong> Personal Items: </strong> <span class="d-block">{{cipher_count}}</span>
<span class="d-block"> </td>
{{cipher_count}} <td>
</span>
</div>
<div class="col-4">
<strong> Organizations: </strong>
<span class="d-block">
{{#each Organizations}} {{#each Organizations}}
<span class="badge badge-primary" data-orgtype="{{Type}}">{{Name}}</span> <span class="badge badge-primary" data-orgtype="{{Type}}">{{Name}}</span>
{{/each}} {{/each}}
</span> </td>
</div> <td style="font-size: 90%; text-align: right; padding-right: 15px">
<div class="col" style="font-size: 90%; text-align: right; padding-right: 15px">
{{#if TwoFactorEnabled}} {{#if TwoFactorEnabled}}
<a class="mr-2" href="#" onclick='remove2fa({{jsesc Id}})'>Remove all 2FA</a> <a class="d-block" href="#" onclick='remove2fa({{jsesc Id}})'>Remove all 2FA</a>
{{/if}} {{/if}}
<a class="d-block" href="#" onclick='deauthUser({{jsesc Id}})'>Deauthorize sessions</a>
<a class="mr-2" href="#" onclick='deauthUser({{jsesc Id}})'>Deauthorize sessions</a> <a class="d-block" href="#" onclick='deleteUser({{jsesc Id}}, {{jsesc Email}})'>Delete User</a>
<a class="mr-2" href="#" onclick='deleteUser({{jsesc Id}}, {{jsesc Email}})'>Delete User</a> </td>
</div> </tr>
</div>
</div>
</div>
{{/each}} {{/each}}
</tbody>
</table>
</div> </div>
<div class="mt-3"> <div class="mt-3">
<button type="button" class="btn btn-sm btn-link" onclick="updateRevisions();" <button type="button" class="btn btn-sm btn-danger" onclick="updateRevisions();"
title="Force all clients to fetch new data next time they connect. Useful after restoring a backup to remove any stale data."> title="Force all clients to fetch new data next time they connect. Useful after restoring a backup to remove any stale data.">
Force clients to resync Force clients to resync
</button> </button>

Loading…
Cancel
Save