1
0
Fork 0

Merge branch 'main' into import-limit

This commit is contained in:
Mouse Reeve 2022-12-16 12:44:57 -08:00 committed by GitHub
commit d4351cfcb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
121 changed files with 5402 additions and 2951 deletions

View file

@ -140,6 +140,10 @@ button:focus-visible .button-invisible-overlay {
opacity: 1;
}
button.button-paragraph {
vertical-align: middle;
}
/** States
******************************************************************************/

View file

@ -81,7 +81,19 @@ details.dropdown .dropdown-menu a:focus-visible {
details.details-panel {
box-shadow: 0 0 0 1px $border;
transition: box-shadow 0.2s ease;
padding: 0.75rem;
padding: 0;
> * {
padding: 0.75rem;
}
summary {
position: relative;
.details-close {
padding: 0.75rem;
}
}
}
details[open].details-panel,
@ -89,10 +101,6 @@ details.details-panel:hover {
box-shadow: 0 0 0 1px $border;
}
details.details-panel summary {
position: relative;
}
details summary .details-close {
position: absolute;
right: 0;

View file

@ -15,6 +15,8 @@ $danger: #872538;
$danger-light: #481922;
$light: #393939;
$red: #ffa1b4;
$black: #000;
$white-ter: hsl(0, 0%, 90%);
/* book cover standins */
$no-cover-color: #002549;
@ -56,9 +58,12 @@ $link-active: $white-bis;
$link-light: #0d1c26;
/* bulma overrides */
$body-background-color: rgb(17, 18, 18);
$background: $background-secondary;
$menu-item-active-background-color: $link-background;
$navbar-dropdown-item-hover-color: $white;
$info-light: $background-body;
$info-dark: #72b6ee;
/* These element's colors are hardcoded, probably a bug in bulma? */
@media screen and (min-width: 769px) {
@ -74,7 +79,7 @@ $navbar-dropdown-item-hover-color: $white;
}
/* misc */
$shadow: 0 0.5em 1em -0.125em rgba($black, 0.2), 0 0px 0 1px rgba($black, 0.02);
$shadow: 0 0.5em 0.5em -0.125em rgba($black, 0.2), 0 0px 0 1px rgba($black, 0.02);
$card-header-shadow: 0 0.125em 0.25em rgba($black, 0.1);
$invisible-overlay-background-color: rgba($black, 0.66);
$progress-value-background-color: $border-light;
@ -92,6 +97,7 @@ $family-secondary: $family-sans-serif;
color: $grey-light !important;
}
#qrcode svg {
background-color: #a6a6a6;
}

View file

@ -48,6 +48,12 @@ let BookWyrm = new (class {
document
.querySelector("#barcode-scanner-modal")
.addEventListener("open", this.openBarcodeScanner.bind(this));
document
.querySelectorAll('form[name="register"]')
.forEach((form) =>
form.addEventListener("submit", (e) => this.setPreferredTimezone(e, form))
);
}
/**
@ -628,9 +634,9 @@ let BookWyrm = new (class {
}
function toggleStatus(status) {
for (const child of statusNode.children) {
BookWyrm.toggleContainer(child, !child.classList.contains(status));
}
const template = document.querySelector(`#barcode-${status}`);
statusNode.replaceChildren(template ? template.content.cloneNode(true) : null);
}
function initBarcodes(cameraId = null) {
@ -785,4 +791,16 @@ let BookWyrm = new (class {
initBarcodes();
}
/**
* Set preferred timezone in register form.
*
* @param {Event} event - `submit` event fired by the register form.
* @return {undefined}
*/
setPreferredTimezone(event, form) {
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
form.querySelector('input[name="preferred_timezone"]').value = tz;
}
})();