mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-13 20:15:58 +03:00
Update dependencies for Rust and Admin interface.
- Updated Rust deps and one small change regarding chrono - Updated bootstrap 5 css - Updated datatables - Replaced identicon.js with jdenticon. identicon.js is unmaintained ( https://github.com/stewartlord/identicon.js/issues/52 ) The icon's are very different, but nice. It also doesn't need custom code to find and update the icons our selfs.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
border: var(--bs-alert-border);
|
||||
}
|
||||
</style>
|
||||
<script src="{{urlpath}}/vw_static/identicon.js"></script>
|
||||
<script src="{{urlpath}}/vw_static/jdenticon.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
@@ -45,11 +45,6 @@
|
||||
const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
return hashHex;
|
||||
}
|
||||
async function identicon(email) {
|
||||
const hash = await sha256(email);
|
||||
const data = new Identicon(hash, { size: 48, format: 'svg' });
|
||||
return "data:image/svg+xml;base64," + data.toString();
|
||||
}
|
||||
function toggleVis(input_id) {
|
||||
const elem = document.getElementById(input_id);
|
||||
const type = elem.getAttribute("type");
|
||||
|
@@ -16,7 +16,7 @@
|
||||
{{#each page_data}}
|
||||
<tr>
|
||||
<td>
|
||||
<img class="float-start me-2 rounded identicon" data-src="{{Id}}">
|
||||
<svg width="48" height="48" class="float-start me-2 rounded" data-jdenticon-value="{{Id}}">
|
||||
<div class="float-start">
|
||||
<strong>{{Name}}</strong>
|
||||
<span class="me-2">({{BillingEmail}})</span>
|
||||
@@ -73,12 +73,6 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
(async () => {
|
||||
for (let e of document.querySelectorAll("img.identicon")) {
|
||||
e.src = await identicon(e.dataset.src);
|
||||
}
|
||||
})();
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
$('#orgs-table').DataTable({
|
||||
"responsive": true,
|
||||
|
@@ -19,7 +19,7 @@
|
||||
{{#each page_data}}
|
||||
<tr>
|
||||
<td>
|
||||
<img class="float-start me-2 rounded identicon" data-src="{{Email}}">
|
||||
<svg width="48" height="48" class="float-start me-2 rounded" data-jdenticon-value="{{Email}}">
|
||||
<div class="float-start">
|
||||
<strong>{{Name}}</strong>
|
||||
<span class="d-block">{{Email}}</span>
|
||||
@@ -206,12 +206,6 @@
|
||||
"3": { "name": "Manager", "color": "green" },
|
||||
};
|
||||
|
||||
(async () => {
|
||||
for (let e of document.querySelectorAll("img.identicon")) {
|
||||
e.src = await identicon(e.dataset.src);
|
||||
}
|
||||
})();
|
||||
|
||||
document.querySelectorAll("[data-orgtype]").forEach(function (e) {
|
||||
let orgtype = OrgTypes[e.dataset.orgtype];
|
||||
e.style.backgroundColor = orgtype.color;
|
||||
|
Reference in New Issue
Block a user