mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-18 17:43:57 +00: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:
parent
c0e3c2c5e1
commit
7b09d74b1f
11 changed files with 1756 additions and 497 deletions
|
@ -98,7 +98,7 @@ pub fn static_files(filename: String) -> Result<(ContentType, &'static [u8]), Er
|
|||
"vaultwarden-icon.png" => Ok((ContentType::PNG, include_bytes!("../static/images/vaultwarden-icon.png"))),
|
||||
"bootstrap.css" => Ok((ContentType::CSS, include_bytes!("../static/scripts/bootstrap.css"))),
|
||||
"bootstrap-native.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/bootstrap-native.js"))),
|
||||
"identicon.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/identicon.js"))),
|
||||
"jdenticon.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/jdenticon.js"))),
|
||||
"datatables.js" => Ok((ContentType::JavaScript, include_bytes!("../static/scripts/datatables.js"))),
|
||||
"datatables.css" => Ok((ContentType::CSS, include_bytes!("../static/scripts/datatables.css"))),
|
||||
"jquery-3.6.1.slim.js" => {
|
||||
|
|
199
src/static/scripts/bootstrap.css
vendored
199
src/static/scripts/bootstrap.css
vendored
|
@ -1,6 +1,6 @@
|
|||
@charset "UTF-8";
|
||||
/*!
|
||||
* Bootstrap v5.2.0 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
|
@ -2468,6 +2468,7 @@ textarea.form-control-lg {
|
|||
height: 100%;
|
||||
padding: 1rem 0.75rem;
|
||||
overflow: hidden;
|
||||
text-align: start;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
|
@ -2547,14 +2548,14 @@ textarea.form-control-lg {
|
|||
.input-group > .form-control:focus,
|
||||
.input-group > .form-select:focus,
|
||||
.input-group > .form-floating:focus-within {
|
||||
z-index: 3;
|
||||
z-index: 5;
|
||||
}
|
||||
.input-group .btn {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.input-group .btn:focus {
|
||||
z-index: 3;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
|
@ -2609,10 +2610,13 @@ textarea.form-control-lg {
|
|||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.input-group > :not(:first-child):not(.dropdown-menu):not(.form-floating):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback),
|
||||
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
|
||||
margin-left: -1px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.input-group > .form-floating:not(:first-child) > .form-control,
|
||||
.input-group > .form-floating:not(:first-child) > .form-select {
|
||||
margin-left: -1px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -2699,14 +2703,11 @@ textarea.form-control-lg {
|
|||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid,
|
||||
.was-validated .input-group .form-select:valid,
|
||||
.input-group .form-select.is-valid {
|
||||
z-index: 1;
|
||||
}
|
||||
.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus,
|
||||
.was-validated .input-group .form-select:valid:focus,
|
||||
.input-group .form-select.is-valid:focus {
|
||||
.was-validated .input-group > .form-control:not(:focus):valid, .input-group > .form-control:not(:focus).is-valid,
|
||||
.was-validated .input-group > .form-select:not(:focus):valid,
|
||||
.input-group > .form-select:not(:focus).is-valid,
|
||||
.was-validated .input-group > .form-floating:not(:focus-within):valid,
|
||||
.input-group > .form-floating:not(:focus-within).is-valid {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
|
@ -2792,15 +2793,12 @@ textarea.form-control-lg {
|
|||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid,
|
||||
.was-validated .input-group .form-select:invalid,
|
||||
.input-group .form-select.is-invalid {
|
||||
z-index: 2;
|
||||
}
|
||||
.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus,
|
||||
.was-validated .input-group .form-select:invalid:focus,
|
||||
.input-group .form-select.is-invalid:focus {
|
||||
z-index: 3;
|
||||
.was-validated .input-group > .form-control:not(:focus):invalid, .input-group > .form-control:not(:focus).is-invalid,
|
||||
.was-validated .input-group > .form-select:not(:focus):invalid,
|
||||
.input-group > .form-select:not(:focus).is-invalid,
|
||||
.was-validated .input-group > .form-floating:not(:focus-within):invalid,
|
||||
.input-group > .form-floating:not(:focus-within).is-invalid {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
@ -2815,6 +2813,7 @@ textarea.form-control-lg {
|
|||
--bs-btn-border-width: 1px;
|
||||
--bs-btn-border-color: transparent;
|
||||
--bs-btn-border-radius: 0.375rem;
|
||||
--bs-btn-hover-border-color: transparent;
|
||||
--bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
--bs-btn-disabled-opacity: 0.65;
|
||||
--bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);
|
||||
|
@ -2847,19 +2846,29 @@ textarea.form-control-lg {
|
|||
background-color: var(--bs-btn-hover-bg);
|
||||
border-color: var(--bs-btn-hover-border-color);
|
||||
}
|
||||
.btn-check:focus + .btn, .btn:focus {
|
||||
.btn-check + .btn:hover {
|
||||
color: var(--bs-btn-color);
|
||||
background-color: var(--bs-btn-bg);
|
||||
border-color: var(--bs-btn-border-color);
|
||||
}
|
||||
.btn:focus-visible {
|
||||
color: var(--bs-btn-hover-color);
|
||||
background-color: var(--bs-btn-hover-bg);
|
||||
border-color: var(--bs-btn-hover-border-color);
|
||||
outline: 0;
|
||||
box-shadow: var(--bs-btn-focus-box-shadow);
|
||||
}
|
||||
.btn-check:checked + .btn, .btn-check:active + .btn, .btn:active, .btn.active, .btn.show {
|
||||
.btn-check:focus-visible + .btn {
|
||||
border-color: var(--bs-btn-hover-border-color);
|
||||
outline: 0;
|
||||
box-shadow: var(--bs-btn-focus-box-shadow);
|
||||
}
|
||||
.btn-check:checked + .btn, :not(.btn-check) + .btn:active, .btn:first-child:active, .btn.active, .btn.show {
|
||||
color: var(--bs-btn-active-color);
|
||||
background-color: var(--bs-btn-active-bg);
|
||||
border-color: var(--bs-btn-active-border-color);
|
||||
}
|
||||
.btn-check:checked + .btn:focus, .btn-check:active + .btn:focus, .btn:active:focus, .btn.active:focus, .btn.show:focus {
|
||||
.btn-check:checked + .btn:focus-visible, :not(.btn-check) + .btn:active:focus-visible, .btn:first-child:active:focus-visible, .btn.active:focus-visible, .btn.show:focus-visible {
|
||||
box-shadow: var(--bs-btn-focus-box-shadow);
|
||||
}
|
||||
.btn:disabled, .btn.disabled, fieldset:disabled .btn {
|
||||
|
@ -3157,7 +3166,7 @@ textarea.form-control-lg {
|
|||
--bs-btn-focus-shadow-rgb: 49, 132, 253;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.btn-link:focus {
|
||||
.btn-link:focus-visible {
|
||||
color: var(--bs-btn-color);
|
||||
}
|
||||
.btn-link:hover {
|
||||
|
@ -3242,6 +3251,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.dropdown-menu {
|
||||
--bs-dropdown-zindex: 1000;
|
||||
--bs-dropdown-min-width: 10rem;
|
||||
--bs-dropdown-padding-x: 0;
|
||||
--bs-dropdown-padding-y: 0.5rem;
|
||||
|
@ -3268,7 +3278,7 @@ textarea.form-control-lg {
|
|||
--bs-dropdown-header-padding-x: 1rem;
|
||||
--bs-dropdown-header-padding-y: 0.5rem;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
z-index: var(--bs-dropdown-zindex);
|
||||
display: none;
|
||||
min-width: var(--bs-dropdown-min-width);
|
||||
padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);
|
||||
|
@ -3568,7 +3578,7 @@ textarea.form-control-lg {
|
|||
.btn-group {
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
.btn-group > .btn:not(:first-child),
|
||||
.btn-group > :not(.btn-check:first-child) + .btn,
|
||||
.btn-group > .btn-group:not(:first-child) {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
@ -3678,7 +3688,7 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color);
|
||||
}
|
||||
.nav-tabs .nav-link {
|
||||
margin-bottom: calc(var(--bs-nav-tabs-border-width) * -1);
|
||||
margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width));
|
||||
background: none;
|
||||
border: var(--bs-nav-tabs-border-width) solid transparent;
|
||||
border-top-left-radius: var(--bs-nav-tabs-border-radius);
|
||||
|
@ -3700,7 +3710,7 @@ textarea.form-control-lg {
|
|||
border-color: var(--bs-nav-tabs-link-active-border-color);
|
||||
}
|
||||
.nav-tabs .dropdown-menu {
|
||||
margin-top: calc(var(--bs-nav-tabs-border-width) * -1);
|
||||
margin-top: calc(-1 * var(--bs-nav-tabs-border-width));
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
@ -4357,7 +4367,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.accordion {
|
||||
--bs-accordion-color: #000;
|
||||
--bs-accordion-color: #212529;
|
||||
--bs-accordion-bg: #fff;
|
||||
--bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
|
||||
--bs-accordion-border-color: var(--bs-border-color);
|
||||
|
@ -4366,9 +4376,9 @@ textarea.form-control-lg {
|
|||
--bs-accordion-inner-border-radius: calc(0.375rem - 1px);
|
||||
--bs-accordion-btn-padding-x: 1.25rem;
|
||||
--bs-accordion-btn-padding-y: 1rem;
|
||||
--bs-accordion-btn-color: var(--bs-body-color);
|
||||
--bs-accordion-btn-color: #212529;
|
||||
--bs-accordion-btn-bg: var(--bs-accordion-bg);
|
||||
--bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--bs-body-color%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
|
||||
--bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
|
||||
--bs-accordion-btn-icon-width: 1.25rem;
|
||||
--bs-accordion-btn-icon-transform: rotate(-180deg);
|
||||
--bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
|
||||
|
@ -4404,7 +4414,7 @@ textarea.form-control-lg {
|
|||
.accordion-button:not(.collapsed) {
|
||||
color: var(--bs-accordion-active-color);
|
||||
background-color: var(--bs-accordion-active-bg);
|
||||
box-shadow: inset 0 calc(var(--bs-accordion-border-width) * -1) 0 var(--bs-accordion-border-color);
|
||||
box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
|
||||
}
|
||||
.accordion-button:not(.collapsed)::after {
|
||||
background-image: var(--bs-accordion-btn-active-icon);
|
||||
|
@ -4487,7 +4497,7 @@ textarea.form-control-lg {
|
|||
.accordion-flush .accordion-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.accordion-flush .accordion-item .accordion-button {
|
||||
.accordion-flush .accordion-item .accordion-button, .accordion-flush .accordion-item .accordion-button.collapsed {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
@ -4753,12 +4763,6 @@ textarea.form-control-lg {
|
|||
color: #101214;
|
||||
}
|
||||
|
||||
@-webkit-keyframes progress-bar-stripes {
|
||||
0% {
|
||||
background-position-x: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress-bar-stripes {
|
||||
0% {
|
||||
background-position-x: 1rem;
|
||||
|
@ -4804,12 +4808,10 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.progress-bar-animated {
|
||||
-webkit-animation: 1s linear infinite progress-bar-stripes;
|
||||
animation: 1s linear infinite progress-bar-stripes;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.progress-bar-animated {
|
||||
-webkit-animation: none;
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
@ -4896,18 +4898,18 @@ textarea.form-control-lg {
|
|||
border-top-width: 0;
|
||||
}
|
||||
.list-group-item + .list-group-item.active {
|
||||
margin-top: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-top: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-top-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
|
||||
.list-group-horizontal {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal > .list-group-item:first-child {
|
||||
.list-group-horizontal > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal > .list-group-item:last-child {
|
||||
.list-group-horizontal > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -4919,7 +4921,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
|
||||
|
@ -4927,11 +4929,11 @@ textarea.form-control-lg {
|
|||
.list-group-horizontal-sm {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal-sm > .list-group-item:first-child {
|
||||
.list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal-sm > .list-group-item:last-child {
|
||||
.list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -4943,7 +4945,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal-sm > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
}
|
||||
|
@ -4951,11 +4953,11 @@ textarea.form-control-lg {
|
|||
.list-group-horizontal-md {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal-md > .list-group-item:first-child {
|
||||
.list-group-horizontal-md > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal-md > .list-group-item:last-child {
|
||||
.list-group-horizontal-md > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -4967,7 +4969,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal-md > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
}
|
||||
|
@ -4975,11 +4977,11 @@ textarea.form-control-lg {
|
|||
.list-group-horizontal-lg {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal-lg > .list-group-item:first-child {
|
||||
.list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal-lg > .list-group-item:last-child {
|
||||
.list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -4991,7 +4993,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal-lg > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
}
|
||||
|
@ -4999,11 +5001,11 @@ textarea.form-control-lg {
|
|||
.list-group-horizontal-xl {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal-xl > .list-group-item:first-child {
|
||||
.list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal-xl > .list-group-item:last-child {
|
||||
.list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -5015,7 +5017,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal-xl > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
}
|
||||
|
@ -5023,11 +5025,11 @@ textarea.form-control-lg {
|
|||
.list-group-horizontal-xxl {
|
||||
flex-direction: row;
|
||||
}
|
||||
.list-group-horizontal-xxl > .list-group-item:first-child {
|
||||
.list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) {
|
||||
border-bottom-left-radius: var(--bs-list-group-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.list-group-horizontal-xxl > .list-group-item:last-child {
|
||||
.list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) {
|
||||
border-top-right-radius: var(--bs-list-group-border-radius);
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -5039,7 +5041,7 @@ textarea.form-control-lg {
|
|||
border-left-width: 0;
|
||||
}
|
||||
.list-group-horizontal-xxl > .list-group-item + .list-group-item.active {
|
||||
margin-left: calc(var(--bs-list-group-border-width) * -1);
|
||||
margin-left: calc(-1 * var(--bs-list-group-border-width));
|
||||
border-left-width: var(--bs-list-group-border-width);
|
||||
}
|
||||
}
|
||||
|
@ -5199,6 +5201,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.toast {
|
||||
--bs-toast-zindex: 1090;
|
||||
--bs-toast-padding-x: 0.75rem;
|
||||
--bs-toast-padding-y: 0.5rem;
|
||||
--bs-toast-spacing: 1.5rem;
|
||||
|
@ -5232,8 +5235,9 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.toast-container {
|
||||
--bs-toast-zindex: 1090;
|
||||
position: absolute;
|
||||
z-index: 1090;
|
||||
z-index: var(--bs-toast-zindex);
|
||||
width: -webkit-max-content;
|
||||
width: -moz-max-content;
|
||||
width: max-content;
|
||||
|
@ -5256,7 +5260,7 @@ textarea.form-control-lg {
|
|||
border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));
|
||||
}
|
||||
.toast-header .btn-close {
|
||||
margin-right: calc(var(--bs-toast-padding-x) * -0.5);
|
||||
margin-right: calc(-0.5 * var(--bs-toast-padding-x));
|
||||
margin-left: var(--bs-toast-padding-x);
|
||||
}
|
||||
|
||||
|
@ -5383,7 +5387,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
.modal-header .btn-close {
|
||||
padding: calc(var(--bs-modal-header-padding-y) * 0.5) calc(var(--bs-modal-header-padding-x) * 0.5);
|
||||
margin: calc(var(--bs-modal-header-padding-y) * -0.5) calc(var(--bs-modal-header-padding-x) * -0.5) calc(var(--bs-modal-header-padding-y) * -0.5) auto;
|
||||
margin: calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) calc(-0.5 * var(--bs-modal-header-padding-y)) auto;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
|
@ -5673,7 +5677,7 @@ textarea.form-control-lg {
|
|||
--bs-popover-header-padding-x: 1rem;
|
||||
--bs-popover-header-padding-y: 0.5rem;
|
||||
--bs-popover-header-font-size: 1rem;
|
||||
--bs-popover-header-color: var(--bs-heading-color);
|
||||
--bs-popover-header-color: ;
|
||||
--bs-popover-header-bg: #f0f0f0;
|
||||
--bs-popover-body-padding-x: 1rem;
|
||||
--bs-popover-body-padding-y: 1rem;
|
||||
|
@ -5720,7 +5724,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow {
|
||||
bottom: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width));
|
||||
bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));
|
||||
}
|
||||
.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before, .bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after {
|
||||
border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0;
|
||||
|
@ -5736,7 +5740,7 @@ textarea.form-control-lg {
|
|||
|
||||
/* rtl:begin:ignore */
|
||||
.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow {
|
||||
left: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width));
|
||||
left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));
|
||||
width: var(--bs-popover-arrow-height);
|
||||
height: var(--bs-popover-arrow-width);
|
||||
}
|
||||
|
@ -5754,7 +5758,7 @@ textarea.form-control-lg {
|
|||
|
||||
/* rtl:end:ignore */
|
||||
.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow {
|
||||
top: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width));
|
||||
top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));
|
||||
}
|
||||
.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before, .bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after {
|
||||
border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height);
|
||||
|
@ -5773,14 +5777,14 @@ textarea.form-control-lg {
|
|||
left: 50%;
|
||||
display: block;
|
||||
width: var(--bs-popover-arrow-width);
|
||||
margin-left: calc(var(--bs-popover-arrow-width) * -0.5);
|
||||
margin-left: calc(-0.5 * var(--bs-popover-arrow-width));
|
||||
content: "";
|
||||
border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg);
|
||||
}
|
||||
|
||||
/* rtl:begin:ignore */
|
||||
.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow {
|
||||
right: calc(var(--bs-popover-arrow-height) * -1 - var(--bs-popover-border-width));
|
||||
right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));
|
||||
width: var(--bs-popover-arrow-height);
|
||||
height: var(--bs-popover-arrow-width);
|
||||
}
|
||||
|
@ -5857,7 +5861,6 @@ textarea.form-control-lg {
|
|||
display: block;
|
||||
}
|
||||
|
||||
/* rtl:begin:ignore */
|
||||
.carousel-item-next:not(.carousel-item-start),
|
||||
.active.carousel-item-end {
|
||||
transform: translateX(100%);
|
||||
|
@ -5868,7 +5871,6 @@ textarea.form-control-lg {
|
|||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
/* rtl:end:ignore */
|
||||
.carousel-fade .carousel-item {
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
|
@ -6030,16 +6032,9 @@ textarea.form-control-lg {
|
|||
height: var(--bs-spinner-height);
|
||||
vertical-align: var(--bs-spinner-vertical-align);
|
||||
border-radius: 50%;
|
||||
-webkit-animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);
|
||||
animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);
|
||||
}
|
||||
|
||||
@-webkit-keyframes spinner-border {
|
||||
to {
|
||||
transform: rotate(360deg) /* rtl:ignore */;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinner-border {
|
||||
to {
|
||||
transform: rotate(360deg) /* rtl:ignore */;
|
||||
|
@ -6062,16 +6057,6 @@ textarea.form-control-lg {
|
|||
--bs-spinner-border-width: 0.2em;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spinner-grow {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinner-grow {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
|
@ -6103,6 +6088,7 @@ textarea.form-control-lg {
|
|||
}
|
||||
}
|
||||
.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm {
|
||||
--bs-offcanvas-zindex: 1045;
|
||||
--bs-offcanvas-width: 400px;
|
||||
--bs-offcanvas-height: 30vh;
|
||||
--bs-offcanvas-padding-x: 1rem;
|
||||
|
@ -6118,7 +6104,7 @@ textarea.form-control-lg {
|
|||
.offcanvas-sm {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6206,7 +6192,7 @@ textarea.form-control-lg {
|
|||
.offcanvas-md {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6294,7 +6280,7 @@ textarea.form-control-lg {
|
|||
.offcanvas-lg {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6382,7 +6368,7 @@ textarea.form-control-lg {
|
|||
.offcanvas-xl {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6470,7 +6456,7 @@ textarea.form-control-lg {
|
|||
.offcanvas-xxl {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6557,7 +6543,7 @@ textarea.form-control-lg {
|
|||
.offcanvas {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 1045;
|
||||
z-index: var(--bs-offcanvas-zindex);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%;
|
||||
|
@ -6635,9 +6621,9 @@ textarea.form-control-lg {
|
|||
}
|
||||
.offcanvas-header .btn-close {
|
||||
padding: calc(var(--bs-offcanvas-padding-y) * 0.5) calc(var(--bs-offcanvas-padding-x) * 0.5);
|
||||
margin-top: calc(var(--bs-offcanvas-padding-y) * -0.5);
|
||||
margin-right: calc(var(--bs-offcanvas-padding-x) * -0.5);
|
||||
margin-bottom: calc(var(--bs-offcanvas-padding-y) * -0.5);
|
||||
margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y));
|
||||
margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x));
|
||||
margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y));
|
||||
}
|
||||
|
||||
.offcanvas-title {
|
||||
|
@ -6677,16 +6663,9 @@ textarea.form-control-lg {
|
|||
}
|
||||
|
||||
.placeholder-glow .placeholder {
|
||||
-webkit-animation: placeholder-glow 2s ease-in-out infinite;
|
||||
animation: placeholder-glow 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes placeholder-glow {
|
||||
50% {
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes placeholder-glow {
|
||||
50% {
|
||||
opacity: 0.2;
|
||||
|
@ -6697,17 +6676,9 @@ textarea.form-control-lg {
|
|||
mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%);
|
||||
-webkit-mask-size: 200% 100%;
|
||||
mask-size: 200% 100%;
|
||||
-webkit-animation: placeholder-wave 2s linear infinite;
|
||||
animation: placeholder-wave 2s linear infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes placeholder-wave {
|
||||
100% {
|
||||
-webkit-mask-position: -200% 0%;
|
||||
mask-position: -200% 0%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes placeholder-wave {
|
||||
100% {
|
||||
-webkit-mask-position: -200% 0%;
|
||||
|
|
16
src/static/scripts/datatables.css
vendored
16
src/static/scripts/datatables.css
vendored
|
@ -4,10 +4,10 @@
|
|||
*
|
||||
* To rebuild or modify this file with the latest versions of the included
|
||||
* software please visit:
|
||||
* https://datatables.net/download/#bs5/dt-1.12.1
|
||||
* https://datatables.net/download/#bs5/dt-1.13.1
|
||||
*
|
||||
* Included libraries:
|
||||
* DataTables 1.12.1
|
||||
* DataTables 1.13.1
|
||||
*/
|
||||
|
||||
@charset "UTF-8";
|
||||
|
@ -63,7 +63,7 @@ table.dataTable thead > tr > td.sorting_desc_disabled:after {
|
|||
opacity: 0.125;
|
||||
right: 10px;
|
||||
line-height: 9px;
|
||||
font-size: 0.9em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before,
|
||||
table.dataTable thead > tr > td.sorting:before,
|
||||
|
@ -72,7 +72,7 @@ table.dataTable thead > tr > td.sorting_desc:before,
|
|||
table.dataTable thead > tr > td.sorting_asc_disabled:before,
|
||||
table.dataTable thead > tr > td.sorting_desc_disabled:before {
|
||||
bottom: 50%;
|
||||
content: "▴";
|
||||
content: "▲";
|
||||
}
|
||||
table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after,
|
||||
table.dataTable thead > tr > td.sorting:after,
|
||||
|
@ -81,7 +81,7 @@ table.dataTable thead > tr > td.sorting_desc:after,
|
|||
table.dataTable thead > tr > td.sorting_asc_disabled:after,
|
||||
table.dataTable thead > tr > td.sorting_desc_disabled:after {
|
||||
top: 50%;
|
||||
content: "▾";
|
||||
content: "▼";
|
||||
}
|
||||
table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after,
|
||||
table.dataTable thead > tr > td.sorting_asc:before,
|
||||
|
@ -287,6 +287,9 @@ table.dataTable > tbody > tr.selected > * {
|
|||
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.9);
|
||||
color: white;
|
||||
}
|
||||
table.dataTable > tbody > tr.selected a {
|
||||
color: #090a0b;
|
||||
}
|
||||
table.dataTable.table-striped > tbody > tr.odd > * {
|
||||
box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
@ -335,6 +338,9 @@ div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
|||
white-space: nowrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
div.dataTables_wrapper div.dt-row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
margin-bottom: 0 !important;
|
||||
|
|
117
src/static/scripts/datatables.js
vendored
117
src/static/scripts/datatables.js
vendored
|
@ -4,20 +4,20 @@
|
|||
*
|
||||
* To rebuild or modify this file with the latest versions of the included
|
||||
* software please visit:
|
||||
* https://datatables.net/download/#bs5/dt-1.12.1
|
||||
* https://datatables.net/download/#bs5/dt-1.13.1
|
||||
*
|
||||
* Included libraries:
|
||||
* DataTables 1.12.1
|
||||
* DataTables 1.13.1
|
||||
*/
|
||||
|
||||
/*! DataTables 1.12.1
|
||||
/*! DataTables 1.13.1
|
||||
* ©2008-2022 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary DataTables
|
||||
* @description Paginate, search and order HTML tables
|
||||
* @version 1.12.1
|
||||
* @version 1.13.1
|
||||
* @author SpryMedia Ltd
|
||||
* @contact www.datatables.net
|
||||
* @copyright SpryMedia Ltd.
|
||||
|
@ -1162,6 +1162,10 @@
|
|||
$( rowOne[0] ).children('th, td').each( function (i, cell) {
|
||||
var col = oSettings.aoColumns[i];
|
||||
|
||||
if (! col) {
|
||||
_fnLog( oSettings, 0, 'Incorrect column count', 18 );
|
||||
}
|
||||
|
||||
if ( col.mData === i ) {
|
||||
var sort = a( cell, 'sort' ) || a( cell, 'order' );
|
||||
var filter = a( cell, 'filter' ) || a( cell, 'search' );
|
||||
|
@ -3166,6 +3170,11 @@
|
|||
create = nTrIn ? false : true;
|
||||
|
||||
nTd = create ? document.createElement( oCol.sCellType ) : anTds[i];
|
||||
|
||||
if (! nTd) {
|
||||
_fnLog( oSettings, 0, 'Incorrect column count', 18 );
|
||||
}
|
||||
|
||||
nTd._DT_CellIndex = {
|
||||
row: iRow,
|
||||
column: i
|
||||
|
@ -3316,10 +3325,16 @@
|
|||
|
||||
for ( i=0, ien=cells.length ; i<ien ; i++ ) {
|
||||
column = columns[i];
|
||||
column.nTf = cells[i].cell;
|
||||
|
||||
if ( column.sClass ) {
|
||||
$(column.nTf).addClass( column.sClass );
|
||||
if (column) {
|
||||
column.nTf = cells[i].cell;
|
||||
|
||||
if ( column.sClass ) {
|
||||
$(column.nTf).addClass( column.sClass );
|
||||
}
|
||||
}
|
||||
else {
|
||||
_fnLog( oSettings, 0, 'Incorrect column count', 18 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5079,6 +5094,10 @@
|
|||
_fnDraw( settings );
|
||||
}
|
||||
}
|
||||
else {
|
||||
// No change event - paging was called, but no change
|
||||
_fnCallbackFire( settings, null, 'page-nc', [settings] );
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
@ -8334,8 +8353,12 @@
|
|||
|
||||
$(document).on('plugin-init.dt', function (e, context) {
|
||||
var api = new _Api( context );
|
||||
|
||||
const namespace = 'on-plugin-init';
|
||||
const stateSaveParamsEvent = `stateSaveParams.${namespace}`;
|
||||
const destroyEvent = `destroy.${namespace}`;
|
||||
|
||||
api.on( 'stateSaveParams', function ( e, settings, d ) {
|
||||
api.on( stateSaveParamsEvent, function ( e, settings, d ) {
|
||||
// This could be more compact with the API, but it is a lot faster as a simple
|
||||
// internal loop
|
||||
var idFn = settings.rowIdFn;
|
||||
|
@ -8349,7 +8372,11 @@
|
|||
}
|
||||
|
||||
d.childRows = ids;
|
||||
})
|
||||
});
|
||||
|
||||
api.on( destroyEvent, function () {
|
||||
api.off(`${stateSaveParamsEvent} ${destroyEvent}`);
|
||||
});
|
||||
|
||||
var loaded = api.state.loaded();
|
||||
|
||||
|
@ -9670,7 +9697,7 @@
|
|||
* @type string
|
||||
* @default Version number
|
||||
*/
|
||||
DataTable.version = "1.12.1";
|
||||
DataTable.version = "1.13.1";
|
||||
|
||||
/**
|
||||
* Private data store, containing all of the settings objects that are
|
||||
|
@ -14094,7 +14121,7 @@
|
|||
*
|
||||
* @type string
|
||||
*/
|
||||
build:"bs5/dt-1.12.1",
|
||||
build:"bs5/dt-1.13.1",
|
||||
|
||||
|
||||
/**
|
||||
|
@ -14732,7 +14759,7 @@
|
|||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay, btnClass, counter=0;
|
||||
var btnDisplay, btnClass;
|
||||
|
||||
var attach = function( container, buttons ) {
|
||||
var i, ien, node, button, tabIndex;
|
||||
|
@ -14807,7 +14834,7 @@
|
|||
'class': classes.sPageButton+' '+btnClass,
|
||||
'aria-controls': settings.sTableId,
|
||||
'aria-label': aria[ button ],
|
||||
'data-dt-idx': counter,
|
||||
'data-dt-idx': button,
|
||||
'tabindex': tabIndex,
|
||||
'id': idx === 0 && typeof button === 'string' ?
|
||||
settings.sTableId +'_'+ button :
|
||||
|
@ -14819,8 +14846,6 @@
|
|||
_fnBindAction(
|
||||
node, {action: button}, clickHandler
|
||||
);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15165,7 +15190,7 @@
|
|||
}
|
||||
}
|
||||
else if (window.luxon) {
|
||||
dt = format
|
||||
dt = format && typeof d === 'string'
|
||||
? window.luxon.DateTime.fromFormat( d, format )
|
||||
: window.luxon.DateTime.fromISO( d );
|
||||
|
||||
|
@ -15587,7 +15612,7 @@
|
|||
$.each( DataTable, function ( prop, val ) {
|
||||
$.fn.DataTable[ prop ] = val;
|
||||
} );
|
||||
|
||||
|
||||
return DataTable;
|
||||
}));
|
||||
|
||||
|
@ -15596,14 +15621,6 @@
|
|||
* 2020 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 4. This requires Bootstrap 5 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
||||
* for further information.
|
||||
*/
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
|
@ -15615,16 +15632,22 @@
|
|||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if ( ! root ) {
|
||||
// CommonJS environments without a window global must pass a
|
||||
// root. This will give an error otherwise
|
||||
root = window;
|
||||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
// Require DataTables, which attaches to jQuery, including
|
||||
// jQuery if needed and have a $ property so we can access the
|
||||
// jQuery object that is used
|
||||
$ = require('datatables.net')(root, $).$;
|
||||
if ( ! $ ) {
|
||||
$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
|
||||
require('jquery') :
|
||||
require('jquery')( root );
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable ) {
|
||||
require('datatables.net')(root, $);
|
||||
}
|
||||
|
||||
|
||||
return factory( $, root, root.document );
|
||||
};
|
||||
}
|
||||
|
@ -15637,11 +15660,21 @@
|
|||
var DataTable = $.fn.dataTable;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 5. This requires Bootstrap 5 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
||||
* for further information.
|
||||
*/
|
||||
|
||||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend( true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row dt-row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
renderer: 'bootstrap'
|
||||
} );
|
||||
|
@ -15663,7 +15696,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
var classes = settings.oClasses;
|
||||
var lang = settings.oLanguage.oPaginate;
|
||||
var aria = settings.oLanguage.oAria.paginate || {};
|
||||
var btnDisplay, btnClass, counter=0;
|
||||
var btnDisplay, btnClass;
|
||||
|
||||
var attach = function( container, buttons ) {
|
||||
var i, ien, node, button;
|
||||
|
@ -15732,7 +15765,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
'href': '#',
|
||||
'aria-controls': settings.sTableId,
|
||||
'aria-label': aria[ button ],
|
||||
'data-dt-idx': counter,
|
||||
'data-dt-idx': button,
|
||||
'tabindex': settings.iTabIndex,
|
||||
'class': 'page-link'
|
||||
} )
|
||||
|
@ -15743,13 +15776,12 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
settings.oApi._fnBindAction(
|
||||
node, {action: button}, clickHandler
|
||||
);
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var hostEl = $(host);
|
||||
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||
// inside an iframe or frame.
|
||||
var activeEl;
|
||||
|
@ -15759,17 +15791,26 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
// elements, focus is lost on the select button which is bad for
|
||||
// accessibility. So we want to restore focus once the draw has
|
||||
// completed
|
||||
activeEl = $(host).find(document.activeElement).data('dt-idx');
|
||||
activeEl = hostEl.find(document.activeElement).data('dt-idx');
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
var paginationEl = hostEl.children('ul.pagination');
|
||||
|
||||
if (paginationEl.length) {
|
||||
paginationEl.empty();
|
||||
}
|
||||
else {
|
||||
paginationEl = hostEl.html('<ul/>').children('ul').addClass('pagination');
|
||||
}
|
||||
|
||||
attach(
|
||||
$(host).empty().html('<ul class="pagination"/>').children('ul'),
|
||||
paginationEl,
|
||||
buttons
|
||||
);
|
||||
|
||||
if ( activeEl !== undefined ) {
|
||||
$(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
|
||||
hostEl.find('[data-dt-idx='+activeEl+']').trigger('focus');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
205
src/static/scripts/identicon.js
vendored
205
src/static/scripts/identicon.js
vendored
|
@ -1,205 +0,0 @@
|
|||
/**
|
||||
* Identicon.js 2.3.3
|
||||
* http://github.com/stewartlord/identicon.js
|
||||
*
|
||||
* PNGLib required for PNG output
|
||||
* http://www.xarg.org/download/pnglib.js
|
||||
*
|
||||
* Copyright 2018, Stewart Lord
|
||||
* Released under the BSD license
|
||||
* http://www.opensource.org/licenses/bsd-license.php
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var PNGlib;
|
||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
||||
PNGlib = require('./pnglib');
|
||||
} else {
|
||||
PNGlib = window.PNGlib;
|
||||
}
|
||||
|
||||
var Identicon = function(hash, options){
|
||||
if (typeof(hash) !== 'string' || hash.length < 15) {
|
||||
throw 'A hash of at least 15 characters is required.';
|
||||
}
|
||||
|
||||
this.defaults = {
|
||||
background: [240, 240, 240, 255],
|
||||
margin: 0.08,
|
||||
size: 64,
|
||||
saturation: 0.7,
|
||||
brightness: 0.5,
|
||||
format: 'png'
|
||||
};
|
||||
|
||||
this.options = typeof(options) === 'object' ? options : this.defaults;
|
||||
|
||||
// backward compatibility with old constructor (hash, size, margin)
|
||||
if (typeof(arguments[1]) === 'number') { this.options.size = arguments[1]; }
|
||||
if (arguments[2]) { this.options.margin = arguments[2]; }
|
||||
|
||||
this.hash = hash
|
||||
this.background = this.options.background || this.defaults.background;
|
||||
this.size = this.options.size || this.defaults.size;
|
||||
this.format = this.options.format || this.defaults.format;
|
||||
this.margin = this.options.margin !== undefined ? this.options.margin : this.defaults.margin;
|
||||
|
||||
// foreground defaults to last 7 chars as hue at 70% saturation, 50% brightness
|
||||
var hue = parseInt(this.hash.substr(-7), 16) / 0xfffffff;
|
||||
var saturation = this.options.saturation || this.defaults.saturation;
|
||||
var brightness = this.options.brightness || this.defaults.brightness;
|
||||
this.foreground = this.options.foreground || this.hsl2rgb(hue, saturation, brightness);
|
||||
};
|
||||
|
||||
Identicon.prototype = {
|
||||
background: null,
|
||||
foreground: null,
|
||||
hash: null,
|
||||
margin: null,
|
||||
size: null,
|
||||
format: null,
|
||||
|
||||
image: function(){
|
||||
return this.isSvg()
|
||||
? new Svg(this.size, this.foreground, this.background)
|
||||
: new PNGlib(this.size, this.size, 256);
|
||||
},
|
||||
|
||||
render: function(){
|
||||
var image = this.image(),
|
||||
size = this.size,
|
||||
baseMargin = Math.floor(size * this.margin),
|
||||
cell = Math.floor((size - (baseMargin * 2)) / 5),
|
||||
margin = Math.floor((size - cell * 5) / 2),
|
||||
bg = image.color.apply(image, this.background),
|
||||
fg = image.color.apply(image, this.foreground);
|
||||
|
||||
// the first 15 characters of the hash control the pixels (even/odd)
|
||||
// they are drawn down the middle first, then mirrored outwards
|
||||
var i, color;
|
||||
for (i = 0; i < 15; i++) {
|
||||
color = parseInt(this.hash.charAt(i), 16) % 2 ? bg : fg;
|
||||
if (i < 5) {
|
||||
this.rectangle(2 * cell + margin, i * cell + margin, cell, cell, color, image);
|
||||
} else if (i < 10) {
|
||||
this.rectangle(1 * cell + margin, (i - 5) * cell + margin, cell, cell, color, image);
|
||||
this.rectangle(3 * cell + margin, (i - 5) * cell + margin, cell, cell, color, image);
|
||||
} else if (i < 15) {
|
||||
this.rectangle(0 * cell + margin, (i - 10) * cell + margin, cell, cell, color, image);
|
||||
this.rectangle(4 * cell + margin, (i - 10) * cell + margin, cell, cell, color, image);
|
||||
}
|
||||
}
|
||||
|
||||
return image;
|
||||
},
|
||||
|
||||
rectangle: function(x, y, w, h, color, image){
|
||||
if (this.isSvg()) {
|
||||
image.rectangles.push({x: x, y: y, w: w, h: h, color: color});
|
||||
} else {
|
||||
var i, j;
|
||||
for (i = x; i < x + w; i++) {
|
||||
for (j = y; j < y + h; j++) {
|
||||
image.buffer[image.index(i, j)] = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// adapted from: https://gist.github.com/aemkei/1325937
|
||||
hsl2rgb: function(h, s, b){
|
||||
h *= 6;
|
||||
s = [
|
||||
b += s *= b < .5 ? b : 1 - b,
|
||||
b - h % 1 * s * 2,
|
||||
b -= s *= 2,
|
||||
b,
|
||||
b + h % 1 * s,
|
||||
b + s
|
||||
];
|
||||
|
||||
return[
|
||||
s[ ~~h % 6 ] * 255, // red
|
||||
s[ (h|16) % 6 ] * 255, // green
|
||||
s[ (h|8) % 6 ] * 255 // blue
|
||||
];
|
||||
},
|
||||
|
||||
toString: function(raw){
|
||||
// backward compatibility with old toString, default to base64
|
||||
if (raw) {
|
||||
return this.render().getDump();
|
||||
} else {
|
||||
return this.render().getBase64();
|
||||
}
|
||||
},
|
||||
|
||||
isSvg: function(){
|
||||
return this.format.match(/svg/i)
|
||||
}
|
||||
};
|
||||
|
||||
var Svg = function(size, foreground, background){
|
||||
this.size = size;
|
||||
this.foreground = this.color.apply(this, foreground);
|
||||
this.background = this.color.apply(this, background);
|
||||
this.rectangles = [];
|
||||
};
|
||||
|
||||
Svg.prototype = {
|
||||
size: null,
|
||||
foreground: null,
|
||||
background: null,
|
||||
rectangles: null,
|
||||
|
||||
color: function(r, g, b, a){
|
||||
var values = [r, g, b].map(Math.round);
|
||||
values.push((a >= 0) && (a <= 255) ? a/255 : 1);
|
||||
return 'rgba(' + values.join(',') + ')';
|
||||
},
|
||||
|
||||
getDump: function(){
|
||||
var i,
|
||||
xml,
|
||||
rect,
|
||||
fg = this.foreground,
|
||||
bg = this.background,
|
||||
stroke = this.size * 0.005;
|
||||
|
||||
xml = "<svg xmlns='http://www.w3.org/2000/svg'"
|
||||
+ " width='" + this.size + "' height='" + this.size + "'"
|
||||
+ " style='background-color:" + bg + ";'>"
|
||||
+ "<g style='fill:" + fg + "; stroke:" + fg + "; stroke-width:" + stroke + ";'>";
|
||||
|
||||
for (i = 0; i < this.rectangles.length; i++) {
|
||||
rect = this.rectangles[i];
|
||||
if (rect.color == bg) continue;
|
||||
xml += "<rect "
|
||||
+ " x='" + rect.x + "'"
|
||||
+ " y='" + rect.y + "'"
|
||||
+ " width='" + rect.w + "'"
|
||||
+ " height='" + rect.h + "'"
|
||||
+ "/>";
|
||||
}
|
||||
xml += "</g></svg>"
|
||||
|
||||
return xml;
|
||||
},
|
||||
|
||||
getBase64: function(){
|
||||
if ('function' === typeof btoa) {
|
||||
return btoa(this.getDump());
|
||||
} else if (Buffer) {
|
||||
return new Buffer(this.getDump(), 'binary').toString('base64');
|
||||
} else {
|
||||
throw 'Cannot generate base64 output';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
||||
module.exports = Identicon;
|
||||
} else {
|
||||
window.Identicon = Identicon;
|
||||
}
|
||||
})();
|
1462
src/static/scripts/jdenticon.js
vendored
Normal file
1462
src/static/scripts/jdenticon.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue